Skip to content
Snippets Groups Projects
Commit a809dfde authored by dt's avatar dt
Browse files

Hide the Run QMake command from the context menu for non qt projects.

parent 65648ee1
No related branches found
No related tags found
No related merge requests found
...@@ -184,6 +184,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString * ...@@ -184,6 +184,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
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, context); command = am->registerAction(m_runQMakeActionContextMenu, Constants::RUNQMAKECONTEXTMENU, context);
command->setAttribute(Core::Command::CA_Hide);
mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
connect(m_runQMakeActionContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMakeContextMenu())); connect(m_runQMakeActionContextMenu, SIGNAL(triggered()), m_qt4ProjectManager, SLOT(runQMakeContextMenu()));
...@@ -215,6 +216,8 @@ void Qt4ProjectManagerPlugin::updateContextMenu(Project *project, ...@@ -215,6 +216,8 @@ void Qt4ProjectManagerPlugin::updateContextMenu(Project *project,
m_runQMakeActionContextMenu->setVisible(true); m_runQMakeActionContextMenu->setVisible(true);
if (!m_projectExplorer->buildManager()->isBuilding(project)) if (!m_projectExplorer->buildManager()->isBuilding(project))
m_runQMakeActionContextMenu->setEnabled(true); m_runQMakeActionContextMenu->setEnabled(true);
} else {
m_runQMakeActionContextMenu->setVisible(false);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment