forked from qt-creator/qt-creator
Add option to hide tools
This allows hiding the tools menu by default. Power users can enable it again. Change-Id: I5465f0c525bb5b4954e13cb42a941ac8b6b7cf37 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -112,6 +112,10 @@ static const char openFromDeviceDialogKey[] = "OpenFromDeviceDialog";
|
||||
|
||||
static const bool askBeforeExitDefault = false;
|
||||
|
||||
static bool hideToolsMenu()
|
||||
{
|
||||
return Core::ICore::settings()->value(Constants::SETTINGS_MENU_HIDE_TOOLS, false).toBool();
|
||||
}
|
||||
|
||||
enum { debugMainWindow = 0 };
|
||||
|
||||
@@ -498,7 +502,10 @@ void MainWindow::registerDefaultContainers()
|
||||
|
||||
// Tools Menu
|
||||
ActionContainer *ac = ActionManager::createMenu(Constants::M_TOOLS);
|
||||
menubar->addMenu(ac, Constants::G_TOOLS);
|
||||
ac->setParent(this);
|
||||
if (!hideToolsMenu())
|
||||
menubar->addMenu(ac, Constants::G_TOOLS);
|
||||
|
||||
ac->menu()->setTitle(tr("&Tools"));
|
||||
|
||||
// Window Menu
|
||||
|
||||
Reference in New Issue
Block a user