ProjectExplorer: Introduce dedicated output settings pages

One page for application output, one for build output. The respective
settings are now easier to find, and the general Build & Run settings
page looks more tidy now. We will also be able to link directly to the
respective settings from some button in the output panes in the future.
As a side effect, this patch also introduces a dedicated "word-wrap
output" setting for the compile output pane. It used to share this
setting with the application output pane, which was not obvious and
might not be what the user wants.

Change-Id: I5629363863ffe38e0faa006d361ec21484b593f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2019-03-01 15:18:40 +01:00
parent 6eb233ad12
commit 0978901b73
13 changed files with 446 additions and 314 deletions

View File

@@ -26,10 +26,13 @@
#pragma once
#include "buildstep.h"
#include "projectexplorersettings.h"
#include <coreplugin/dialogs/ioptionspage.h>
#include <coreplugin/ioutputpane.h>
#include <QHash>
#include <QPair>
#include <QPointer>
QT_BEGIN_NAMESPACE
class QPlainTextEdit;
@@ -81,7 +84,12 @@ public:
void flush();
const CompileOutputSettings &settings() const { return m_settings; }
void setSettings(const CompileOutputSettings &settings);
private:
void loadSettings();
void storeSettings() const;
void updateFromSettings();
void updateZoomEnabled();
@@ -92,6 +100,23 @@ private:
QToolButton *m_zoomInButton;
QToolButton *m_zoomOutButton;
Utils::OutputFormatter *m_formatter;
CompileOutputSettings m_settings;
};
class CompileOutputSettingsPage : public Core::IOptionsPage
{
Q_OBJECT
public:
CompileOutputSettingsPage();
private:
QWidget *widget() override;
void apply() override;
void finish() override;
class SettingsWidget;
QPointer<SettingsWidget> m_widget;
};
} // namespace Internal