summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/uic/baseline/imagedialog.ui.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2011-12-11 16:55:01 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-20 15:17:08 +0100
commit49b08f96e824f49fab9aa5c9a1a0ed582d4558bb (patch)
treeb9e1df0b1a332a78ce1ef9cf0d90265098c9e414 /tests/auto/tools/uic/baseline/imagedialog.ui.h
parentac1689245419a6fd44e3250d2fdf3d3a058a0c17 (diff)
uic: use QStringLiteral() instead of QString::fromUtf8() where applicable
Many (most?) strings written aren't in fact UTF-8, and we can check at compile-time which are and which aren't, so don't hard-code fromUtf8() but use the much more efficient QStringLiteral() where applicable. This is low-hanging fruit. This patch only optimises US-ASCII string literals, not those that are latin-1 or even UTF-8, because that would require more extensive changes to the original fixString() function. Likewise, there are also other calls to QString::fromUtf8() being generated (e.g. in the pixmap code) that could benefit from being turned into QStringLiterals, but their code paths are more involved than those this patch fixes. This patch at least suffices in turning all the setObjectName() arguments into QStringLiterals, which was the main goal. The autotest baseline has been updated with the new expected results. Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/tools/uic/baseline/imagedialog.ui.h')
-rw-r--r--tests/auto/tools/uic/baseline/imagedialog.ui.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h
index 1728cac952..c09363d3ec 100644
--- a/tests/auto/tools/uic/baseline/imagedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h
@@ -50,8 +50,8 @@ public:
void setupUi(QDialog *dialog)
{
if (dialog->objectName().isEmpty())
- dialog->setObjectName(QString::fromUtf8("dialog"));
- dialog->setObjectName(QString::fromUtf8("ImageDialog"));
+ dialog->setObjectName(QStringLiteral("dialog"));
+ dialog->setObjectName(QStringLiteral("ImageDialog"));
dialog->resize(320, 180);
vboxLayout = new QVBoxLayout(dialog);
#ifndef Q_OS_MAC
@@ -60,17 +60,17 @@ public:
#ifndef Q_OS_MAC
vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
- vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
- vboxLayout->setObjectName(QString::fromUtf8(""));
+ vboxLayout->setObjectName(QStringLiteral("vboxLayout"));
+ vboxLayout->setObjectName(QStringLiteral(""));
gridLayout = new QGridLayout();
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
gridLayout->setContentsMargins(1, 1, 1, 1);
- gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
- gridLayout->setObjectName(QString::fromUtf8(""));
+ gridLayout->setObjectName(QStringLiteral("gridLayout"));
+ gridLayout->setObjectName(QStringLiteral(""));
widthLabel = new QLabel(dialog);
- widthLabel->setObjectName(QString::fromUtf8("widthLabel"));
+ widthLabel->setObjectName(QStringLiteral("widthLabel"));
widthLabel->setGeometry(QRect(1, 27, 67, 22));
widthLabel->setFrameShape(QFrame::NoFrame);
widthLabel->setFrameShadow(QFrame::Plain);
@@ -79,7 +79,7 @@ public:
gridLayout->addWidget(widthLabel, 1, 0, 1, 1);
heightLabel = new QLabel(dialog);
- heightLabel->setObjectName(QString::fromUtf8("heightLabel"));
+ heightLabel->setObjectName(QStringLiteral("heightLabel"));
heightLabel->setGeometry(QRect(1, 55, 67, 22));
heightLabel->setFrameShape(QFrame::NoFrame);
heightLabel->setFrameShadow(QFrame::Plain);
@@ -88,7 +88,7 @@ public:
gridLayout->addWidget(heightLabel, 2, 0, 1, 1);
colorDepthCombo = new QComboBox(dialog);
- colorDepthCombo->setObjectName(QString::fromUtf8("colorDepthCombo"));
+ colorDepthCombo->setObjectName(QStringLiteral("colorDepthCombo"));
colorDepthCombo->setGeometry(QRect(74, 83, 227, 22));
QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
sizePolicy.setHorizontalStretch(0);
@@ -100,7 +100,7 @@ public:
gridLayout->addWidget(colorDepthCombo, 3, 1, 1, 1);
nameLineEdit = new QLineEdit(dialog);
- nameLineEdit->setObjectName(QString::fromUtf8("nameLineEdit"));
+ nameLineEdit->setObjectName(QStringLiteral("nameLineEdit"));
nameLineEdit->setGeometry(QRect(74, 83, 227, 22));
QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
sizePolicy1.setHorizontalStretch(1);
@@ -112,7 +112,7 @@ public:
gridLayout->addWidget(nameLineEdit, 0, 1, 1, 1);
spinBox = new QSpinBox(dialog);
- spinBox->setObjectName(QString::fromUtf8("spinBox"));
+ spinBox->setObjectName(QStringLiteral("spinBox"));
spinBox->setGeometry(QRect(74, 1, 227, 20));
sizePolicy.setHeightForWidth(spinBox->sizePolicy().hasHeightForWidth());
spinBox->setSizePolicy(sizePolicy);
@@ -124,7 +124,7 @@ public:
gridLayout->addWidget(spinBox, 1, 1, 1, 1);
spinBox_2 = new QSpinBox(dialog);
- spinBox_2->setObjectName(QString::fromUtf8("spinBox_2"));
+ spinBox_2->setObjectName(QStringLiteral("spinBox_2"));
spinBox_2->setGeometry(QRect(74, 27, 227, 22));
sizePolicy.setHeightForWidth(spinBox_2->sizePolicy().hasHeightForWidth());
spinBox_2->setSizePolicy(sizePolicy);
@@ -136,7 +136,7 @@ public:
gridLayout->addWidget(spinBox_2, 2, 1, 1, 1);
nameLabel = new QLabel(dialog);
- nameLabel->setObjectName(QString::fromUtf8("nameLabel"));
+ nameLabel->setObjectName(QStringLiteral("nameLabel"));
nameLabel->setGeometry(QRect(1, 1, 67, 20));
nameLabel->setFrameShape(QFrame::NoFrame);
nameLabel->setFrameShadow(QFrame::Plain);
@@ -145,7 +145,7 @@ public:
gridLayout->addWidget(nameLabel, 0, 0, 1, 1);
colorDepthLabel = new QLabel(dialog);
- colorDepthLabel->setObjectName(QString::fromUtf8("colorDepthLabel"));
+ colorDepthLabel->setObjectName(QStringLiteral("colorDepthLabel"));
colorDepthLabel->setGeometry(QRect(1, 83, 67, 22));
colorDepthLabel->setFrameShape(QFrame::NoFrame);
colorDepthLabel->setFrameShadow(QFrame::Plain);
@@ -165,20 +165,20 @@ public:
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(1, 1, 1, 1);
- hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
- hboxLayout->setObjectName(QString::fromUtf8(""));
+ hboxLayout->setObjectName(QStringLiteral("hboxLayout"));
+ hboxLayout->setObjectName(QStringLiteral(""));
spacerItem1 = new QSpacerItem(QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem1);
okButton = new QPushButton(dialog);
- okButton->setObjectName(QString::fromUtf8("okButton"));
+ okButton->setObjectName(QStringLiteral("okButton"));
okButton->setGeometry(QRect(135, 1, 80, 24));
hboxLayout->addWidget(okButton);
cancelButton = new QPushButton(dialog);
- cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
+ cancelButton->setObjectName(QStringLiteral("cancelButton"));
cancelButton->setGeometry(QRect(221, 1, 80, 24));
hboxLayout->addWidget(cancelButton);