aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/texteditorplugin.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2022-09-30 10:35:15 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2022-09-30 11:25:19 +0000
commit4c1f410881c49d8ac2bba9ca48a5c114cbb6cc12 (patch)
tree6ea8da57ceab87a4426d83e62e4f64e5f78b5541 /src/plugins/texteditor/texteditorplugin.cpp
parent3885b936b69e23d0049ae961a14581b488f2be6c (diff)
TextEditorPlugin: Limit the usage of std::make_pair
And qMakePair. Change-Id: Id92a662fa0674b9e9f835280bb9378c8d00549e8 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditorplugin.cpp')
-rw-r--r--src/plugins/texteditor/texteditorplugin.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp
index 0e5d50b5d2..674e6aab52 100644
--- a/src/plugins/texteditor/texteditorplugin.cpp
+++ b/src/plugins/texteditor/texteditorplugin.cpp
@@ -261,20 +261,21 @@ void TextEditorPluginPrivate::updateSearchResultsFont(const FontSettings &settin
const Format containingFunctionResultFormat =
settings.formatFor(C_SEARCH_RESULT_CONTAINING_FUNCTION);
window->setTextEditorFont(QFont(settings.family(), settings.fontSize() * settings.fontZoom() / 100),
- {std::make_pair(SearchResultColor::Style::Default,
- SearchResultColor(textFormat.background(), textFormat.foreground(),
- defaultResultFormat.background(), defaultResultFormat.foreground(),
- containingFunctionResultFormat.background(), containingFunctionResultFormat.foreground())),
- std::make_pair(SearchResultColor::Style::Alt1,
- SearchResultColor(textFormat.background(), textFormat.foreground(),
- alt1ResultFormat.background(), alt1ResultFormat.foreground(),
- containingFunctionResultFormat.background(),
- containingFunctionResultFormat.foreground())),
- std::make_pair(SearchResultColor::Style::Alt2,
- SearchResultColor(textFormat.background(), textFormat.foreground(),
- alt2ResultFormat.background(), alt2ResultFormat.foreground(),
- containingFunctionResultFormat.background(),
- containingFunctionResultFormat.foreground()))});
+ {{SearchResultColor::Style::Default,
+ {textFormat.background(), textFormat.foreground(),
+ defaultResultFormat.background(), defaultResultFormat.foreground(),
+ containingFunctionResultFormat.background(),
+ containingFunctionResultFormat.foreground()}},
+ {SearchResultColor::Style::Alt1,
+ {textFormat.background(), textFormat.foreground(),
+ alt1ResultFormat.background(), alt1ResultFormat.foreground(),
+ containingFunctionResultFormat.background(),
+ containingFunctionResultFormat.foreground()}},
+ {SearchResultColor::Style::Alt2,
+ {textFormat.background(), textFormat.foreground(),
+ alt2ResultFormat.background(), alt2ResultFormat.foreground(),
+ containingFunctionResultFormat.background(),
+ containingFunctionResultFormat.foreground()}}});
}
}