summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-05-15 15:04:06 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-05-15 13:36:06 +0000
commit09c1c1a354b394ca82d6bb6226921ac415a1a8e8 (patch)
tree0a32d6ec84842252aa5eb700078ccc2bbe281e14 /src/plugins/coreplugin
parent0e4df97f90533b9e8bac3941b5b17b45e4160207 (diff)
downloadqt-creator-09c1c1a354b394ca82d6bb6226921ac415a1a8e8.tar.gz
Core::OutputWindow: Move members into d-pointer
New members were accidentally dumped directly into the class, rather than the private implenmentation. Change-Id: Ie7939534cef1c830ce3925d9cb5e77a48617150b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/coreplugin')
-rw-r--r--src/plugins/coreplugin/outputwindow.cpp26
-rw-r--r--src/plugins/coreplugin/outputwindow.h4
2 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp
index 077b6f406d..19c86c4867 100644
--- a/src/plugins/coreplugin/outputwindow.cpp
+++ b/src/plugins/coreplugin/outputwindow.cpp
@@ -59,6 +59,9 @@ public:
IContext *outputWindowContext = nullptr;
Utils::OutputFormatter *formatter = nullptr;
+ QColor m_highlightBgColor;
+ QColor m_highlightTextColor;
+ QString m_settingsKey;
bool enforceNewline = false;
bool scrollToBottom = true;
@@ -79,7 +82,6 @@ public:
OutputWindow::OutputWindow(Context context, const QString &settingsKey, QWidget *parent)
: QPlainTextEdit(parent)
- , m_settingsKey(settingsKey)
, d(new Internal::OutputWindowPrivate(document()))
{
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
@@ -88,6 +90,8 @@ OutputWindow::OutputWindow(Context context, const QString &settingsKey, QWidget
setMouseTracking(true);
setUndoRedoEnabled(false);
+ d->m_settingsKey = settingsKey;
+
d->outputWindowContext = new IContext;
d->outputWindowContext->setContext(context);
d->outputWindowContext->setWidget(this);
@@ -119,8 +123,8 @@ OutputWindow::OutputWindow(Context context, const QString &settingsKey, QWidget
connect(this, &QPlainTextEdit::copyAvailable, cutAction, &QAction::setEnabled); // OutputWindow never read-only
connect(this, &QPlainTextEdit::copyAvailable, copyAction, &QAction::setEnabled);
connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested, this, [this] {
- if (!m_settingsKey.isEmpty())
- Core::ICore::settings()->setValue(m_settingsKey, fontZoom());
+ if (!d->m_settingsKey.isEmpty())
+ Core::ICore::settings()->setValue(d->m_settingsKey, fontZoom());
});
undoAction->setEnabled(false);
@@ -136,8 +140,8 @@ OutputWindow::OutputWindow(Context context, const QString &settingsKey, QWidget
d->m_originalFontSize = font().pointSizeF();
- if (!m_settingsKey.isEmpty()) {
- float zoom = Core::ICore::settings()->value(m_settingsKey).toFloat();
+ if (!d->m_settingsKey.isEmpty()) {
+ float zoom = Core::ICore::settings()->value(d->m_settingsKey).toFloat();
setFontZoom(zoom);
}
}
@@ -270,12 +274,12 @@ void OutputWindow::setWheelZoomEnabled(bool enabled)
void OutputWindow::setHighlightBgColor(const QColor &bgColor)
{
- m_highlightBgColor = bgColor;
+ d->m_highlightBgColor = bgColor;
}
void OutputWindow::setHighlightTextColor(const QColor &textColor)
{
- m_highlightTextColor = textColor;
+ d->m_highlightTextColor = textColor;
}
QString OutputWindow::filterText() const
@@ -294,10 +298,10 @@ void OutputWindow::setFilterText(const QString &filterText)
d->formatter->plainTextEdit()->setPalette({});
} else {
QPalette pal;
- pal.setColor(QPalette::Active, QPalette::Base, m_highlightBgColor);
- pal.setColor(QPalette::Inactive, QPalette::Base, m_highlightBgColor.darker(120));
- pal.setColor(QPalette::Active, QPalette::Text, m_highlightTextColor);
- pal.setColor(QPalette::Inactive, QPalette::Text, m_highlightTextColor.darker(120));
+ pal.setColor(QPalette::Active, QPalette::Base, d->m_highlightBgColor);
+ pal.setColor(QPalette::Inactive, QPalette::Base, d->m_highlightBgColor.darker(120));
+ pal.setColor(QPalette::Active, QPalette::Text, d->m_highlightTextColor);
+ pal.setColor(QPalette::Inactive, QPalette::Text, d->m_highlightTextColor.darker(120));
d->formatter->plainTextEdit()->setPalette(pal);
}
diff --git a/src/plugins/coreplugin/outputwindow.h b/src/plugins/coreplugin/outputwindow.h
index 34ce261098..f3e9360786 100644
--- a/src/plugins/coreplugin/outputwindow.h
+++ b/src/plugins/coreplugin/outputwindow.h
@@ -112,10 +112,6 @@ private:
QString doNewlineEnforcement(const QString &out);
void filterNewContent();
- QColor m_highlightBgColor;
- QColor m_highlightTextColor;
- const QString m_settingsKey;
-
Internal::OutputWindowPrivate *d;
};