diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-21 15:35:44 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-04-21 17:18:09 +0200 |
commit | 00ff2b06a17e90921d79831a62e95eecf8c6954a (patch) | |
tree | 40877b8e595eda601252c995f57d1dd3166c8cd3 /src/designer/src/lib/shared/widgetdatabase.cpp | |
parent | 6b7f6990aa1abed20c260a2eb2869f39ce59f8f7 (diff) | |
download | qttools-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/widgetdatabase.cpp')
-rw-r--r-- | src/designer/src/lib/shared/widgetdatabase.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/designer/src/lib/shared/widgetdatabase.cpp b/src/designer/src/lib/shared/widgetdatabase.cpp index 441c97887..5f4b770e1 100644 --- a/src/designer/src/lib/shared/widgetdatabase.cpp +++ b/src/designer/src/lib/shared/widgetdatabase.cpp @@ -745,20 +745,19 @@ QString WidgetDataBase::scaleFormTemplate(const QString &xml, const QSize &size, // ---- free functions QDESIGNER_SHARED_EXPORT IncludeSpecification includeSpecification(QString includeFile) { - const bool global = !includeFile.isEmpty() && - includeFile[0] == QLatin1Char('<') && - includeFile[includeFile.size() - 1] == QLatin1Char('>'); + const bool global = includeFile.startsWith(u'<') && includeFile.endsWith(u'>'); if (global) { - includeFile.remove(includeFile.size() - 1, 1); + includeFile.chop(1); includeFile.remove(0, 1); } return IncludeSpecification(includeFile, global ? IncludeGlobal : IncludeLocal); } -QDESIGNER_SHARED_EXPORT QString buildIncludeFile(QString includeFile, IncludeType includeType) { +QDESIGNER_SHARED_EXPORT QString buildIncludeFile(QString includeFile, IncludeType includeType) +{ if (includeType == IncludeGlobal && !includeFile.isEmpty()) { - includeFile.append(QLatin1Char('>')); - includeFile.insert(0, QLatin1Char('<')); + includeFile.append(u'>'); + includeFile.prepend(u'<'); } return includeFile; } |