From 24d1565789cbd31ce383ac789bb6d69116a77a09 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 22 Oct 2018 13:42:22 +0200 Subject: uic: Use the Qt configure system when generating code Replace the generation of #ifdef's for the macros by QT_CONFIG checks. Implement it using streamable classes to make it easier to switch the output language later. Task-number: PYSIDE-797 Change-Id: I28b5ed3ec80cd525a3df0cd54d9be4f09149cde4 Reviewed-by: Jarek Kobus --- tests/auto/tools/uic/baseline/phrasebookbox.ui.h | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tests/auto/tools/uic/baseline/phrasebookbox.ui.h') diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h index 27a0fa79ed..06c0f97bce 100644 --- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h +++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h @@ -165,11 +165,11 @@ public: unnamed->addLayout(buttonLayout); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) target->setBuddy(targetLed); source->setBuddy(sourceLed); definition->setBuddy(definitionLed); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(sourceLed, targetLed); QWidget::setTabOrder(targetLed, definitionLed); QWidget::setTabOrder(definitionLed, newBut); @@ -185,36 +185,36 @@ public: void retranslateUi(QDialog *PhraseBookBox) { PhraseBookBox->setWindowTitle(QApplication::translate("PhraseBookBox", "Edit Phrase Book", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) PhraseBookBox->setWhatsThis(QApplication::translate("PhraseBookBox", "This window allows you to add, modify, or delete phrases in a phrase book.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) target->setText(QApplication::translate("PhraseBookBox", "&Translation:", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) targetLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is the phrase in the target language corresponding to the source phrase.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) source->setText(QApplication::translate("PhraseBookBox", "S&ource phrase:", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) definitionLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is a definition for the source phrase.", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(whatsthis) sourceLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is the phrase in the source language.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) definition->setText(QApplication::translate("PhraseBookBox", "&Definition:", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) newBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to add the phrase to the phrase book.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) newBut->setText(QApplication::translate("PhraseBookBox", "&New Phrase", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) removeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to remove the phrase from the phrase book.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) removeBut->setText(QApplication::translate("PhraseBookBox", "&Remove Phrase", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) saveBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to save the changes made.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) saveBut->setText(QApplication::translate("PhraseBookBox", "&Save", nullptr)); -#ifndef QT_NO_WHATSTHIS +#if QT_CONFIG(whatsthis) closeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to close this window.", nullptr)); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) closeBut->setText(QApplication::translate("PhraseBookBox", "Close", nullptr)); } // retranslateUi -- cgit v1.2.3