forked from qt-creator/qt-creator
Qmake: Fix Build File (context) menu for non-source files
Enable Build File for source or header files only and de-duplicate the corresponding code. Before, the menus were incorrectly enabled for e.g. .pro and .ui files also: While the menu was already hidden for these non-source files in updateContextActions(), the following call to updateBuildFileAction() did enable it again. Task-number: QTCREATORBUG-19098 Change-Id: I87f40e64ab044b33be9c465d1c5dfa36c3cf1260 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
46a5133f4b
commit
6221746466
@@ -36,7 +36,10 @@ namespace ProjectExplorer {
|
||||
class Project;
|
||||
class Target;
|
||||
}
|
||||
namespace Utils { class ParameterAction; }
|
||||
namespace Utils {
|
||||
class FileName;
|
||||
class ParameterAction;
|
||||
}
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
|
||||
@@ -70,6 +73,8 @@ private:
|
||||
void updateContextActions();
|
||||
void buildStateChanged(ProjectExplorer::Project *pro);
|
||||
void updateBuildFileAction();
|
||||
void disableBuildFileMenus();
|
||||
void enableBuildFileMenus(const Utils::FileName &file);
|
||||
|
||||
QmakeManager *m_qmakeProjectManager = nullptr;
|
||||
QmakeProject *m_previousStartupProject = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user