forked from qt-creator/qt-creator
ProjectExplorer: Remove arguments from node change signals
This discourages storing the pointers needlessly. The items are still easy accessible by the static ProjectTree::currentNode() Change-Id: I3c0cd019e9fdc382afacbc9d9de3b97d5f58ae1e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -315,8 +315,10 @@ void QmakeProjectManagerPlugin::updateRunQMakeAction()
|
||||
m_runQMakeAction->setEnabled(enable);
|
||||
}
|
||||
|
||||
void QmakeProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node, ProjectExplorer::Project *project)
|
||||
void QmakeProjectManagerPlugin::updateContextActions()
|
||||
{
|
||||
Node *node = ProjectTree::currentNode();
|
||||
Project *project = ProjectTree::currentProject();
|
||||
m_addLibraryActionContextMenu->setEnabled(dynamic_cast<QmakeProFileNode *>(node));
|
||||
|
||||
auto proFileNode = dynamic_cast<QmakeProFileNode *>(node);
|
||||
@@ -377,10 +379,9 @@ void QmakeProjectManagerPlugin::updateContextActions(ProjectExplorer::Node *node
|
||||
|
||||
void QmakeProjectManagerPlugin::buildStateChanged(ProjectExplorer::Project *pro)
|
||||
{
|
||||
ProjectExplorer::Project *currentProject = ProjectTree::currentProject();
|
||||
if (pro == currentProject) {
|
||||
if (pro == ProjectTree::currentProject()) {
|
||||
updateRunQMakeAction();
|
||||
updateContextActions(ProjectTree::currentNode(), pro);
|
||||
updateContextActions();
|
||||
updateBuildFileAction();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user