Commit 1738d08f authored by hjk's avatar hjk

projectexplorer: move project{Context,Language} from IProjectManager to Project

Reviewed-by: dt
parent 4a338a51
...@@ -99,6 +99,9 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName) ...@@ -99,6 +99,9 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
m_rootNode(new CMakeProjectNode(m_fileName)), m_rootNode(new CMakeProjectNode(m_fileName)),
m_lastEditor(0) m_lastEditor(0)
{ {
setProjectContext(Core::Context(CMakeProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguage(Core::Context(ProjectExplorer::Constants::LANG_CXX));
m_file = new CMakeFile(this, fileName); m_file = new CMakeFile(this, fileName);
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)), connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)),
......
...@@ -63,9 +63,6 @@ using namespace CMakeProjectManager::Internal; ...@@ -63,9 +63,6 @@ using namespace CMakeProjectManager::Internal;
CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage) CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
: m_settingsPage(cmakeSettingsPage) : m_settingsPage(cmakeSettingsPage)
{ {
m_projectContext = Core::Context(CMakeProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = Core::Context(ProjectExplorer::Constants::LANG_CXX);
ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance(); ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
connect(projectExplorer, SIGNAL(aboutToShowContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)), connect(projectExplorer, SIGNAL(aboutToShowContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)),
this, SLOT(updateContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*))); this, SLOT(updateContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)));
...@@ -79,14 +76,16 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage) ...@@ -79,14 +76,16 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
Core::ActionContainer *msubproject = Core::ActionContainer *msubproject =
am->actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT); am->actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT);
const Core::Context projectContext(CMakeProjectManager::Constants::PROJECTCONTEXT);
m_runCMakeAction = new QAction(QIcon(), tr("Run CMake"), this); m_runCMakeAction = new QAction(QIcon(), tr("Run CMake"), this);
Core::Command *command = am->registerAction(m_runCMakeAction, Constants::RUNCMAKE, m_projectContext); Core::Command *command = am->registerAction(m_runCMakeAction, Constants::RUNCMAKE, projectContext);
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
connect(m_runCMakeAction, SIGNAL(triggered()), this, SLOT(runCMake())); connect(m_runCMakeAction, SIGNAL(triggered()), this, SLOT(runCMake()));
m_runCMakeActionContextMenu = new QAction(QIcon(), tr("Run CMake"), this); m_runCMakeActionContextMenu = new QAction(QIcon(), tr("Run CMake"), this);
command = am->registerAction(m_runCMakeActionContextMenu, Constants::RUNCMAKECONTEXTMENU, m_projectContext); command = am->registerAction(m_runCMakeActionContextMenu, Constants::RUNCMAKECONTEXTMENU, projectContext);
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
...@@ -133,16 +132,6 @@ void CMakeManager::runCMake(ProjectExplorer::Project *project) ...@@ -133,16 +132,6 @@ void CMakeManager::runCMake(ProjectExplorer::Project *project)
} }
} }
Core::Context CMakeManager::projectContext() const
{
return m_projectContext;
}
Core::Context CMakeManager::projectLanguage() const
{
return m_projectLanguage;
}
ProjectExplorer::Project *CMakeManager::openProject(const QString &fileName) ProjectExplorer::Project *CMakeManager::openProject(const QString &fileName)
{ {
// TODO check whether this project is already opened // TODO check whether this project is already opened
......
...@@ -66,9 +66,6 @@ class CMakeManager : public ProjectExplorer::IProjectManager ...@@ -66,9 +66,6 @@ class CMakeManager : public ProjectExplorer::IProjectManager
public: public:
CMakeManager(CMakeSettingsPage *cmakeSettingsPage); CMakeManager(CMakeSettingsPage *cmakeSettingsPage);
virtual Core::Context projectContext() const;
virtual Core::Context projectLanguage() const;
virtual ProjectExplorer::Project *openProject(const QString &fileName); virtual ProjectExplorer::Project *openProject(const QString &fileName);
virtual QString mimeType() const; virtual QString mimeType() const;
...@@ -95,8 +92,6 @@ private: ...@@ -95,8 +92,6 @@ private:
void runCMake(ProjectExplorer::Project *project); void runCMake(ProjectExplorer::Project *project);
static QString qtVersionForQMake(const QString &qmakePath); static QString qtVersionForQMake(const QString &qmakePath);
static QPair<QString, QString> findQtDir(const Utils::Environment &env); static QPair<QString, QString> findQtDir(const Utils::Environment &env);
Core::Context m_projectContext;
Core::Context m_projectLanguage;
CMakeSettingsPage *m_settingsPage; CMakeSettingsPage *m_settingsPage;
QAction *m_runCMakeAction; QAction *m_runCMakeAction;
QAction *m_runCMakeActionContextMenu; QAction *m_runCMakeActionContextMenu;
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QProcessEnvironment> #include <QtCore/QProcessEnvironment>
...@@ -72,6 +73,9 @@ GenericProject::GenericProject(Manager *manager, const QString &fileName) ...@@ -72,6 +73,9 @@ GenericProject::GenericProject(Manager *manager, const QString &fileName)
m_fileName(fileName), m_fileName(fileName),
m_toolChain(0) m_toolChain(0)
{ {
setProjectContext(Core::Context(GenericProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguage(Core::Context(ProjectExplorer::Constants::LANG_CXX));
QFileInfo fileInfo(m_fileName); QFileInfo fileInfo(m_fileName);
QDir dir = fileInfo.dir(); QDir dir = fileInfo.dir();
......
...@@ -46,20 +46,7 @@ ...@@ -46,20 +46,7 @@
using namespace GenericProjectManager::Internal; using namespace GenericProjectManager::Internal;
Manager::Manager() Manager::Manager()
{ { }
m_projectContext = Core::Context(GenericProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = Core::Context(ProjectExplorer::Constants::LANG_CXX);
}
Core::Context Manager::projectContext() const
{
return m_projectContext;
}
Core::Context Manager::projectLanguage() const
{
return m_projectLanguage;
}
QString Manager::mimeType() const QString Manager::mimeType() const
{ {
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#define GENERICPROJECTMANAGER_H #define GENERICPROJECTMANAGER_H
#include <projectexplorer/iprojectmanager.h> #include <projectexplorer/iprojectmanager.h>
#include <coreplugin/icontext.h>
namespace GenericProjectManager { namespace GenericProjectManager {
namespace Internal { namespace Internal {
...@@ -49,9 +48,6 @@ class Manager : public ProjectExplorer::IProjectManager ...@@ -49,9 +48,6 @@ class Manager : public ProjectExplorer::IProjectManager
public: public:
Manager(); Manager();
virtual Core::Context projectContext() const;
virtual Core::Context projectLanguage() const;
virtual QString mimeType() const; virtual QString mimeType() const;
virtual ProjectExplorer::Project *openProject(const QString &fileName); virtual ProjectExplorer::Project *openProject(const QString &fileName);
...@@ -61,8 +57,6 @@ public: ...@@ -61,8 +57,6 @@ public:
void unregisterProject(GenericProject *project); void unregisterProject(GenericProject *project);
private: private:
Core::Context m_projectContext;
Core::Context m_projectLanguage;
QList<GenericProject *> m_projects; QList<GenericProject *> m_projects;
}; };
......
...@@ -53,9 +53,6 @@ class PROJECTEXPLORER_EXPORT IProjectManager ...@@ -53,9 +53,6 @@ class PROJECTEXPLORER_EXPORT IProjectManager
public: public:
IProjectManager() {} IProjectManager() {}
virtual Core::Context projectContext() const = 0; //TODO move into project
virtual Core::Context projectLanguage() const = 0; //TODO move into project
virtual QString mimeType() const = 0; virtual QString mimeType() const = 0;
virtual Project *openProject(const QString &fileName) = 0; virtual Project *openProject(const QString &fileName) = 0;
}; };
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "userfileaccessor.h" #include "userfileaccessor.h"
#include <coreplugin/ifile.h> #include <coreplugin/ifile.h>
#include <coreplugin/icontext.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <limits> #include <limits>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
...@@ -60,12 +61,15 @@ namespace ProjectExplorer { ...@@ -60,12 +61,15 @@ namespace ProjectExplorer {
// Project // Project
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
class ProjectPrivate { class ProjectPrivate
{
public: public:
ProjectPrivate(); ProjectPrivate();
QList<Target *> m_targets; QList<Target *> m_targets;
Target *m_activeTarget; Target *m_activeTarget;
EditorConfiguration *m_editorConfiguration; EditorConfiguration *m_editorConfiguration;
Core::Context m_projectContext;
Core::Context m_projectLanguage;
}; };
ProjectPrivate::ProjectPrivate() : ProjectPrivate::ProjectPrivate() :
...@@ -301,4 +305,24 @@ QString Project::generatedUiHeader(const QString & /* formFile */) const ...@@ -301,4 +305,24 @@ QString Project::generatedUiHeader(const QString & /* formFile */) const
return QString(); return QString();
} }
void Project::setProjectContext(Core::Context context)
{
d->m_projectContext = context;
}
void Project::setProjectLanguage(Core::Context language)
{
d->m_projectLanguage = language;
}
Core::Context Project::projectContext() const
{
return d->m_projectContext;
}
Core::Context Project::projectLanguage() const
{
return d->m_projectLanguage;
}
} // namespace ProjectExplorer } // namespace ProjectExplorer
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
namespace Core { namespace Core {
class IFile; class IFile;
class Context;
} }
namespace ProjectExplorer { namespace ProjectExplorer {
...@@ -51,7 +52,6 @@ class IProjectManager; ...@@ -51,7 +52,6 @@ class IProjectManager;
class EditorConfiguration; class EditorConfiguration;
class ProjectNode; class ProjectNode;
class Target; class Target;
class ITargetFactory;
class ProjectPrivate; class ProjectPrivate;
class PROJECTEXPLORER_EXPORT Project class PROJECTEXPLORER_EXPORT Project
...@@ -119,6 +119,9 @@ public: ...@@ -119,6 +119,9 @@ public:
QString projectDirectory() const; QString projectDirectory() const;
static QString projectDirectory(const QString &proFile); static QString projectDirectory(const QString &proFile);
virtual Core::Context projectContext() const;
virtual Core::Context projectLanguage() const;
signals: signals:
void fileListChanged(); void fileListChanged();
...@@ -145,6 +148,9 @@ protected: ...@@ -145,6 +148,9 @@ protected:
// Note: Do not forget to call your base class' fromMap method! // Note: Do not forget to call your base class' fromMap method!
virtual bool fromMap(const QVariantMap &map); virtual bool fromMap(const QVariantMap &map);
virtual void setProjectContext(Core::Context context);
virtual void setProjectLanguage(Core::Context language);
private slots: private slots:
void changeEnvironment(); void changeEnvironment();
void changeBuildConfigurationEnabled(); void changeBuildConfigurationEnabled();
......
...@@ -1502,12 +1502,12 @@ void ProjectExplorerPlugin::setCurrent(Project *project, QString filePath, Node ...@@ -1502,12 +1502,12 @@ void ProjectExplorerPlugin::setCurrent(Project *project, QString filePath, Node
Core::Context newContext; Core::Context newContext;
if (d->m_currentProject) { if (d->m_currentProject) {
oldContext.add(d->m_currentProject->projectManager()->projectContext()); oldContext.add(d->m_currentProject->projectContext());
oldContext.add(d->m_currentProject->projectManager()->projectLanguage()); oldContext.add(d->m_currentProject->projectLanguage());
} }
if (project) { if (project) {
newContext.add(project->projectManager()->projectContext()); newContext.add(project->projectContext());
newContext.add(project->projectManager()->projectLanguage()); newContext.add(project->projectLanguage());
} }
core->updateAdditionalContexts(oldContext, newContext); core->updateAdditionalContexts(oldContext, newContext);
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "fileformat/qmlprojectitem.h" #include "fileformat/qmlprojectitem.h"
#include "qmlprojectrunconfiguration.h" #include "qmlprojectrunconfiguration.h"
#include "qmlprojecttarget.h" #include "qmlprojecttarget.h"
#include "qmlprojectconstants.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
...@@ -58,6 +59,9 @@ QmlProject::QmlProject(Internal::Manager *manager, const QString &fileName) ...@@ -58,6 +59,9 @@ QmlProject::QmlProject(Internal::Manager *manager, const QString &fileName)
m_modelManager(ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>()), m_modelManager(ExtensionSystem::PluginManager::instance()->getObject<QmlJS::ModelManagerInterface>()),
m_fileWatcher(new ProjectExplorer::FileWatcher(this)) m_fileWatcher(new ProjectExplorer::FileWatcher(this))
{ {
setProjectContext(Core::Context(QmlProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguage(Core::Context(QmlProjectManager::Constants::LANG_QML));
QFileInfo fileInfo(m_fileName); QFileInfo fileInfo(m_fileName);
m_projectName = fileInfo.completeBaseName(); m_projectName = fileInfo.completeBaseName();
......
...@@ -49,19 +49,8 @@ namespace Internal { ...@@ -49,19 +49,8 @@ namespace Internal {
Manager::Manager() Manager::Manager()
{ {
m_projectContext = Core::Context(QmlProjectManager::Constants::PROJECTCONTEXT);
m_projectLanguage = Core::Context(QmlProjectManager::Constants::LANG_QML);
} }
Manager::~Manager()
{ }
Core::Context Manager::projectContext() const
{ return m_projectContext; }
Core::Context Manager::projectLanguage() const
{ return m_projectLanguage; }
QString Manager::mimeType() const QString Manager::mimeType() const
{ return QLatin1String(Constants::QMLMIMETYPE); } { return QLatin1String(Constants::QMLMIMETYPE); }
......
...@@ -49,10 +49,6 @@ class Manager: public ProjectExplorer::IProjectManager ...@@ -49,10 +49,6 @@ class Manager: public ProjectExplorer::IProjectManager
public: public:
Manager(); Manager();
virtual ~Manager();
virtual Core::Context projectContext() const;
virtual Core::Context projectLanguage() const;
virtual QString mimeType() const; virtual QString mimeType() const;
virtual ProjectExplorer::Project *openProject(const QString &fileName); virtual ProjectExplorer::Project *openProject(const QString &fileName);
...@@ -63,8 +59,6 @@ public: ...@@ -63,8 +59,6 @@ public:
void unregisterProject(QmlProject *project); void unregisterProject(QmlProject *project);
private: private:
Core::Context m_projectContext;
Core::Context m_projectLanguage;
QList<QmlProject *> m_projects; QList<QmlProject *> m_projects;
}; };
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "qmldumptool.h" #include "qmldumptool.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/progressmanager.h>
...@@ -57,6 +58,7 @@ ...@@ -57,6 +58,7 @@
#include <projectexplorer/buildenvironmentwidget.h> #include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/customexecutablerunconfiguration.h> #include <projectexplorer/customexecutablerunconfiguration.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QtCore/QDebug> #include <QtCore/QDebug>
...@@ -261,6 +263,9 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : ...@@ -261,6 +263,9 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
m_asyncUpdateState(NoState), m_asyncUpdateState(NoState),
m_cancelEvaluate(false) m_cancelEvaluate(false)
{ {
setProjectContext(Core::Context(Qt4ProjectManager::Constants::PROJECT_ID));
setProjectLanguage(Core::Context(ProjectExplorer::Constants::LANG_CXX));
m_asyncUpdateTimer.setSingleShot(true); m_asyncUpdateTimer.setSingleShot(true);
m_asyncUpdateTimer.setInterval(3000); m_asyncUpdateTimer.setInterval(3000);
connect(&m_asyncUpdateTimer, SIGNAL(timeout()), this, SLOT(asyncUpdate())); connect(&m_asyncUpdateTimer, SIGNAL(timeout()), this, SLOT(asyncUpdate()));
......
...@@ -203,16 +203,6 @@ void Qt4Manager::uiEditorContentsChanged() ...@@ -203,16 +203,6 @@ void Qt4Manager::uiEditorContentsChanged()
m_dirty = true; m_dirty = true;
} }
Core::Context Qt4Manager::projectContext() const
{
return m_plugin->projectContext();
}
Core::Context Qt4Manager::projectLanguage() const
{
return Core::Context(ProjectExplorer::Constants::LANG_CXX);
}
QString Qt4Manager::mimeType() const QString Qt4Manager::mimeType() const
{ {
return QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE); return QLatin1String(Qt4ProjectManager::Constants::PROFILE_MIMETYPE);
......
...@@ -78,10 +78,6 @@ public: ...@@ -78,10 +78,6 @@ public:
ProjectExplorer::ProjectExplorerPlugin *projectExplorer() const; ProjectExplorer::ProjectExplorerPlugin *projectExplorer() const;
// ProjectExplorer::IProjectManager
Core::Context projectContext() const;
Core::Context projectLanguage() const;
virtual QString mimeType() const; virtual QString mimeType() const;
ProjectExplorer::Project *openProject(const QString &fileName); ProjectExplorer::Project *openProject(const QString &fileName);
......
...@@ -108,7 +108,7 @@ Qt4ProjectManagerPlugin::~Qt4ProjectManagerPlugin() ...@@ -108,7 +108,7 @@ Qt4ProjectManagerPlugin::~Qt4ProjectManagerPlugin()
bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage) bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{ {
Q_UNUSED(arguments) Q_UNUSED(arguments)
m_projectContext = Core::Context(Qt4ProjectManager::Constants::PROJECT_ID); const Core::Context projectContext(Qt4ProjectManager::Constants::PROJECT_ID);
ProFileParser::initialize(); ProFileParser::initialize();
ProFileEvaluator::initialize(); ProFileEvaluator::initialize();
...@@ -199,13 +199,13 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * ...@@ -199,13 +199,13 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
QIcon qmakeIcon(QLatin1String(":/qt4projectmanager/images/run_qmake.png")); QIcon qmakeIcon(QLatin1String(":/qt4projectmanager/images/run_qmake.png"));
qmakeIcon.addFile(QLatin1String(":/qt4projectmanager/images/run_qmake_small.png")); qmakeIcon.addFile(QLatin1String(":/qt4projectmanager/images/run_qmake_small.png"));
m_runQMakeAction = new QAction(qmakeIcon, tr("Run qmake"), this); m_runQMakeAction = new QAction(qmakeIcon, tr("Run qmake"), this);
command = am->registerAction(m_runQMakeAction, Constants::RUNQMAKE, m_projectContext); command = am->registerAction(m_runQMakeAction, Constants::RUNQMAKE, projectContext);
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT); mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
connect(m_runQMakeAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMake())); connect(m_runQMakeAction, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMake()));
m_runQMakeActionContextMenu = new QAction(qmakeIcon, tr("Run qmake"), this); m_runQMakeActionContextMenu = new QAction(qmakeIcon, tr("Run qmake"), this);
command = am->registerAction(m_runQMakeActionContextMenu, Constants::RUNQMAKECONTEXTMENU, m_projectContext); command = am->registerAction(m_runQMakeActionContextMenu, Constants::RUNQMAKECONTEXTMENU, projectContext);
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
...@@ -214,7 +214,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * ...@@ -214,7 +214,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
QIcon buildIcon(ProjectExplorer::Constants::ICON_BUILD); QIcon buildIcon(ProjectExplorer::Constants::ICON_BUILD);
buildIcon.addFile(ProjectExplorer::Constants::ICON_BUILD_SMALL); buildIcon.addFile(ProjectExplorer::Constants::ICON_BUILD_SMALL);
m_buildSubProjectContextMenu = new QAction(buildIcon, tr("Build"), this); m_buildSubProjectContextMenu = new QAction(buildIcon, tr("Build"), this);
command = am->registerAction(m_buildSubProjectContextMenu, Constants::BUILDSUBDIR, m_projectContext); command = am->registerAction(m_buildSubProjectContextMenu, Constants::BUILDSUBDIR, projectContext);
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
connect(m_buildSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildSubDirContextMenu())); connect(m_buildSubProjectContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(buildSubDirContextMenu()));
...@@ -222,7 +222,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * ...@@ -222,7 +222,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
QIcon rebuildIcon(ProjectExplorer::Constants::ICON_REBUILD); QIcon rebuildIcon(ProjectExplorer::Constants::ICON_REBUILD);
rebuildIcon.addFile(ProjectExplorer::Constants::ICON_REBUILD_SMALL); rebuildIcon.addFile(ProjectExplorer::Constants::ICON_REBUILD_SMALL);
m_rebuildSubProjectContextMenu = new QAction(rebuildIcon, tr("Rebuild"), this);