From 25ea9a4d2465a1ca7d1375f8937fd36d247f41e4 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 25 Sep 2018 11:38:22 +0200 Subject: [PATCH] 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 Reviewed-by: Alessandro Portale --- src/plugins/texteditor/texteditorsettings.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index f5cc088f22a..a4957f1780a 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);