summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/uic/baseline/controller.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/controller.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/controller.ui.h')
-rw-r--r--tests/auto/tools/uic/baseline/controller.ui.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/tools/uic/baseline/controller.ui.h b/tests/auto/tools/uic/baseline/controller.ui.h
index 1c79f03f56..2758f1a7de 100644
--- a/tests/auto/tools/uic/baseline/controller.ui.h
+++ b/tests/auto/tools/uic/baseline/controller.ui.h
@@ -35,7 +35,7 @@ public:
void setupUi(QWidget *Controller)
{
if (Controller->objectName().isEmpty())
- Controller->setObjectName(QString::fromUtf8("Controller"));
+ Controller->setObjectName(QStringLiteral("Controller"));
Controller->resize(255, 111);
gridLayout = new QGridLayout(Controller);
#ifndef Q_OS_MAC
@@ -44,30 +44,30 @@ public:
#ifndef Q_OS_MAC
gridLayout->setContentsMargins(9, 9, 9, 9);
#endif
- gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+ gridLayout->setObjectName(QStringLiteral("gridLayout"));
label = new QLabel(Controller);
- label->setObjectName(QString::fromUtf8("label"));
+ label->setObjectName(QStringLiteral("label"));
label->setAlignment(Qt::AlignCenter);
gridLayout->addWidget(label, 1, 1, 1, 1);
decelerate = new QPushButton(Controller);
- decelerate->setObjectName(QString::fromUtf8("decelerate"));
+ decelerate->setObjectName(QStringLiteral("decelerate"));
gridLayout->addWidget(decelerate, 2, 1, 1, 1);
accelerate = new QPushButton(Controller);
- accelerate->setObjectName(QString::fromUtf8("accelerate"));
+ accelerate->setObjectName(QStringLiteral("accelerate"));
gridLayout->addWidget(accelerate, 0, 1, 1, 1);
right = new QPushButton(Controller);
- right->setObjectName(QString::fromUtf8("right"));
+ right->setObjectName(QStringLiteral("right"));
gridLayout->addWidget(right, 1, 2, 1, 1);
left = new QPushButton(Controller);
- left->setObjectName(QString::fromUtf8("left"));
+ left->setObjectName(QStringLiteral("left"));
gridLayout->addWidget(left, 1, 0, 1, 1);