From 84c494d0f27b37c59132151b924fdf5adbc542e5 Mon Sep 17 00:00:00 2001 From: Mate Barany Date: Thu, 1 Sep 2022 16:56:21 +0200 Subject: uic: Fix mismatches between QString/QLatin1StringView While working on QTBUG-98434 some potential improvements were found for pre-existing issues, for example some variables were wrongly initialized. Fix the mismatches between QString/QLatin1StringView. Task-number: QTBUG-103100 Change-Id: Ib120452fe8012cda3f9becea8f9837efc38cf199 Reviewed-by: Marc Mutz --- src/tools/uic/cpp/cppwriteinitialization.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tools/uic/cpp/cppwriteinitialization.cpp') diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 8747bf48cce..b13521f596a 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -864,7 +864,7 @@ void WriteInitialization::addButtonGroup(const DomWidget *buttonNode, const QStr const QString groupName = m_driver->findOrInsertButtonGroup(group); // Create on demand if (!m_buttonGroups.contains(groupName)) { - const QString className = "QButtonGroup"_L1; + const QString className = u"QButtonGroup"_s; m_output << m_indent; if (createGroupOnTheFly) m_output << className << " *"; @@ -1002,7 +1002,7 @@ static inline QString formLayoutRole(int column, int colspan) static QString layoutAddMethod(DomLayoutItem::Kind kind, const QString &layoutClass) { - const QString methodPrefix = layoutClass == "QFormLayout"_L1 ? "set"_L1 : "add"_L1; + const auto methodPrefix = layoutClass == "QFormLayout"_L1 ? "set"_L1 : "add"_L1; switch (kind) { case DomLayoutItem::Widget: return methodPrefix + "Widget"_L1; @@ -1273,9 +1273,9 @@ void WriteInitialization::writeProperties(const QString &varName, } else if (propertyName == "orientation"_L1 && m_uic->customWidgetsInfo()->extends(className, "Line")) { // Line support - QString shape = "QFrame::HLine"_L1; + QString shape = u"QFrame::HLine"_s; if (p->elementEnum() == "Qt::Vertical"_L1) - shape = "QFrame::VLine"_L1; + shape = u"QFrame::VLine"_s; m_output << m_indent << varName << language::derefPointer << "setFrameShape(" << language::enumValue(shape) << ')' << language::eol; -- cgit v1.2.3