diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-12-18 14:13:17 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-18 11:31:09 +0000 |
commit | d4079b0797dae46f80d9ada09d43b571749e68dc (patch) | |
tree | 821a11f4e9c39284b714a91f3a9da51227e3a1bd /tests | |
parent | 1c8f7082f70af934ddc46b9687a88e02233e1082 (diff) |
uic: Support id-based translations
Use Ids from newly introduced id attribute depending
on the global form setting.
Change-Id: I0a5094d5543c0714c88511fa159b60afc9be3c81
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/tools/uic/baseline/idbased.ui | 37 | ||||
-rw-r--r-- | tests/auto/tools/uic/baseline/idbased.ui.h | 67 |
2 files changed, 104 insertions, 0 deletions
diff --git a/tests/auto/tools/uic/baseline/idbased.ui b/tests/auto/tools/uic/baseline/idbased.ui new file mode 100644 index 0000000000..f4db5139c8 --- /dev/null +++ b/tests/auto/tools/uic/baseline/idbased.ui @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0" idbasedtr="true"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string id="windowTitleId">Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QPushButton" name="pushButton"> + <property name="toolTip"> + <string id="buttonToolTipId">ButtonToolTip</string> + </property> + <property name="statusTip"> + <string id="buttonStatusTipId">ButtonStatusTip</string> + </property> + <property name="whatsThis"> + <string id="buttonWhatsThisId">ButtonWhatsThis</string> + </property> + <property name="text"> + <string id="buttonTextId">PushButton</string> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/tests/auto/tools/uic/baseline/idbased.ui.h b/tests/auto/tools/uic/baseline/idbased.ui.h new file mode 100644 index 0000000000..dbcd92a839 --- /dev/null +++ b/tests/auto/tools/uic/baseline/idbased.ui.h @@ -0,0 +1,67 @@ +/******************************************************************************** +** Form generated from reading UI file 'idbased.ui' +** +** Created by: Qt User Interface Compiler version 5.11.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef IDBASED_H +#define IDBASED_H + +#include <QtCore/QVariant> +#include <QtWidgets/QApplication> +#include <QtWidgets/QPushButton> +#include <QtWidgets/QVBoxLayout> +#include <QtWidgets/QWidget> + +QT_BEGIN_NAMESPACE + +class Ui_Form +{ +public: + QVBoxLayout *verticalLayout; + QPushButton *pushButton; + + void setupUi(QWidget *Form) + { + if (Form->objectName().isEmpty()) + Form->setObjectName(QStringLiteral("Form")); + Form->resize(400, 300); + verticalLayout = new QVBoxLayout(Form); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); + pushButton = new QPushButton(Form); + pushButton->setObjectName(QStringLiteral("pushButton")); + + verticalLayout->addWidget(pushButton); + + + retranslateUi(Form); + + QMetaObject::connectSlotsByName(Form); + } // setupUi + + void retranslateUi(QWidget *Form) + { + Form->setWindowTitle(qtTrId("windowTitleId")); +#ifndef QT_NO_TOOLTIP + pushButton->setToolTip(qtTrId("buttonToolTipId")); +#endif // QT_NO_TOOLTIP +#ifndef QT_NO_STATUSTIP + pushButton->setStatusTip(qtTrId("buttonStatusTipId")); +#endif // QT_NO_STATUSTIP +#ifndef QT_NO_WHATSTHIS + pushButton->setWhatsThis(qtTrId("buttonWhatsThisId")); +#endif // QT_NO_WHATSTHIS + pushButton->setText(qtTrId("buttonTextId")); + } // retranslateUi + +}; + +namespace Ui { + class Form: public Ui_Form {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // IDBASED_H |