diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-06-10 16:01:22 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-03-18 18:35:03 +0100 |
commit | 9985cc330adb2af1b601e8a77ff5f9b485729577 (patch) | |
tree | fdc3d862098262e5b96f20d5e24a668d5c073ca0 /tests/auto/tools/uic/baseline/chatdialog.ui.h | |
parent | fa13e35ce47bc0d47f0fbf9888dc653f350ec7ad (diff) |
uic: use C string literals for setObjectName()
Because setObjectName() now takes a QAnyStringView, passing C string
literals is much more efficient than using QString::fromUtf8().
This patch only deals with setObjectName() as a known property,
probably from a name attribute. If the objectName property is set by a
<property> element (or so I assume), we still emit a
QString::fromUtf8(). Detecting objectName there would be too much
magic.
Besides, I haven't been able to find why sometimes there's a second
setObjectName call right after the first, when in the XML it seems all
kosher (name attribute and objectName <property> agreeing on the
content).
Change-Id: Icf07bad841ac735a9c744bbd955428ba15758089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/tools/uic/baseline/chatdialog.ui.h')
-rw-r--r-- | tests/auto/tools/uic/baseline/chatdialog.ui.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/tools/uic/baseline/chatdialog.ui.h b/tests/auto/tools/uic/baseline/chatdialog.ui.h index e6bb0f4ccd..f3351a9895 100644 --- a/tests/auto/tools/uic/baseline/chatdialog.ui.h +++ b/tests/auto/tools/uic/baseline/chatdialog.ui.h @@ -35,7 +35,7 @@ public: void setupUi(QDialog *ChatDialog) { if (ChatDialog->objectName().isEmpty()) - ChatDialog->setObjectName(QString::fromUtf8("ChatDialog")); + ChatDialog->setObjectName("ChatDialog"); ChatDialog->resize(513, 349); vboxLayout = new QVBoxLayout(ChatDialog); #ifndef Q_OS_MAC @@ -44,7 +44,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -52,16 +52,16 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); textEdit = new QTextEdit(ChatDialog); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName("textEdit"); textEdit->setFocusPolicy(Qt::NoFocus); textEdit->setReadOnly(true); hboxLayout->addWidget(textEdit); listWidget = new QListWidget(ChatDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); listWidget->setMaximumSize(QSize(180, 16777215)); listWidget->setFocusPolicy(Qt::NoFocus); @@ -75,14 +75,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); label = new QLabel(ChatDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout1->addWidget(label); lineEdit = new QLineEdit(ChatDialog); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName("lineEdit"); hboxLayout1->addWidget(lineEdit); |