diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-03-12 10:18:14 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-04-04 10:44:31 +0000 |
commit | 14bffd2c88eecfd9539468f7ffdd0baf03206887 (patch) | |
tree | 30ca15fa634adee5190f39554ef41ab6c8b4f4d3 /src/plugins/projectexplorer/compileoutputwindow.cpp | |
parent | fecf863b78016883cfe13ec930a24fd8df37c561 (diff) | |
download | qt-creator-14bffd2c88eecfd9539468f7ffdd0baf03206887.tar.gz |
ProjectExplorer: Add settings icon to app and compile output panes
This provides a natural shortcut to the respective options page.
Change-Id: I1e57c64d1541540cb1c0c44c6fb8eaad69fc2e32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/compileoutputwindow.cpp')
-rw-r--r-- | src/plugins/projectexplorer/compileoutputwindow.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp index 305d6ca6e2..cd633054c7 100644 --- a/src/plugins/projectexplorer/compileoutputwindow.cpp +++ b/src/plugins/projectexplorer/compileoutputwindow.cpp @@ -66,6 +66,7 @@ const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput"; const char POP_UP_KEY[] = "ProjectExplorer/Settings/ShowCompilerOutput"; const char WRAP_OUTPUT_KEY[] = "ProjectExplorer/Settings/WrapBuildOutput"; const char MAX_LINES_KEY[] = "ProjectExplorer/Settings/MaxBuildOutputLines"; +const char OPTIONS_PAGE_ID[] = "C.ProjectExplorer.CompileOutputOptions"; } namespace ProjectExplorer { @@ -159,6 +160,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) : m_cancelBuildButton(new QToolButton), m_zoomInButton(new QToolButton), m_zoomOutButton(new QToolButton), + m_settingsButton(new QToolButton), m_formatter(new Utils::OutputFormatter) { Core::Context context(C_COMPILE_OUTPUT); @@ -187,6 +189,8 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) : m_zoomInButton->setIcon(Utils::Icons::PLUS_TOOLBAR.icon()); m_zoomOutButton->setToolTip(tr("Decrease Font Size")); m_zoomOutButton->setIcon(Utils::Icons::MINUS.icon()); + m_settingsButton->setToolTip(tr("Open Settings Page")); + m_settingsButton->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon()); updateZoomEnabled(); @@ -198,6 +202,9 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) : this, [this]() { m_outputWindow->zoomIn(1); }); connect(m_zoomOutButton, &QToolButton::clicked, this, [this]() { m_outputWindow->zoomOut(1); }); + connect(m_settingsButton, &QToolButton::clicked, this, [] { + Core::ICore::showOptionsDialog(OPTIONS_PAGE_ID); + }); auto agg = new Aggregation::Aggregate; agg->add(m_outputWindow); @@ -218,6 +225,7 @@ CompileOutputWindow::~CompileOutputWindow() delete m_cancelBuildButton; delete m_zoomInButton; delete m_zoomOutButton; + delete m_settingsButton; delete m_formatter; } @@ -259,7 +267,7 @@ QWidget *CompileOutputWindow::outputWidget(QWidget *) QList<QWidget *> CompileOutputWindow::toolBarWidgets() const { - return {m_cancelBuildButton, m_zoomInButton, m_zoomOutButton}; + return {m_cancelBuildButton, m_zoomInButton, m_zoomOutButton, m_settingsButton}; } void CompileOutputWindow::appendText(const QString &text, BuildStep::OutputFormat format) @@ -432,7 +440,7 @@ private: CompileOutputSettingsPage::CompileOutputSettingsPage() { - setId("C.ProjectExplorer.CompileOutputOptions"); + setId(OPTIONS_PAGE_ID); setDisplayName(tr("Compile Output")); setCategory(Constants::BUILD_AND_RUN_SETTINGS_CATEGORY); } |