qt4projectmanagerplugin.cpp 18.5 KB
Newer Older
1
/**************************************************************************
con's avatar
con committed
2
3
4
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
con's avatar
con committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
con's avatar
con committed
8
**
9
**
10
** GNU Lesser General Public License Usage
11
**
hjk's avatar
hjk committed
12
13
14
15
16
17
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18
**
con's avatar
con committed
19
** In addition, as a special exception, Nokia gives you certain additional
hjk's avatar
hjk committed
20
** rights. These rights are described in the Nokia Qt LGPL Exception
con's avatar
con committed
21
22
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
23
24
25
26
27
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
con's avatar
con committed
28
** If you have questions regarding the use of this file, please contact
29
** Nokia at qt-info@nokia.com.
con's avatar
con committed
30
**
31
**************************************************************************/
hjk's avatar
hjk committed
32

con's avatar
con committed
33
#include "qt4projectmanagerplugin.h"
hjk's avatar
hjk committed
34

con's avatar
con committed
35
#include "qt4projectmanager.h"
36
#include "qt4nodes.h"
37
38
#include "qmakestep.h"
#include "makestep.h"
39
40
#include "qt4target.h"
#include "qt4buildconfiguration.h"
con's avatar
con committed
41
42
#include "wizards/consoleappwizard.h"
#include "wizards/guiappwizard.h"
43
#include "wizards/mobileappwizard.h"
con's avatar
con committed
44
#include "wizards/librarywizard.h"
45
#include "wizards/testwizard.h"
46
#include "wizards/emptyprojectwizard.h"
47
#include "wizards/subdirsprojectwizard.h"
48
#include "wizards/qtquickappwizard.h"
49
#include "wizards/html5appwizard.h"
50
#include "customwidgetwizard/customwidgetwizard.h"
con's avatar
con committed
51
#include "profileeditorfactory.h"
52
#include "profilehoverhandler.h"
con's avatar
con committed
53
54
#include "qt4projectmanagerconstants.h"
#include "qt4project.h"
55
#include "profileeditor.h"
56
#include "externaleditors.h"
Leandro Melo's avatar
Leandro Melo committed
57
#include "profilecompletionassist.h"
58
#include "qt-s60/s60manager.h"
59
60
61
#include "qt-desktop/qt4desktoptargetfactory.h"
#include "qt-desktop/qt4simulatortargetfactory.h"
#include "qt-desktop/qt4runconfiguration.h"
dt's avatar
dt committed
62
63
64
#include "qt-desktop/desktopqtversionfactory.h"
#include "qt-desktop/simulatorqtversionfactory.h"
#include "winceqtversionfactory.h"
65
66
#include "unconfiguredprojectpanel.h"
#include "unconfiguredsettingsoptionpage.h"
con's avatar
con committed
67

68
#include <coreplugin/id.h>
69
#include <coreplugin/icore.h>
70
#include <extensionsystem/pluginmanager.h>
71
#include <projectexplorer/buildmanager.h>
con's avatar
con committed
72
#include <projectexplorer/project.h>
73
#include <projectexplorer/session.h>
74
75
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
con's avatar
con committed
76
77
#include <projectexplorer/projectnodes.h>
#include <coreplugin/mimedatabase.h>
78
#include <coreplugin/actionmanager/actionmanager.h>
79
80
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/command.h>
81
#include <coreplugin/editormanager/editormanager.h>
con's avatar
con committed
82
#include <texteditor/texteditoractionhandler.h>
83
#include <texteditor/texteditorconstants.h>
84
#include <texteditor/texteditorsettings.h>
85
#include <utils/parameteraction.h>
con's avatar
con committed
86
87

#ifdef WITH_TESTS
Tobias Hunger's avatar
Tobias Hunger committed
88
#    include <QTest>
con's avatar
con committed
89
90
#endif

91
92
#include <QtPlugin>
#include <QMenu>
Tobias Hunger's avatar
Tobias Hunger committed
93

con's avatar
con committed
94
95
96
97
using namespace Qt4ProjectManager::Internal;
using namespace Qt4ProjectManager;
using ProjectExplorer::Project;

98
99
100
101
102
103
Qt4ProjectManagerPlugin::Qt4ProjectManagerPlugin()
    : m_previousStartupProject(0), m_previousTarget(0)
{

}

con's avatar
con committed
104
105
106
107
108
109
110
111
112
113
Qt4ProjectManagerPlugin::~Qt4ProjectManagerPlugin()
{
    //removeObject(m_embeddedPropertiesPage);
    //delete m_embeddedPropertiesPage;

    removeObject(m_proFileEditorFactory);
    delete m_proFileEditorFactory;
    removeObject(m_qt4ProjectManager);
    delete m_qt4ProjectManager;
}
114
115

bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage)
con's avatar
con committed
116
{
117
    Q_UNUSED(arguments)
118
    const Core::Context projectContext(Qt4ProjectManager::Constants::PROJECT_ID);
119
    Core::Context projecTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE);
120

hjk's avatar
hjk committed
121
    if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":qt4projectmanager/Qt4ProjectManager.mimetypes.xml"), errorMessage))
con's avatar
con committed
122
123
        return false;

124
    m_projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
hjk's avatar
hjk committed
125
    Core::ActionManager *am = Core::ICore::actionManager();
con's avatar
con committed
126
127

    //create and register objects
128
    m_qt4ProjectManager = new Qt4Manager(this);
con's avatar
con committed
129
130
131
    addObject(m_qt4ProjectManager);

    TextEditor::TextEditorActionHandler *editorHandler
132
            = new TextEditor::TextEditorActionHandler(Constants::C_PROFILEEDITOR,
133
134
                  TextEditor::TextEditorActionHandler::UnCommentSelection
                  | TextEditor::TextEditorActionHandler::JumpToFileUnderCursor);
con's avatar
con committed
135
136
137
138

    m_proFileEditorFactory = new ProFileEditorFactory(m_qt4ProjectManager, editorHandler);
    addObject(m_proFileEditorFactory);

139
    addAutoReleasedObject(new EmptyProjectWizard);
140
141
142
143
    addAutoReleasedObject(new SubdirsProjectWizard);
    addAutoReleasedObject(new GuiAppWizard);
    addAutoReleasedObject(new ConsoleAppWizard);
    addAutoReleasedObject(new MobileAppWizard);
144
    QtQuickAppWizard::createInstances(this); //creates several instances with different options
145
    addAutoReleasedObject(new Html5AppWizard);
146
    addAutoReleasedObject(new LibraryWizard);
147
    addAutoReleasedObject(new TestWizard);
148
    addAutoReleasedObject(new CustomWidgetWizard);
con's avatar
con committed
149

150
151
    CustomQt4ProjectWizard::registerSelf();

dt's avatar
dt committed
152
153
    addAutoReleasedObject(new QMakeStepFactory);
    addAutoReleasedObject(new MakeStepFactory);
con's avatar
con committed
154
155

    addAutoReleasedObject(new Qt4RunConfigurationFactory);
156
    addAutoReleasedObject(new UnConfiguredSettingsOptionPage);
con's avatar
con committed
157

158
159
160
161
162
163
164
#ifdef Q_OS_MAC
    addAutoReleasedObject(new MacDesignerExternalEditor);
#else
    addAutoReleasedObject(new DesignerExternalEditor);
#endif
    addAutoReleasedObject(new LinguistExternalEditor);

con's avatar
con committed
165
    addAutoReleasedObject(new S60Manager);
ck's avatar
ck committed
166

167
168
169
    addAutoReleasedObject(new Qt4DesktopTargetFactory);
    addAutoReleasedObject(new Qt4SimulatorTargetFactory);

dt's avatar
dt committed
170
171
172
173
    addAutoReleasedObject(new DesktopQtVersionFactory);
    addAutoReleasedObject(new SimulatorQtVersionFactory);
    addAutoReleasedObject(new WinCeQtVersionFactory);

Leandro Melo's avatar
Leandro Melo committed
174
    addAutoReleasedObject(new ProFileCompletionAssistProvider);
175
    addAutoReleasedObject(new ProFileHoverHandler(this));
176
    addAutoReleasedObject(new UnconfiguredProjectPanel);
177

con's avatar
con committed
178
    //menus
179
    Core::ActionContainer *mbuild =
180
            am->actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
181
    Core::ActionContainer *mproject =
182
183
184
            am->actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT);
    Core::ActionContainer *msubproject =
            am->actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT);
con's avatar
con committed
185
186

    //register actions
con's avatar
con committed
187
    Core::Command *command;
con's avatar
con committed
188
189
190
191

    QIcon qmakeIcon(QLatin1String(":/qt4projectmanager/images/run_qmake.png"));
    qmakeIcon.addFile(QLatin1String(":/qt4projectmanager/images/run_qmake_small.png"));
    m_runQMakeAction = new QAction(qmakeIcon, tr("Run qmake"), this);
192
    command = am->registerAction(m_runQMakeAction, Constants::RUNQMAKE, projectContext);
193
    command->setAttribute(Core::Command::CA_Hide);
dt's avatar
dt committed
194
    mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
con's avatar
con committed
195
196
197
    connect(m_runQMakeAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMake()));

    m_runQMakeActionContextMenu = new QAction(qmakeIcon, tr("Run qmake"), this);
198
    command = am->registerAction(m_runQMakeActionContextMenu, Constants::RUNQMAKECONTEXTMENU, projectContext);
199
    command->setAttribute(Core::Command::CA_Hide);
con's avatar
con committed
200
    mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
201
    msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
con's avatar
con committed
202
203
    connect(m_runQMakeActionContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMakeContextMenu()));

204
205
    QIcon buildIcon = QIcon(QLatin1String(ProjectExplorer::Constants::ICON_BUILD));
    buildIcon.addFile(QLatin1String(ProjectExplorer::Constants::ICON_BUILD_SMALL));
206
    m_buildSubProjectContextMenu = new QAction(buildIcon, tr("Build"), this);
207
    command = am->registerAction(m_buildSubProjectContextMenu, Constants::BUILDSUBDIRCONTEXTMENU, projectContext);
208
209
210
211
    command->setAttribute(Core::Command::CA_Hide);
    msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
    connect(m_buildSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildSubDirContextMenu()));

212
213
    QIcon rebuildIcon = QIcon(QLatin1String(ProjectExplorer::Constants::ICON_REBUILD));
    rebuildIcon.addFile(QLatin1String(ProjectExplorer::Constants::ICON_REBUILD_SMALL));
dt's avatar
dt committed
214
    m_rebuildSubProjectContextMenu = new QAction(rebuildIcon, tr("Rebuild"), this);
215
    command = am->registerAction(m_rebuildSubProjectContextMenu, Constants::REBUILDSUBDIRCONTEXTMENU, projectContext);
dt's avatar
dt committed
216
217
218
219
    command->setAttribute(Core::Command::CA_Hide);
    msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
    connect(m_rebuildSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(rebuildSubDirContextMenu()));

220
221
    QIcon cleanIcon = QIcon(QLatin1String(ProjectExplorer::Constants::ICON_CLEAN));
    cleanIcon.addFile(QLatin1String(ProjectExplorer::Constants::ICON_CLEAN_SMALL));
dt's avatar
dt committed
222
    m_cleanSubProjectContextMenu = new QAction(cleanIcon, tr("Clean"), this);
223
    command = am->registerAction(m_cleanSubProjectContextMenu, Constants::CLEANSUBDIRCONTEXTMENU, projectContext);
dt's avatar
dt committed
224
225
226
227
    command->setAttribute(Core::Command::CA_Hide);
    msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
    connect(m_cleanSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(cleanSubDirContextMenu()));

228
229
230
    m_buildSubProjectAction = new Utils::ParameterAction(tr("Build Subproject"), tr("Build Subproject \"%1\""),
                                                         Utils::ParameterAction::EnabledWithParameter, this);
    command = am->registerAction(m_buildSubProjectAction, Constants::BUILDSUBDIR, projectContext);
231
    command->setAttribute(Core::Command::CA_Hide);
232
233
234
235
236
237
238
239
    command->setAttribute(Core::Command::CA_UpdateText);
    command->setDescription(m_buildSubProjectAction->text());
    mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
    connect(m_buildSubProjectAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildSubDirContextMenu()));

    m_rebuildSubProjectAction = new Utils::ParameterAction(tr("Rebuild Subproject"), tr("Rebuild Subproject \"%1\""),
                                                           Utils::ParameterAction::EnabledWithParameter, this);
    command = am->registerAction(m_rebuildSubProjectAction, Constants::REBUILDSUBDIR, projectContext);
240
    command->setAttribute(Core::Command::CA_Hide);
241
242
243
244
245
246
247
248
    command->setAttribute(Core::Command::CA_UpdateText);
    command->setDescription(m_rebuildSubProjectAction->text());
    mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
    connect(m_rebuildSubProjectAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(rebuildSubDirContextMenu()));

    m_cleanSubProjectAction = new Utils::ParameterAction(tr("Clean Subproject"), tr("Clean Subproject \"%1\""),
                                                         Utils::ParameterAction::EnabledWithParameter, this);
    command = am->registerAction(m_cleanSubProjectAction, Constants::CLEANSUBDIR, projectContext);
249
    command->setAttribute(Core::Command::CA_Hide);
250
251
252
253
254
    command->setAttribute(Core::Command::CA_UpdateText);
    command->setDescription(m_cleanSubProjectAction->text());
    mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
    connect(m_cleanSubProjectAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(cleanSubDirContextMenu()));

con's avatar
con committed
255
    connect(m_projectExplorer,
Robert Loehning's avatar
Robert Loehning committed
256
257
            SIGNAL(aboutToShowContextMenu(ProjectExplorer::Project*,ProjectExplorer::Node*)),
            this, SLOT(updateContextMenu(ProjectExplorer::Project*,ProjectExplorer::Node*)));
con's avatar
con committed
258

Robert Loehning's avatar
Robert Loehning committed
259
260
    connect(m_projectExplorer->buildManager(), SIGNAL(buildStateChanged(ProjectExplorer::Project*)),
            this, SLOT(buildStateChanged(ProjectExplorer::Project*)));
261
262
    connect(m_projectExplorer->session(), SIGNAL(startupProjectChanged(ProjectExplorer::Project*)),
            this, SLOT(startupProjectChanged()));
263
    connect(m_projectExplorer, SIGNAL(currentNodeChanged(ProjectExplorer::Node*,ProjectExplorer::Project*)),
264
            this, SLOT(currentNodeChanged(ProjectExplorer::Node*,ProjectExplorer::Project*)));
con's avatar
con committed
265

266
    Core::ActionContainer *contextMenu = am->createMenu(Qt4ProjectManager::Constants::M_CONTEXT);
267

268
    Core::Context proFileEditorContext = Core::Context(Qt4ProjectManager::Constants::C_PROFILEEDITOR);
269

270
    command = am->command(TextEditor::Constants::JUMP_TO_FILE_UNDER_CURSOR);
271
    contextMenu->addAction(command);
272

273
274
    m_addLibraryAction = new QAction(tr("Add Library..."), this);
    command = am->registerAction(m_addLibraryAction,
275
        Constants::ADDLIBRARY, proFileEditorContext);
276
277
278
279
280
281
282
283
284
285
286
    connect(m_addLibraryAction, SIGNAL(triggered()),
            m_qt4ProjectManager, SLOT(addLibrary()));
    contextMenu->addAction(command);

    m_addLibraryActionContextMenu = new QAction(tr("Add Library..."), this);
    command = am->registerAction(m_addLibraryActionContextMenu,
        Constants::ADDLIBRARY, projecTreeContext);
    connect(m_addLibraryActionContextMenu, SIGNAL(triggered()),
            m_qt4ProjectManager, SLOT(addLibraryContextMenu()));
    mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES);
    msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES);
287

288
289
290
291
292
    QAction *separator = new QAction(this);
    separator->setSeparator(true);
    contextMenu->addAction(am->registerAction(separator,
                  Core::Id(Constants::SEPARATOR), proFileEditorContext));

293
294
    command = am->command(TextEditor::Constants::UN_COMMENT_SELECTION);
    contextMenu->addAction(command);
295

con's avatar
con committed
296
297
298
    return true;
}

299
300
301
302
303
304
bool Qt4ProjectManagerPlugin::delayedInitialize()
{
    S60Manager::instance()->addDevice();
    return true;
}

con's avatar
con committed
305
306
307
308
309
310
311
312
313
314
315
void Qt4ProjectManagerPlugin::extensionsInitialized()
{
    m_qt4ProjectManager->init();
}

void Qt4ProjectManagerPlugin::updateContextMenu(Project *project,
                                                ProjectExplorer::Node *node)
{
    m_qt4ProjectManager->setContextProject(project);
    m_qt4ProjectManager->setContextNode(node);
    m_runQMakeActionContextMenu->setEnabled(false);
316
    m_buildSubProjectContextMenu->setEnabled(false);
dt's avatar
dt committed
317
318
    m_rebuildSubProjectContextMenu->setEnabled(false);
    m_cleanSubProjectContextMenu->setEnabled(false);
con's avatar
con committed
319

320
    Qt4ProFileNode *proFileNode = qobject_cast<Qt4ProFileNode *>(node);
321
322
323
324
    Qt4Project *qt4Project = qobject_cast<Qt4Project *>(project);
    if (qt4Project && proFileNode
            && qt4Project->activeTarget()
            && qt4Project->activeTarget()->activeQt4BuildConfiguration()) {
dt's avatar
dt committed
325
        m_runQMakeActionContextMenu->setVisible(true);
326
        m_buildSubProjectContextMenu->setVisible(true);
dt's avatar
dt committed
327
328
        m_rebuildSubProjectContextMenu->setVisible(true);
        m_cleanSubProjectContextMenu->setVisible(true);
329
330

        if (!m_projectExplorer->buildManager()->isBuilding(project)) {
331
332
            if (qt4Project->activeTarget()->activeQt4BuildConfiguration()->qmakeStep())
                m_runQMakeActionContextMenu->setEnabled(true);
333
            m_buildSubProjectContextMenu->setEnabled(true);
dt's avatar
dt committed
334
335
            m_rebuildSubProjectContextMenu->setEnabled(true);
            m_cleanSubProjectContextMenu->setEnabled(true);
336
        }
337
338
    } else {
        m_runQMakeActionContextMenu->setVisible(false);
339
        m_buildSubProjectContextMenu->setVisible(false);
dt's avatar
dt committed
340
341
        m_rebuildSubProjectContextMenu->setVisible(false);
        m_cleanSubProjectContextMenu->setVisible(false);
con's avatar
con committed
342
343
344
    }
}

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

void Qt4ProjectManagerPlugin::startupProjectChanged()
{
    if (m_previousStartupProject)
        disconnect(m_previousStartupProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
                   this, SLOT(activeTargetChanged()));

    m_previousStartupProject = qobject_cast<Qt4Project *>(m_projectExplorer->session()->startupProject());

    if (m_previousStartupProject)
        connect(m_previousStartupProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
                           this, SLOT(activeTargetChanged()));

    activeTargetChanged();
}

void Qt4ProjectManagerPlugin::activeTargetChanged()
{
    if (m_previousTarget)
        disconnect(m_previousTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
                   this, SLOT(updateRunQMakeAction()));

    m_previousTarget = m_previousStartupProject ? m_previousStartupProject->activeTarget() : 0;

    if (m_previousTarget)
        connect(m_previousTarget, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
                this, SLOT(updateRunQMakeAction()));

    updateRunQMakeAction();
}

void Qt4ProjectManagerPlugin::updateRunQMakeAction()
con's avatar
con committed
377
{
378
379
380
381
382
383
384
385
386
387
    bool enable = true;
    if (m_projectExplorer->buildManager()->isBuilding(m_projectExplorer->currentProject()))
        enable = false;
    Qt4Project *pro = qobject_cast<Qt4Project *>(m_projectExplorer->currentProject());
    if (!pro
            || !pro->activeTarget()
            || !pro->activeTarget()->activeBuildConfiguration())
        enable = false;

    m_runQMakeAction->setEnabled(enable);
con's avatar
con committed
388
389
}

390
void Qt4ProjectManagerPlugin::currentNodeChanged(ProjectExplorer::Node *node, ProjectExplorer::Project *project)
391
392
{
    m_addLibraryActionContextMenu->setEnabled(qobject_cast<Qt4ProFileNode *>(node));
393

394
395
396
397
398
    Qt4Project *pro = qobject_cast<Qt4Project *>(project);
    Qt4ProFileNode *subProjectNode = node ? qobject_cast<Qt4ProFileNode *>(node->projectNode()) : 0;

    m_qt4ProjectManager->setContextNode(subProjectNode);
    m_qt4ProjectManager->setContextProject(pro);
399

400
    bool subProjectActionsVisible = pro && subProjectNode && (subProjectNode != pro->rootProjectNode());
401
402
403

    QString subProjectName;
    if (subProjectActionsVisible)
404
        subProjectName = subProjectNode->displayName();
405
406
407
408
409
410
411
412
413

    m_buildSubProjectAction->setParameter(subProjectName);
    m_rebuildSubProjectAction->setParameter(subProjectName);
    m_cleanSubProjectAction->setParameter(subProjectName);

    m_buildSubProjectAction->setVisible(subProjectActionsVisible);
    m_rebuildSubProjectAction->setVisible(subProjectActionsVisible);
    m_cleanSubProjectAction->setVisible(subProjectActionsVisible);

414
415
}

con's avatar
con committed
416
417
418
419
void Qt4ProjectManagerPlugin::buildStateChanged(ProjectExplorer::Project *pro)
{
    ProjectExplorer::Project *currentProject = m_projectExplorer->currentProject();
    if (pro == currentProject)
420
        updateRunQMakeAction();
con's avatar
con committed
421
422
423
}

Q_EXPORT_PLUGIN(Qt4ProjectManagerPlugin)