diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2018-11-16 08:52:10 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2018-11-16 09:14:45 +0000 |
commit | f807bbf4c51e67775d8d312999b6decfe2650e3c (patch) | |
tree | be796b625e1861ab5e5d807fa8bbf804cc311c75 /src/libs/utils/outputformatter.cpp | |
parent | bcf879200e66d2eb7883294693198a78762f164c (diff) |
OutputFormatter: Remove unused font objects
They're both default-initialized.
Amends 8dfa9a5dab144797e446b09979be98642403259a.
Change-Id: Ic990bad2a55a18a205d1cd1f696b7c16cf07377e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/libs/utils/outputformatter.cpp')
-rw-r--r-- | src/libs/utils/outputformatter.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/libs/utils/outputformatter.cpp b/src/libs/utils/outputformatter.cpp index ab47485e6e..cb066b6816 100644 --- a/src/libs/utils/outputformatter.cpp +++ b/src/libs/utils/outputformatter.cpp @@ -39,7 +39,6 @@ class OutputFormatterPrivate public: QPlainTextEdit *plainTextEdit = nullptr; QTextCharFormat formats[NumberOfFormats]; - QFont font; QTextCursor cursor; AnsiEscapeCodeHandler escapeCodeHandler; bool overwriteOutput = false; @@ -126,34 +125,27 @@ void OutputFormatter::initFormats() if (!plainTextEdit()) return; - QFont boldFont; - boldFont.setBold(true); - Theme *theme = creatorTheme(); // NormalMessageFormat - d->formats[NormalMessageFormat].setFont(boldFont, QTextCharFormat::FontPropertiesSpecifiedOnly); + d->formats[NormalMessageFormat].setFontWeight(QFont::Bold); d->formats[NormalMessageFormat].setForeground(theme->color(Theme::OutputPanes_NormalMessageTextColor)); // ErrorMessageFormat - d->formats[ErrorMessageFormat].setFont(boldFont, QTextCharFormat::FontPropertiesSpecifiedOnly); + d->formats[ErrorMessageFormat].setFontWeight(QFont::Bold); d->formats[ErrorMessageFormat].setForeground(theme->color(Theme::OutputPanes_ErrorMessageTextColor)); // LogMessageFormat - d->formats[LogMessageFormat].setFont(d->font, QTextCharFormat::FontPropertiesSpecifiedOnly); d->formats[LogMessageFormat].setForeground(theme->color(Theme::OutputPanes_WarningMessageTextColor)); // StdOutFormat - d->formats[StdOutFormat].setFont(d->font, QTextCharFormat::FontPropertiesSpecifiedOnly); d->formats[StdOutFormat].setForeground(theme->color(Theme::OutputPanes_StdOutTextColor)); d->formats[StdOutFormatSameLine] = d->formats[StdOutFormat]; // StdErrFormat - d->formats[StdErrFormat].setFont(d->font, QTextCharFormat::FontPropertiesSpecifiedOnly); d->formats[StdErrFormat].setForeground(theme->color(Theme::OutputPanes_StdErrTextColor)); d->formats[StdErrFormatSameLine] = d->formats[StdErrFormat]; - d->formats[DebugFormat].setFont(d->font, QTextCharFormat::FontPropertiesSpecifiedOnly); d->formats[DebugFormat].setForeground(theme->color(Theme::OutputPanes_DebugTextColor)); } |