diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-01 15:24:43 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-06 09:08:34 +0000 |
commit | d5fe06a94ebbd2652034acfb64992ea4e744a1fe (patch) | |
tree | 4d42438a0fbf715098f460b8d18c5995e7c85273 | |
parent | dc2512f3088d6f836ef06d35cbf1a5f7acb4ce7b (diff) |
Make uic handle -no-feature-shortcut
Change-Id: I0f8c9fdc8b0fe573443cfc126f21e473544ddcba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/tools/uic/cpp/cppwriteinitialization.cpp | 2 | ||||
-rw-r--r-- | tests/auto/tools/uic/baseline/chatmainwindow.ui.h | 6 | ||||
-rw-r--r-- | tests/auto/tools/uic/baseline/mydialog.ui.h | 4 | ||||
-rw-r--r-- | tests/auto/tools/uic/baseline/trpreviewtool.ui.h | 4 |
4 files changed, 13 insertions, 3 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 2b0d70eac6..301d6fdabb 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -1484,6 +1484,8 @@ void WriteInitialization::writeProperties(const QString &varName, defineC = whatsThisDefineC; else if (propertyName == QLatin1String("statusTip")) defineC = statusTipDefineC; + else if (propertyName == QLatin1String("shortcut")) + defineC = shortcutDefineC; else if (propertyName == QLatin1String("accessibleName") || propertyName == QLatin1String("accessibleDescription")) defineC = accessibilityDefineC; diff --git a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h index 8cfd9b4851..7f8b026ba5 100644 --- a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'chatmainwindow.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 5.9.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -151,10 +151,14 @@ public: { ChatMainWindow->setWindowTitle(QApplication::translate("ChatMainWindow", "Qt D-Bus Chat", Q_NULLPTR)); actionQuit->setText(QApplication::translate("ChatMainWindow", "Quit", Q_NULLPTR)); +#ifndef QT_NO_SHORTCUT actionQuit->setShortcut(QApplication::translate("ChatMainWindow", "Ctrl+Q", Q_NULLPTR)); +#endif // QT_NO_SHORTCUT actionAboutQt->setText(QApplication::translate("ChatMainWindow", "About Qt...", Q_NULLPTR)); actionChangeNickname->setText(QApplication::translate("ChatMainWindow", "Change nickname...", Q_NULLPTR)); +#ifndef QT_NO_SHORTCUT actionChangeNickname->setShortcut(QApplication::translate("ChatMainWindow", "Ctrl+N", Q_NULLPTR)); +#endif // QT_NO_SHORTCUT #ifndef QT_NO_TOOLTIP chatHistory->setToolTip(QApplication::translate("ChatMainWindow", "Messages sent and received from other users", Q_NULLPTR)); #endif // QT_NO_TOOLTIP diff --git a/tests/auto/tools/uic/baseline/mydialog.ui.h b/tests/auto/tools/uic/baseline/mydialog.ui.h index 061b476f63..279dd0e9bf 100644 --- a/tests/auto/tools/uic/baseline/mydialog.ui.h +++ b/tests/auto/tools/uic/baseline/mydialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'mydialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 5.9.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -62,7 +62,9 @@ public: MyDialog->setWindowTitle(QApplication::translate("MyDialog", "Mach 2!", Q_NULLPTR)); aLabel->setText(QApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", Q_NULLPTR)); aButton->setText(QApplication::translate("MyDialog", "&Quit", Q_NULLPTR)); +#ifndef QT_NO_SHORTCUT aButton->setShortcut(QApplication::translate("MyDialog", "Alt+Q", Q_NULLPTR)); +#endif // QT_NO_SHORTCUT } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h index d694ae5a8d..7545b4c803 100644 --- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h +++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h @@ -31,7 +31,7 @@ /******************************************************************************** ** Form generated from reading UI file 'trpreviewtool.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 5.9.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -168,7 +168,9 @@ public: actionOpenForm->setText(QApplication::translate("TrPreviewToolClass", "&Open Form...", Q_NULLPTR)); actionLoadTranslation->setText(QApplication::translate("TrPreviewToolClass", "&Load Translation...", Q_NULLPTR)); actionReloadTranslations->setText(QApplication::translate("TrPreviewToolClass", "&Reload Translations", Q_NULLPTR)); +#ifndef QT_NO_SHORTCUT actionReloadTranslations->setShortcut(QApplication::translate("TrPreviewToolClass", "F5", Q_NULLPTR)); +#endif // QT_NO_SHORTCUT actionClose->setText(QApplication::translate("TrPreviewToolClass", "&Close", Q_NULLPTR)); actionAbout->setText(QApplication::translate("TrPreviewToolClass", "About", Q_NULLPTR)); actionAbout_Qt->setText(QApplication::translate("TrPreviewToolClass", "About Qt", Q_NULLPTR)); |