ProjectExplorer: Fix typo in variable name

Copy-pasted in 2 other plugins.

Change-Id: I1a76ce7490505f43e2d5fe0fe4cc57d480607db9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Orgad Shaneh
2019-09-23 18:20:08 +03:00
committed by Orgad Shaneh
parent 2249765041
commit 76c0149ceb
3 changed files with 38 additions and 38 deletions

View File

@@ -114,7 +114,7 @@ ModelsManager::ModelsManager(QObject *parent)
this, &ModelsManager::onOpenDefaultModel, Qt::QueuedConnection); this, &ModelsManager::onOpenDefaultModel, Qt::QueuedConnection);
#endif #endif
Core::Context projecTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE); Core::Context projectTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE);
Core::ActionContainer *folderContainer = Core::ActionManager::actionContainer( Core::ActionContainer *folderContainer = Core::ActionManager::actionContainer(
ProjectExplorer::Constants::M_FOLDERCONTEXT); ProjectExplorer::Constants::M_FOLDERCONTEXT);
folderContainer->insertGroup(ProjectExplorer::Constants::G_FOLDER_FILES, folderContainer->insertGroup(ProjectExplorer::Constants::G_FOLDER_FILES,
@@ -122,7 +122,7 @@ ModelsManager::ModelsManager(QObject *parent)
d->openDiagramContextMenuItem = new QAction(tr("Open Diagram"), this); d->openDiagramContextMenuItem = new QAction(tr("Open Diagram"), this);
Core::Command *cmd = Core::ActionManager::registerAction( Core::Command *cmd = Core::ActionManager::registerAction(
d->openDiagramContextMenuItem, Constants::ACTION_EXPLORER_OPEN_DIAGRAM, d->openDiagramContextMenuItem, Constants::ACTION_EXPLORER_OPEN_DIAGRAM,
projecTreeContext); projectTreeContext);
folderContainer->addAction(cmd, Constants::EXPLORER_GROUP_MODELING); folderContainer->addAction(cmd, Constants::EXPLORER_GROUP_MODELING);
connect(d->openDiagramContextMenuItem, &QAction::triggered, connect(d->openDiagramContextMenuItem, &QAction::triggered,
this, &ModelsManager::onOpenDiagramFromProjectExplorer); this, &ModelsManager::onOpenDiagramFromProjectExplorer);

View File

@@ -721,7 +721,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_proWindow = new ProjectWindow; dd->m_proWindow = new ProjectWindow;
Context projecTreeContext(Constants::C_PROJECT_TREE); Context projectTreeContext(Constants::C_PROJECT_TREE);
dd->m_projectsMode.setWidget(dd->m_proWindow); dd->m_projectsMode.setWidget(dd->m_proWindow);
dd->m_projectsMode.setEnabled(false); dd->m_projectsMode.setEnabled(false);
@@ -885,11 +885,11 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
Command *cmd; Command *cmd;
msessionContextMenu->addSeparator(projecTreeContext, Constants::G_SESSION_REBUILD); msessionContextMenu->addSeparator(projectTreeContext, Constants::G_SESSION_REBUILD);
msessionContextMenu->addSeparator(projecTreeContext, Constants::G_SESSION_FILES); msessionContextMenu->addSeparator(projectTreeContext, Constants::G_SESSION_FILES);
mprojectContextMenu->addSeparator(projecTreeContext, Constants::G_PROJECT_FILES); mprojectContextMenu->addSeparator(projectTreeContext, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addSeparator(projecTreeContext, Constants::G_PROJECT_FILES); msubProjectContextMenu->addSeparator(projectTreeContext, Constants::G_PROJECT_FILES);
mfile->addSeparator(Core::Constants::G_FILE_PROJECT); mfile->addSeparator(Core::Constants::G_FILE_PROJECT);
mbuild->addSeparator(Constants::G_BUILD_REBUILD); mbuild->addSeparator(Constants::G_BUILD_REBUILD);
msessionContextMenu->addSeparator(Constants::G_SESSION_OTHER); msessionContextMenu->addSeparator(Constants::G_SESSION_OTHER);
@@ -917,11 +917,11 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// Default open action // Default open action
dd->m_openFileAction = new QAction(tr("Open File"), this); dd->m_openFileAction = new QAction(tr("Open File"), this);
cmd = ActionManager::registerAction(dd->m_openFileAction, Constants::OPENFILE, cmd = ActionManager::registerAction(dd->m_openFileAction, Constants::OPENFILE,
projecTreeContext); projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
dd->m_searchOnFileSystem = new QAction(FileUtils::msgFindInDirectory(), this); dd->m_searchOnFileSystem = new QAction(FileUtils::msgFindInDirectory(), this);
cmd = ActionManager::registerAction(dd->m_searchOnFileSystem, Constants::SEARCHONFILESYSTEM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_searchOnFileSystem, Constants::SEARCHONFILESYSTEM, projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_CONFIG); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_CONFIG);
@@ -930,14 +930,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_showInGraphicalShell = new QAction(FileUtils::msgGraphicalShellAction(), this); dd->m_showInGraphicalShell = new QAction(FileUtils::msgGraphicalShellAction(), this);
cmd = ActionManager::registerAction(dd->m_showInGraphicalShell, Constants::SHOWINGRAPHICALSHELL, cmd = ActionManager::registerAction(dd->m_showInGraphicalShell, Constants::SHOWINGRAPHICALSHELL,
projecTreeContext); projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
// Open Terminal Here menu // Open Terminal Here menu
dd->m_openTerminalHere = new QAction(FileUtils::msgTerminalHereAction(), this); dd->m_openTerminalHere = new QAction(FileUtils::msgTerminalHereAction(), this);
cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE, cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE,
projecTreeContext); projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN); mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
@@ -949,12 +949,12 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_openTerminalHereRunEnv = new QAction(tr("Run Environment"), this); dd->m_openTerminalHereRunEnv = new QAction(tr("Run Environment"), this);
cmd = ActionManager::registerAction(dd->m_openTerminalHereBuildEnv, cmd = ActionManager::registerAction(dd->m_openTerminalHereBuildEnv,
"ProjectExplorer.OpenTerminalHereBuildEnv", "ProjectExplorer.OpenTerminalHereBuildEnv",
projecTreeContext); projectTreeContext);
dd->m_openTerminalMenu->addAction(dd->m_openTerminalHereBuildEnv); dd->m_openTerminalMenu->addAction(dd->m_openTerminalHereBuildEnv);
cmd = ActionManager::registerAction(dd->m_openTerminalHereRunEnv, cmd = ActionManager::registerAction(dd->m_openTerminalHereRunEnv,
"ProjectExplorer.OpenTerminalHereRunEnv", "ProjectExplorer.OpenTerminalHereRunEnv",
projecTreeContext); projectTreeContext);
dd->m_openTerminalMenu->addAction(dd->m_openTerminalHereRunEnv); dd->m_openTerminalMenu->addAction(dd->m_openTerminalHereRunEnv);
// Open With menu // Open With menu
@@ -1120,37 +1120,37 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// build action with dependencies (context menu) // build action with dependencies (context menu)
dd->m_buildDependenciesActionContextMenu = new QAction(tr("Build"), this); dd->m_buildDependenciesActionContextMenu = new QAction(tr("Build"), this);
cmd = ActionManager::registerAction(dd->m_buildDependenciesActionContextMenu, Constants::BUILDDEPENDCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_buildDependenciesActionContextMenu, Constants::BUILDDEPENDCM, projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD);
// build action (context menu) // build action (context menu)
dd->m_buildActionContextMenu = new QAction(tr("Build Without Dependencies"), this); dd->m_buildActionContextMenu = new QAction(tr("Build Without Dependencies"), this);
cmd = ActionManager::registerAction(dd->m_buildActionContextMenu, Constants::BUILDCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_buildActionContextMenu, Constants::BUILDCM, projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_BUILD);
// rebuild action with dependencies (context menu) // rebuild action with dependencies (context menu)
dd->m_rebuildDependenciesActionContextMenu = new QAction(tr("Rebuild"), this); dd->m_rebuildDependenciesActionContextMenu = new QAction(tr("Rebuild"), this);
cmd = ActionManager::registerAction(dd->m_rebuildDependenciesActionContextMenu, Constants::REBUILDDEPENDCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_rebuildDependenciesActionContextMenu, Constants::REBUILDDEPENDCM, projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD);
// rebuild action (context menu) // rebuild action (context menu)
dd->m_rebuildActionContextMenu = new QAction(tr("Rebuild Without Dependencies"), this); dd->m_rebuildActionContextMenu = new QAction(tr("Rebuild Without Dependencies"), this);
cmd = ActionManager::registerAction(dd->m_rebuildActionContextMenu, Constants::REBUILDCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_rebuildActionContextMenu, Constants::REBUILDCM, projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD);
// clean action with dependencies (context menu) // clean action with dependencies (context menu)
dd->m_cleanDependenciesActionContextMenu = new QAction(tr("Clean"), this); dd->m_cleanDependenciesActionContextMenu = new QAction(tr("Clean"), this);
cmd = ActionManager::registerAction(dd->m_cleanDependenciesActionContextMenu, Constants::CLEANDEPENDCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_cleanDependenciesActionContextMenu, Constants::CLEANDEPENDCM, projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD);
// clean action (context menu) // clean action (context menu)
dd->m_cleanActionContextMenu = new QAction(tr("Clean Without Dependencies"), this); dd->m_cleanActionContextMenu = new QAction(tr("Clean Without Dependencies"), this);
cmd = ActionManager::registerAction(dd->m_cleanActionContextMenu, Constants::CLEANCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_cleanActionContextMenu, Constants::CLEANCM, projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_REBUILD);
@@ -1172,18 +1172,18 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// deploy action (context menu) // deploy action (context menu)
dd->m_deployActionContextMenu = new QAction(tr("Deploy"), this); dd->m_deployActionContextMenu = new QAction(tr("Deploy"), this);
cmd = ActionManager::registerAction(dd->m_deployActionContextMenu, Constants::DEPLOYCM, projecTreeContext); cmd = ActionManager::registerAction(dd->m_deployActionContextMenu, Constants::DEPLOYCM, projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_RUN); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_RUN);
dd->m_runActionContextMenu = new QAction(runIcon, tr("Run"), this); dd->m_runActionContextMenu = new QAction(runIcon, tr("Run"), this);
cmd = ActionManager::registerAction(dd->m_runActionContextMenu, Constants::RUNCONTEXTMENU, projecTreeContext); cmd = ActionManager::registerAction(dd->m_runActionContextMenu, Constants::RUNCONTEXTMENU, projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_RUN); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_RUN);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_RUN); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_RUN);
// add new file action // add new file action
dd->m_addNewFileAction = new QAction(this); dd->m_addNewFileAction = new QAction(this);
cmd = ActionManager::registerAction(dd->m_addNewFileAction, Constants::ADDNEWFILE, cmd = ActionManager::registerAction(dd->m_addNewFileAction, Constants::ADDNEWFILE,
projecTreeContext); projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
@@ -1191,7 +1191,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// add existing file action // add existing file action
dd->m_addExistingFilesAction = new QAction(tr("Add Existing Files..."), this); dd->m_addExistingFilesAction = new QAction(tr("Add Existing Files..."), this);
cmd = ActionManager::registerAction(dd->m_addExistingFilesAction, Constants::ADDEXISTINGFILES, cmd = ActionManager::registerAction(dd->m_addExistingFilesAction, Constants::ADDEXISTINGFILES,
projecTreeContext); projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
@@ -1199,7 +1199,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// add existing projects action // add existing projects action
dd->m_addExistingProjectsAction = new QAction(tr("Add Existing Projects..."), this); dd->m_addExistingProjectsAction = new QAction(tr("Add Existing Projects..."), this);
cmd = ActionManager::registerAction(dd->m_addExistingProjectsAction, cmd = ActionManager::registerAction(dd->m_addExistingProjectsAction,
"ProjectExplorer.AddExistingProjects", projecTreeContext); "ProjectExplorer.AddExistingProjects", projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
@@ -1207,7 +1207,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_addExistingDirectoryAction = new QAction(tr("Add Existing Directory..."), this); dd->m_addExistingDirectoryAction = new QAction(tr("Add Existing Directory..."), this);
cmd = ActionManager::registerAction(dd->m_addExistingDirectoryAction, cmd = ActionManager::registerAction(dd->m_addExistingDirectoryAction,
Constants::ADDEXISTINGDIRECTORY, Constants::ADDEXISTINGDIRECTORY,
projecTreeContext); projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES); mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
@@ -1215,7 +1215,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// new subproject action // new subproject action
dd->m_addNewSubprojectAction = new QAction(tr("New Subproject..."), this); dd->m_addNewSubprojectAction = new QAction(tr("New Subproject..."), this);
cmd = ActionManager::registerAction(dd->m_addNewSubprojectAction, Constants::ADDNEWSUBPROJECT, cmd = ActionManager::registerAction(dd->m_addNewSubprojectAction, Constants::ADDNEWSUBPROJECT,
projecTreeContext); projectTreeContext);
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
@@ -1239,45 +1239,45 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// file properties action // file properties action
dd->m_filePropertiesAction = new QAction(tr("Properties..."), this); dd->m_filePropertiesAction = new QAction(tr("Properties..."), this);
cmd = ActionManager::registerAction(dd->m_filePropertiesAction, Constants::FILEPROPERTIES, cmd = ActionManager::registerAction(dd->m_filePropertiesAction, Constants::FILEPROPERTIES,
projecTreeContext); projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
// remove file action // remove file action
dd->m_removeFileAction = new QAction(this); dd->m_removeFileAction = new QAction(this);
cmd = ActionManager::registerAction(dd->m_removeFileAction, Constants::REMOVEFILE, cmd = ActionManager::registerAction(dd->m_removeFileAction, Constants::REMOVEFILE,
projecTreeContext); projectTreeContext);
cmd->setDefaultKeySequence(QKeySequence::Delete); cmd->setDefaultKeySequence(QKeySequence::Delete);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
// duplicate file action // duplicate file action
dd->m_duplicateFileAction = new QAction(tr("Duplicate File..."), this); dd->m_duplicateFileAction = new QAction(tr("Duplicate File..."), this);
cmd = ActionManager::registerAction(dd->m_duplicateFileAction, Constants::DUPLICATEFILE, cmd = ActionManager::registerAction(dd->m_duplicateFileAction, Constants::DUPLICATEFILE,
projecTreeContext); projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
//: Remove project from parent profile (Project explorer view); will not physically delete any files. //: Remove project from parent profile (Project explorer view); will not physically delete any files.
dd->m_removeProjectAction = new QAction(tr("Remove Project..."), this); dd->m_removeProjectAction = new QAction(tr("Remove Project..."), this);
cmd = ActionManager::registerAction(dd->m_removeProjectAction, Constants::REMOVEPROJECT, cmd = ActionManager::registerAction(dd->m_removeProjectAction, Constants::REMOVEPROJECT,
projecTreeContext); projectTreeContext);
msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES); msubProjectContextMenu->addAction(cmd, Constants::G_PROJECT_FILES);
// delete file action // delete file action
dd->m_deleteFileAction = new QAction(tr("Delete File..."), this); dd->m_deleteFileAction = new QAction(tr("Delete File..."), this);
cmd = ActionManager::registerAction(dd->m_deleteFileAction, Constants::DELETEFILE, cmd = ActionManager::registerAction(dd->m_deleteFileAction, Constants::DELETEFILE,
projecTreeContext); projectTreeContext);
cmd->setDefaultKeySequence(QKeySequence::Delete); cmd->setDefaultKeySequence(QKeySequence::Delete);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
// renamefile action // renamefile action
dd->m_renameFileAction = new QAction(this); dd->m_renameFileAction = new QAction(this);
cmd = ActionManager::registerAction(dd->m_renameFileAction, Constants::RENAMEFILE, cmd = ActionManager::registerAction(dd->m_renameFileAction, Constants::RENAMEFILE,
projecTreeContext); projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
// diff file action // diff file action
dd->m_diffFileAction = TextEditor::TextDocument::createDiffAgainstCurrentFileAction( dd->m_diffFileAction = TextEditor::TextDocument::createDiffAgainstCurrentFileAction(
this, &ProjectTree::currentFilePath); this, &ProjectTree::currentFilePath);
cmd = ActionManager::registerAction(dd->m_diffFileAction, Constants::DIFFFILE, projecTreeContext); cmd = ActionManager::registerAction(dd->m_diffFileAction, Constants::DIFFFILE, projectTreeContext);
mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER); mfileContextMenu->addAction(cmd, Constants::G_FILE_OTHER);
// Not yet used by anyone, so hide for now // Not yet used by anyone, so hide for now
@@ -1290,7 +1290,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
tr("Set \"%1\" as Active Project"), tr("Set \"%1\" as Active Project"),
Utils::ParameterAction::AlwaysEnabled, this); Utils::ParameterAction::AlwaysEnabled, this);
cmd = ActionManager::registerAction(dd->m_setStartupProjectAction, Constants::SETSTARTUP, cmd = ActionManager::registerAction(dd->m_setStartupProjectAction, Constants::SETSTARTUP,
projecTreeContext); projectTreeContext);
cmd->setAttribute(Command::CA_UpdateText); cmd->setAttribute(Command::CA_UpdateText);
cmd->setDescription(dd->m_setStartupProjectAction->text()); cmd->setDescription(dd->m_setStartupProjectAction->text());
mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FIRST); mprojectContextMenu->addAction(cmd, Constants::G_PROJECT_FIRST);
@@ -1300,11 +1300,11 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd->m_projectTreeCollapseAllAction = new QAction(tr("Collapse All"), this); dd->m_projectTreeCollapseAllAction = new QAction(tr("Collapse All"), this);
Command * const collapseCmd = ActionManager::registerAction( Command * const collapseCmd = ActionManager::registerAction(
dd->m_projectTreeCollapseAllAction, Constants::PROJECTTREE_COLLAPSE_ALL, dd->m_projectTreeCollapseAllAction, Constants::PROJECTTREE_COLLAPSE_ALL,
projecTreeContext); projectTreeContext);
dd->m_projectTreeExpandAllAction = new QAction(tr("Expand All"), this); dd->m_projectTreeExpandAllAction = new QAction(tr("Expand All"), this);
Command * const expandCmd = ActionManager::registerAction( Command * const expandCmd = ActionManager::registerAction(
dd->m_projectTreeExpandAllAction, Constants::PROJECTTREE_EXPAND_ALL, dd->m_projectTreeExpandAllAction, Constants::PROJECTTREE_EXPAND_ALL,
projecTreeContext); projectTreeContext);
for (Core::ActionContainer * const ac : {mfileContextMenu, msubProjectContextMenu, for (Core::ActionContainer * const ac : {mfileContextMenu, msubProjectContextMenu,
mfolderContextMenu, mprojectContextMenu, msessionContextMenu}) { mfolderContextMenu, mprojectContextMenu, msessionContextMenu}) {
ac->addSeparator(treeGroup); ac->addSeparator(treeGroup);

View File

@@ -135,7 +135,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString
Q_UNUSED(arguments) Q_UNUSED(arguments)
Q_UNUSED(errorMessage) Q_UNUSED(errorMessage)
const Context projectContext(QmakeProjectManager::Constants::QMAKEPROJECT_ID); const Context projectContext(QmakeProjectManager::Constants::QMAKEPROJECT_ID);
Context projecTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE); Context projectTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE);
d = new QmakeProjectManagerPluginPrivate; d = new QmakeProjectManagerPluginPrivate;
@@ -280,7 +280,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString
d->m_addLibraryActionContextMenu = new QAction(tr("Add Library..."), this); d->m_addLibraryActionContextMenu = new QAction(tr("Add Library..."), this);
command = ActionManager::registerAction(d->m_addLibraryActionContextMenu, command = ActionManager::registerAction(d->m_addLibraryActionContextMenu,
Constants::ADDLIBRARY, projecTreeContext); Constants::ADDLIBRARY, projectTreeContext);
connect(d->m_addLibraryActionContextMenu, &QAction::triggered, connect(d->m_addLibraryActionContextMenu, &QAction::triggered,
&d->qmakeProjectManager, &QmakeManager::addLibraryContextMenu); &d->qmakeProjectManager, &QmakeManager::addLibraryContextMenu);
mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES); mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES);