aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/texteditorsettings.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2018-10-11 14:19:54 +0200
committerMarco Bubke <marco.bubke@qt.io>2018-10-11 12:48:26 +0000
commitf2bd50c466e71c2cb6b6c9e2a789a6d97578eaa2 (patch)
tree3729a3ad704aec2cea4d02666f467e190113180a /src/plugins/texteditor/texteditorsettings.cpp
parent352ac2ccf404dc0452496a02d0a4b768f032917b (diff)
TextEditor: Remove defaults from Format
The default caused strange bugs because it was expected that no color was set. Task-number: QTCREATORBUG-21282 Change-Id: I3b520b944ffcb87838ba3e7b02e1d28b0f757679 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditorsettings.cpp')
-rw-r--r--src/plugins/texteditor/texteditorsettings.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp
index a4957f1780..c6b1710c7c 100644
--- a/src/plugins/texteditor/texteditorsettings.cpp
+++ b/src/plugins/texteditor/texteditorsettings.cpp
@@ -92,8 +92,10 @@ TextEditorSettings::TextEditorSettings()
// Add font preference page
FormatDescriptions formatDescr;
formatDescr.reserve(C_LAST_STYLE_SENTINEL);
- formatDescr.emplace_back(C_TEXT, tr("Text"), tr("Generic text and punctuation tokens.\n"
- "Applied to text that matched no other rule."));
+ formatDescr.emplace_back(C_TEXT, tr("Text"),
+ tr("Generic text and punctuation tokens.\n"
+ "Applied to text that matched no other rule."),
+ Format{QColor{}, Qt::white});
// Special categories
const QPalette p = QApplication::palette();
@@ -168,7 +170,7 @@ TextEditorSettings::TextEditorSettings()
functionFormat.setForeground(QColor(0, 103, 124));
formatDescr.emplace_back(C_FUNCTION, tr("Function"), tr("Name of a function."),
functionFormat);
- Format declarationFormat = Format::createMixinFormat();
+ Format declarationFormat;
declarationFormat.setBold(true);
formatDescr.emplace_back(C_DECLARATION,
tr("Function Declaration"),
@@ -178,7 +180,6 @@ TextEditorSettings::TextEditorSettings()
formatDescr.emplace_back(C_FUNCTION_DEFINITION,
tr("Function Definition"),
tr("Name of function at its definition."),
- Format::createMixinFormat(),
FormatDescription::ShowAllControls);
Format virtualFunctionFormat(functionFormat);
virtualFunctionFormat.setItalic(true);
@@ -242,7 +243,6 @@ TextEditorSettings::TextEditorSettings()
formatDescr.emplace_back(C_OPERATOR, tr("Operator"),
tr("Non user-defined language operators.\n"
"To style user-defined operators, use Overloaded Operator."),
- Format::createMixinFormat(),
FormatDescription::ShowAllControls);
formatDescr.emplace_back(C_OVERLOADED_OPERATOR,
tr("Overloaded Operators"),
@@ -335,7 +335,7 @@ TextEditorSettings::TextEditorSettings()
QColor(255, 190, 0),
QTextCharFormat::DotLine,
FormatDescription::ShowAllControls);
- Format outputArgumentFormat = Format::createMixinFormat();
+ Format outputArgumentFormat;
outputArgumentFormat.setItalic(true);
formatDescr.emplace_back(C_OUTPUT_ARGUMENT,
tr("Output Argument"),