forked from qt-creator/qt-creator
Add options to hide and configure main window
These options allow to hide certain main menus and move options to edit. This allows hiding those menus in the Qt Design Studio context. The options are separated so that power users can enable Debug, Analyze and Tools. HideBuild=true HideDebug=true HideAnalyze=true Change-Id: I26758aaa965bb7b61a476d197d82db34e62003b7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -428,6 +428,13 @@ static QIcon interruptIcon(bool toolBarStyle)
|
||||
return toolBarStyle ? iconToolBar : icon;
|
||||
}
|
||||
|
||||
static bool hideAnalyzeMenu()
|
||||
{
|
||||
return Core::ICore::settings()
|
||||
->value(ProjectExplorer::Constants::SETTINGS_MENU_HIDE_ANALYZE, false)
|
||||
.toBool();
|
||||
}
|
||||
|
||||
QAction *addAction(const QObject *parent, QMenu *menu, const QString &display, bool on,
|
||||
const std::function<void()> &onTriggered)
|
||||
{
|
||||
@@ -775,7 +782,8 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
|
||||
|
||||
ActionContainer *menubar = ActionManager::actionContainer(MENU_BAR);
|
||||
ActionContainer *mtools = ActionManager::actionContainer(M_TOOLS);
|
||||
menubar->addMenu(mtools, m_menu);
|
||||
if (!hideAnalyzeMenu())
|
||||
menubar->addMenu(mtools, m_menu);
|
||||
|
||||
m_menu->addSeparator(G_ANALYZER_TOOLS);
|
||||
m_menu->addSeparator(G_ANALYZER_REMOTE_TOOLS);
|
||||
|
||||
Reference in New Issue
Block a user