aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/texteditorsettings.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2018-09-25 11:38:22 +0200
committerMarco Bubke <marco.bubke@qt.io>2018-09-26 10:40:02 +0000
commit25ea9a4d2465a1ca7d1375f8937fd36d247f41e4 (patch)
tree0bdfa39500d63adc052de1f28257314279ffaf59 /src/plugins/texteditor/texteditorsettings.cpp
parent6f14b6f399f13c33276d5cec546901cdcb47e39a (diff)
TextEditor: Handle overloaded operators as functions
Overloaded operators are semantically very similar to functions. So it make sense to highlight them the same. It provides the user also with feedback that he can jump to the declaration of the operator etc.. Change-Id: I110084e3e53882c9d5cbfa88442a93914792db17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditorsettings.cpp')
-rw-r--r--src/plugins/texteditor/texteditorsettings.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp
index f5cc088f22..a4957f1780 100644
--- a/src/plugins/texteditor/texteditorsettings.cpp
+++ b/src/plugins/texteditor/texteditorsettings.cpp
@@ -180,10 +180,11 @@ TextEditorSettings::TextEditorSettings()
tr("Name of function at its definition."),
Format::createMixinFormat(),
FormatDescription::ShowAllControls);
- functionFormat.setItalic(true);
+ Format virtualFunctionFormat(functionFormat);
+ virtualFunctionFormat.setItalic(true);
formatDescr.emplace_back(C_VIRTUAL_METHOD, tr("Virtual Function"),
tr("Name of function declared as virtual."),
- functionFormat);
+ virtualFunctionFormat);
formatDescr.emplace_back(C_BINDING, tr("QML Binding"),
tr("QML item property, that allows a "
@@ -246,7 +247,7 @@ TextEditorSettings::TextEditorSettings()
formatDescr.emplace_back(C_OVERLOADED_OPERATOR,
tr("Overloaded Operators"),
tr("Calls and declarations of overloaded (user-defined) operators."),
- Format::createMixinFormat(),
+ functionFormat,
FormatDescription::ShowAllControls);
formatDescr.emplace_back(C_PREPROCESSOR, tr("Preprocessor"),
tr("Preprocessor directives."), Qt::darkBlue);