From d4079b0797dae46f80d9ada09d43b571749e68dc Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 18 Dec 2017 14:13:17 +0100 Subject: 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 Reviewed-by: Friedemann Kleint --- tests/auto/tools/uic/baseline/idbased.ui | 37 +++++++++++++++++ tests/auto/tools/uic/baseline/idbased.ui.h | 67 ++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 tests/auto/tools/uic/baseline/idbased.ui create mode 100644 tests/auto/tools/uic/baseline/idbased.ui.h (limited to 'tests') 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 @@ + + + Form + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + ButtonToolTip + + + ButtonStatusTip + + + ButtonWhatsThis + + + PushButton + + + + + + + + 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 +#include +#include +#include +#include + +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 -- cgit v1.2.3