forked from qt-creator/qt-creator
Fix various context menu actions from project managers
The correct pattern is this: The actions in the build menu are supposed to be for the startup project. They should use the global context and be manually hidden/shown if the startup project changes. This fixes a crash on assigning keyboard shortcut to the edit files context menu action. The slot connected assumed that the action could only be triggered via the context menu. By using ProjectTree;:currentProject() the code now works even if the project tree is not actually focused. It also fixes that the "Run CMake" action was shown even in the build menu, even though a non cmake project was the startup project. Change-Id: I0bb8086d8b1078b4c71c3b5ba9d7f8596757e724 Task-number: QTCREATORBUG-14728 Task-number: QTCREATORBUG-14768 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -50,8 +50,6 @@ class GenericProjectPlugin : public ExtensionSystem::IPlugin
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "GenericProjectManager.json")
|
||||
|
||||
public:
|
||||
GenericProjectPlugin();
|
||||
|
||||
bool initialize(const QStringList &arguments, QString *errorString);
|
||||
void extensionsInitialized() {}
|
||||
|
||||
@@ -64,9 +62,6 @@ private slots:
|
||||
void test_mixed1();
|
||||
void test_mixed2();
|
||||
#endif // WITH_TESTS
|
||||
|
||||
private:
|
||||
ProjectExplorer::Project *m_contextMenuProject;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user