summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/uic/baseline/icontheme.ui.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-06-10 16:01:22 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-03-18 18:35:03 +0100
commit9985cc330adb2af1b601e8a77ff5f9b485729577 (patch)
treefdc3d862098262e5b96f20d5e24a668d5c073ca0 /tests/auto/tools/uic/baseline/icontheme.ui.h
parentfa13e35ce47bc0d47f0fbf9888dc653f350ec7ad (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/icontheme.ui.h')
-rw-r--r--tests/auto/tools/uic/baseline/icontheme.ui.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h
index 30a4dbc72e..e73326c4c7 100644
--- a/tests/auto/tools/uic/baseline/icontheme.ui.h
+++ b/tests/auto/tools/uic/baseline/icontheme.ui.h
@@ -29,12 +29,12 @@ public:
void setupUi(QWidget *Form)
{
if (Form->objectName().isEmpty())
- Form->setObjectName(QString::fromUtf8("Form"));
+ Form->setObjectName("Form");
Form->resize(122, 117);
verticalLayout = new QVBoxLayout(Form);
- verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+ verticalLayout->setObjectName("verticalLayout");
fileicon = new QPushButton(Form);
- fileicon->setObjectName(QString::fromUtf8("fileicon"));
+ fileicon->setObjectName("fileicon");
QIcon icon;
icon.addFile(QString::fromUtf8("image1.png"), QSize(), QIcon::Normal, QIcon::Off);
fileicon->setIcon(icon);
@@ -42,7 +42,7 @@ public:
verticalLayout->addWidget(fileicon);
fileandthemeicon = new QPushButton(Form);
- fileandthemeicon->setObjectName(QString::fromUtf8("fileandthemeicon"));
+ fileandthemeicon->setObjectName("fileandthemeicon");
QIcon icon1;
QString iconThemeName = QString::fromUtf8("edit-copy");
if (QIcon::hasThemeIcon(iconThemeName)) {
@@ -55,7 +55,7 @@ public:
verticalLayout->addWidget(fileandthemeicon);
themeicon = new QPushButton(Form);
- themeicon->setObjectName(QString::fromUtf8("themeicon"));
+ themeicon->setObjectName("themeicon");
QIcon icon2;
iconThemeName = QString::fromUtf8("edit-copy");
if (QIcon::hasThemeIcon(iconThemeName)) {