summaryrefslogtreecommitdiff
path: root/src/designer/src/lib/shared/csshighlighter.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-03-21 15:35:44 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-04-21 17:18:09 +0200
commit00ff2b06a17e90921d79831a62e95eecf8c6954a (patch)
tree40877b8e595eda601252c995f57d1dd3166c8cd3 /src/designer/src/lib/shared/csshighlighter.cpp
parent6b7f6990aa1abed20c260a2eb2869f39ce59f8f7 (diff)
downloadqttools-00ff2b06a17e90921d79831a62e95eecf8c6954a.tar.gz
Qt Designer: Replace QLatin1Char by modern literals
Pick-to: 6.5 Change-Id: Ied11784e840d03542a5db281590729838ed625c3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/designer/src/lib/shared/csshighlighter.cpp')
-rw-r--r--src/designer/src/lib/shared/csshighlighter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/designer/src/lib/shared/csshighlighter.cpp b/src/designer/src/lib/shared/csshighlighter.cpp
index c74ed8508..d34e7e4de 100644
--- a/src/designer/src/lib/shared/csshighlighter.cpp
+++ b/src/designer/src/lib/shared/csshighlighter.cpp
@@ -5,6 +5,8 @@
QT_BEGIN_NAMESPACE
+using namespace Qt::StringLiterals;
+
namespace qdesigner_internal {
CssHighlighter::CssHighlighter(const CssHighlightColors &colors,
@@ -41,8 +43,8 @@ void CssHighlighter::highlightBlock(const QString& text)
// The initial state is based on the precense of a : and the absense of a {.
// This is because Qt style sheets support both a full stylesheet as well as
// an inline form with just properties.
- state = save_state = (text.indexOf(QLatin1Char(':')) > -1 &&
- text.indexOf(QLatin1Char('{')) == -1) ? Property : Selector;
+ state = save_state = (text.indexOf(u':') > -1 &&
+ text.indexOf(u'{') == -1) ? Property : Selector;
} else {
save_state = state>>16;
state &= 0x00ff;