summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-01-08 15:12:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-18 09:23:38 +0100
commitab2c90cc525f499f0061a5042e7370bb8db2af94 (patch)
tree7f18fc9f88364b56ddc8de6bee055cd124ebcadf
parentd5912b2a475f6d947fc11c754504afcf3aaddf31 (diff)
Introduce function for standard button texts to QPlatformTheme.
Change-Id: I91eec04a95b5047d893490a70152237b2991f662 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
-rw-r--r--src/gui/kernel/qplatformtheme.cpp58
-rw-r--r--src/gui/kernel/qplatformtheme.h3
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp20
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h1
-rw-r--r--src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp51
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp16
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.h1
-rw-r--r--src/plugins/platforms/cocoa/messages.cpp5
-rw-r--r--src/plugins/platforms/cocoa/messages.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm6
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp94
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp8
13 files changed, 133 insertions, 133 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index 628b2c9d12..90edf4c49f 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -51,6 +51,7 @@
#include <private/qiconloader_p.h>
#include <private/qguiapplication_p.h>
#include <qpa/qplatformintegration.h>
+#include <qpa/qplatformdialoghelper.h>
QT_BEGIN_NAMESPACE
@@ -627,6 +628,63 @@ QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) c
return list;
}
+/*!
+ Returns the text of a standard \a button.
+
+ \since 5.3
+ \sa QMessageDialogOptions::StandardButton
+ */
+
+QString QPlatformTheme::standardButtonText(int button) const
+{
+ return QPlatformTheme::defaultStandardButtonText(button);
+}
+
+QString QPlatformTheme::defaultStandardButtonText(int button)
+{
+ switch (button) {
+ case QMessageDialogOptions::Ok:
+ return QCoreApplication::translate("QPlatformTheme", "OK");
+ case QMessageDialogOptions::Save:
+ return QCoreApplication::translate("QPlatformTheme", "Save");
+ case QMessageDialogOptions::SaveAll:
+ return QCoreApplication::translate("QPlatformTheme", "Save All");
+ case QMessageDialogOptions::Open:
+ return QCoreApplication::translate("QPlatformTheme", "Open");
+ case QMessageDialogOptions::Yes:
+ return QCoreApplication::translate("QPlatformTheme", "&Yes");
+ case QMessageDialogOptions::YesToAll:
+ return QCoreApplication::translate("QPlatformTheme", "Yes to &All");
+ case QMessageDialogOptions::No:
+ return QCoreApplication::translate("QPlatformTheme", "&No");
+ case QMessageDialogOptions::NoToAll:
+ return QCoreApplication::translate("QPlatformTheme", "N&o to All");
+ case QMessageDialogOptions::Abort:
+ return QCoreApplication::translate("QPlatformTheme", "Abort");
+ case QMessageDialogOptions::Retry:
+ return QCoreApplication::translate("QPlatformTheme", "Retry");
+ case QMessageDialogOptions::Ignore:
+ return QCoreApplication::translate("QPlatformTheme", "Ignore");
+ case QMessageDialogOptions::Close:
+ return QCoreApplication::translate("QPlatformTheme", "Close");
+ case QMessageDialogOptions::Cancel:
+ return QCoreApplication::translate("QPlatformTheme", "Cancel");
+ case QMessageDialogOptions::Discard:
+ return QCoreApplication::translate("QPlatformTheme", "Discard");
+ case QMessageDialogOptions::Help:
+ return QCoreApplication::translate("QPlatformTheme", "Help");
+ case QMessageDialogOptions::Apply:
+ return QCoreApplication::translate("QPlatformTheme", "Apply");
+ case QMessageDialogOptions::Reset:
+ return QCoreApplication::translate("QPlatformTheme", "Reset");
+ case QMessageDialogOptions::RestoreDefaults:
+ return QCoreApplication::translate("QPlatformTheme", "Restore Defaults");
+ default:
+ break;
+ }
+ return QString();
+}
+
unsigned QPlatformThemePrivate::currentKeyPlatforms()
{
const uint keyboardScheme = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt();
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index 2ab8cef760..205a5bab69 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -296,7 +296,10 @@ public:
virtual QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const;
+ virtual QString standardButtonText(int button) const;
+
static QVariant defaultThemeHint(ThemeHint hint);
+ static QString defaultStandardButtonText(int button);
protected:
explicit QPlatformTheme(QPlatformThemePrivate *priv);
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index ee295afe6c..42b3d64a47 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -57,6 +57,7 @@
#include <private/qguiapplication_p.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformservices.h>
+#include <qpa/qplatformdialoghelper.h>
#include <algorithm>
@@ -533,6 +534,25 @@ const QFont *QGnomeTheme::font(Font type) const
}
}
+QString QGnomeTheme::standardButtonText(int button) const
+{
+ switch (button) {
+ case QMessageDialogOptions::Ok:
+ return QCoreApplication::translate("QGnomeTheme", "&OK");
+ case QMessageDialogOptions::Save:
+ return QCoreApplication::translate("QGnomeTheme", "&Save");
+ case QMessageDialogOptions::Cancel:
+ return QCoreApplication::translate("QGnomeTheme", "&Cancel");
+ case QMessageDialogOptions::QMessageDialogOptions::Close:
+ return QCoreApplication::translate("QGnomeTheme", "&Close");
+ case QMessageDialogOptions::Discard:
+ return QCoreApplication::translate("QGnomeTheme", "Close without Saving");
+ default:
+ break;
+ }
+ return QPlatformTheme::standardButtonText(button);
+}
+
/*!
\brief Creates a UNIX theme according to the detected desktop environment.
*/
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
index de53874941..36fcdd8dce 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
@@ -109,6 +109,7 @@ public:
QGnomeTheme();
virtual QVariant themeHint(ThemeHint hint) const;
virtual const QFont *font(Font type) const;
+ QString standardButtonText(int button) const Q_DECL_OVERRIDE;
static const char *name;
};
diff --git a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp
index 4c91e76e0f..4b99f2ce73 100644
--- a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp
+++ b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp
@@ -43,6 +43,8 @@
#include <QtWidgets/QStyle>
#include "qandroidplatformdialoghelpers.h"
#include "androidjnimain.h"
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformtheme.h>
namespace QtAndroidDialogHelpers {
static jclass g_messageDialogHelperClass = 0;
@@ -61,49 +63,6 @@ void QAndroidPlatformMessageDialogHelper::exec()
m_loop.exec();
}
-static QString standardButtonText(int sbutton)
-{
- switch (sbutton) {
- case QMessageDialogOptions::Ok:
- return QAndroidPlatformMessageDialogHelper::tr("OK");
- case QMessageDialogOptions::Save:
- return QAndroidPlatformMessageDialogHelper::tr("Save");
- case QMessageDialogOptions::Open:
- return QAndroidPlatformMessageDialogHelper::tr("Open");
- case QMessageDialogOptions::Cancel:
- return QAndroidPlatformMessageDialogHelper::tr("Cancel");
- case QMessageDialogOptions::Close:
- return QAndroidPlatformMessageDialogHelper::tr("Close");
- case QMessageDialogOptions::Apply:
- return QAndroidPlatformMessageDialogHelper::tr("Apply");
- case QMessageDialogOptions::Reset:
- return QAndroidPlatformMessageDialogHelper::tr("Reset");
- case QMessageDialogOptions::Help:
- return QAndroidPlatformMessageDialogHelper::tr("Help");
- case QMessageDialogOptions::Discard:
- return QAndroidPlatformMessageDialogHelper::tr("Discard");
- case QMessageDialogOptions::Yes:
- return QAndroidPlatformMessageDialogHelper::tr("Yes");
- case QMessageDialogOptions::YesToAll:
- return QAndroidPlatformMessageDialogHelper::tr("Yes to All");
- case QMessageDialogOptions::No:
- return QAndroidPlatformMessageDialogHelper::tr("No");
- case QMessageDialogOptions::NoToAll:
- return QAndroidPlatformMessageDialogHelper::tr("No to All");
- case QMessageDialogOptions::SaveAll:
- return QAndroidPlatformMessageDialogHelper::tr("Save All");
- case QMessageDialogOptions::Abort:
- return QAndroidPlatformMessageDialogHelper::tr("Abort");
- case QMessageDialogOptions::Retry:
- return QAndroidPlatformMessageDialogHelper::tr("Retry");
- case QMessageDialogOptions::Ignore:
- return QAndroidPlatformMessageDialogHelper::tr("Ignore");
- case QMessageDialogOptions::RestoreDefaults:
- return QAndroidPlatformMessageDialogHelper::tr("Restore Defaults");
- } // switch
- return QString();
-}
-
bool QAndroidPlatformMessageDialogHelper::show(Qt::WindowFlags windowFlags
, Qt::WindowModality windowModality
, QWindow *parent)
@@ -134,8 +93,10 @@ bool QAndroidPlatformMessageDialogHelper::show(Qt::WindowFlags windowFlags
m_javaMessageDialog.callMethod<void>("setDetailedText", "(Ljava/lang/String;)V", QJNIObjectPrivate::fromString(str).object());
for (int i = QMessageDialogOptions::FirstButton; i < QMessageDialogOptions::LastButton; i<<=1) {
- if ( opt->standardButtons() & i )
- m_javaMessageDialog.callMethod<void>("addButton", "(ILjava/lang/String;)V", i, QJNIObjectPrivate::fromString(standardButtonText(i)).object());
+ if ( opt->standardButtons() & i ) {
+ const QString text = QGuiApplicationPrivate::platformTheme()->standardButtonText(i);
+ m_javaMessageDialog.callMethod<void>("addButton", "(ILjava/lang/String;)V", i, QJNIObjectPrivate::fromString(text).object());
+ }
}
m_javaMessageDialog.callMethod<void>("show", "(J)V", jlong(static_cast<QObject*>(this)));
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index 308bb70faf..ab29541f15 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -46,6 +46,7 @@
#include "qandroidplatformdialoghelpers.h"
#include <QVariant>
#include <QFileInfo>
+#include <QCoreApplication>
#include <qandroidplatformintegration.h>
QAndroidPlatformTheme::QAndroidPlatformTheme(QAndroidPlatformNativeInterface *androidPlatformNativeInterface)
@@ -152,6 +153,21 @@ QVariant QAndroidPlatformTheme::themeHint(ThemeHint hint) const
}
}
+QString QAndroidPlatformTheme::standardButtonText(int button) const
+{
+ switch (button) {
+ case QMessageDialogOptions::Yes:
+ return QCoreApplication::translate("QAndroidPlatformTheme", "Yes");
+ case QMessageDialogOptions::YesToAll:
+ return QCoreApplication::translate("QAndroidPlatformTheme", "Yes to All");
+ case QMessageDialogOptions::No:
+ return QCoreApplication::translate("QAndroidPlatformTheme", "No");
+ case QMessageDialogOptions::NoToAll:
+ return QCoreApplication::translate("QAndroidPlatformTheme", "No to All");
+ }
+ return QPlatformTheme::standardButtonText(button);
+}
+
bool QAndroidPlatformTheme::usePlatformNativeDialog(QPlatformTheme::DialogType type) const
{
if (type == MessageDialog)
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.h b/src/plugins/platforms/android/qandroidplatformtheme.h
index ec259a9b0a..544061a7a2 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.h
+++ b/src/plugins/platforms/android/qandroidplatformtheme.h
@@ -54,6 +54,7 @@ public:
virtual const QPalette *palette(Palette type = SystemPalette) const;
virtual const QFont *font(Font type = SystemFont) const;
virtual QVariant themeHint(ThemeHint hint) const;
+ QString standardButtonText(int button) const Q_DECL_OVERRIDE;
virtual bool usePlatformNativeDialog(DialogType type) const;
virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const;
diff --git a/src/plugins/platforms/cocoa/messages.cpp b/src/plugins/platforms/cocoa/messages.cpp
index 3db1618a50..1fe80b28b1 100644
--- a/src/plugins/platforms/cocoa/messages.cpp
+++ b/src/plugins/platforms/cocoa/messages.cpp
@@ -93,4 +93,9 @@ QPlatformMenuItem::MenuRole detectMenuRole(const QString &caption)
return QPlatformMenuItem::NoRole;
}
+QString msgDialogButtonDiscard()
+{
+ return QCoreApplication::translate("QCocoaTheme", "Don't Save");
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/cocoa/messages.h b/src/plugins/platforms/cocoa/messages.h
index 09705c1e21..97f3ea7009 100644
--- a/src/plugins/platforms/cocoa/messages.h
+++ b/src/plugins/platforms/cocoa/messages.h
@@ -53,6 +53,8 @@ QString qt_mac_applicationmenu_string(int type);
QPlatformMenuItem::MenuRole detectMenuRole(const QString &caption);
+QString msgDialogButtonDiscard();
+
QT_END_NAMESPACE
#endif // MESSAGES_H
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.h b/src/plugins/platforms/cocoa/qcocoatheme.h
index e4237c9b3e..d60cdf10d1 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.h
+++ b/src/plugins/platforms/cocoa/qcocoatheme.h
@@ -73,6 +73,7 @@ public:
QPlatformTheme::IconOptions options = 0) const;
QVariant themeHint(ThemeHint hint) const;
+ QString standardButtonText(int button) const Q_DECL_OVERRIDE;
static const char *name;
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index 1484ae2ba3..bf6c47f273 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -42,6 +42,7 @@
#import <Cocoa/Cocoa.h>
#include "qcocoatheme.h"
+#include "messages.h"
#include <QtCore/QVariant>
@@ -292,6 +293,11 @@ QVariant QCocoaTheme::themeHint(ThemeHint hint) const
return QPlatformTheme::themeHint(hint);
}
+QString QCocoaTheme::standardButtonText(int button) const
+{
+ return button == QMessageDialogOptions::Discard ? msgDialogButtonDiscard() : QPlatformTheme::standardButtonText(button);
+}
+
QPlatformMenuItem *QCocoaTheme::createPlatformMenuItem() const
{
return new QCocoaMenuItem();
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index 6b183d3759..d28fb66551 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -46,7 +46,9 @@
#include <QtWidgets/qdialog.h>
#include <QtWidgets/qapplication.h>
#include <private/qwidget_p.h>
+#include <private/qguiapplication_p.h>
#include <QtGui/qpa/qplatformdialoghelper.h>
+#include <QtGui/qpa/qplatformtheme.h>
#include <QtWidgets/qaction.h>
#include "qdialogbuttonbox.h"
@@ -246,7 +248,6 @@ public:
void _q_handleButtonClicked();
void addButtonsToLayout(const QList<QAbstractButton *> &buttonList, bool reverse);
void retranslateStrings();
- const char *standardButtonText(QDialogButtonBox::StandardButton sbutton) const;
};
QDialogButtonBoxPrivate::QDialogButtonBoxPrivate(Qt::Orientation orient)
@@ -428,7 +429,6 @@ QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardBut
bool doLayout)
{
Q_Q(QDialogButtonBox);
- const char *buttonText = 0;
int icon = 0;
switch (sbutton) {
@@ -477,9 +477,7 @@ QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardBut
return 0;
;
}
- buttonText = standardButtonText(sbutton);
-
- QPushButton *button = new QPushButton(QDialogButtonBox::tr(buttonText), q);
+ QPushButton *button = new QPushButton(QGuiApplicationPrivate::platformTheme()->standardButtonText(sbutton), q);
QStyle *style = q->style();
if (style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, 0, q) && icon != 0)
button->setIcon(style->standardIcon(QStyle::StandardPixmap(icon), 0, q));
@@ -525,87 +523,15 @@ void QDialogButtonBoxPrivate::createStandardButtons(QDialogButtonBox::StandardBu
layoutButtons();
}
-const char *QDialogButtonBoxPrivate::standardButtonText(QDialogButtonBox::StandardButton sbutton) const
-{
- const char *buttonText = 0;
- bool gnomeLayout = (layoutPolicy == QDialogButtonBox::GnomeLayout);
- switch (sbutton) {
- case QDialogButtonBox::Ok:
- buttonText = gnomeLayout ? QT_TRANSLATE_NOOP("QDialogButtonBox", "&OK") : QT_TRANSLATE_NOOP("QDialogButtonBox", "OK");
- break;
- case QDialogButtonBox::Save:
- buttonText = gnomeLayout ? QT_TRANSLATE_NOOP("QDialogButtonBox", "&Save") : QT_TRANSLATE_NOOP("QDialogButtonBox", "Save");
- break;
- case QDialogButtonBox::Open:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Open");
- break;
- case QDialogButtonBox::Cancel:
- buttonText = gnomeLayout ? QT_TRANSLATE_NOOP("QDialogButtonBox", "&Cancel") : QT_TRANSLATE_NOOP("QDialogButtonBox", "Cancel");
- break;
- case QDialogButtonBox::Close:
- buttonText = gnomeLayout ? QT_TRANSLATE_NOOP("QDialogButtonBox", "&Close") : QT_TRANSLATE_NOOP("QDialogButtonBox", "Close");
- break;
- case QDialogButtonBox::Apply:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Apply");
- break;
- case QDialogButtonBox::Reset:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Reset");
- break;
- case QDialogButtonBox::Help:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Help");
- break;
- case QDialogButtonBox::Discard:
- if (layoutPolicy == QDialogButtonBox::MacLayout)
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Don't Save");
- else if (layoutPolicy == QDialogButtonBox::GnomeLayout)
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Close without Saving");
- else
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Discard");
- break;
- case QDialogButtonBox::Yes:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "&Yes");
- break;
- case QDialogButtonBox::YesToAll:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Yes to &All");
- break;
- case QDialogButtonBox::No:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "&No");
- break;
- case QDialogButtonBox::NoToAll:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "N&o to All");
- break;
- case QDialogButtonBox::SaveAll:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Save All");
- break;
- case QDialogButtonBox::Abort:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Abort");
- break;
- case QDialogButtonBox::Retry:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Retry");
- break;
- case QDialogButtonBox::Ignore:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Ignore");
- break;
- case QDialogButtonBox::RestoreDefaults:
- buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Restore Defaults");
- break;
- case QDialogButtonBox::NoButton:
- ;
- } // switch
- return buttonText;
-}
-
void QDialogButtonBoxPrivate::retranslateStrings()
{
- const char *buttonText = 0;
- QHash<QPushButton *, QDialogButtonBox::StandardButton>::iterator it = standardButtonHash.begin();
- while (it != standardButtonHash.end()) {
- buttonText = standardButtonText(it.value());
- if (buttonText) {
- QPushButton *button = it.key();
- button->setText(QDialogButtonBox::tr(buttonText));
- }
- ++it;
+ typedef QHash<QPushButton *, QDialogButtonBox::StandardButton>::iterator Iterator;
+
+ const Iterator end = standardButtonHash.end();
+ for (Iterator it = standardButtonHash.begin(); it != end; ++it) {
+ const QString text = QGuiApplicationPrivate::platformTheme()->standardButtonText(it.value());
+ if (!text.isEmpty())
+ it.key()->setText(text);
}
}
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index cc01d70454..16c3d56385 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -188,11 +188,11 @@ void tst_languageChange::retranslatability_data()
//next we fill it with data
QTest::newRow( "QInputDialog" )
<< int(InputDialog) << (QSet<QByteArray>()
- << "QDialogButtonBox::Cancel");
+ << "QPlatformTheme::Cancel");
QTest::newRow( "QColorDialog" )
<< int(ColorDialog) << (QSet<QByteArray>()
- << "QDialogButtonBox::Cancel"
+ << "QPlatformTheme::Cancel"
<< "QColorDialog::&Sat:"
<< "QColorDialog::&Add to Custom Colors"
<< "QColorDialog::&Green:"
@@ -237,8 +237,8 @@ void tst_languageChange::retranslatability_data()
<< "QFileSystemModel::Type::All other platforms"
#endif
// << "QFileSystemModel::%1 KB"
- << "QDialogButtonBox::Cancel"
- << "QDialogButtonBox::Open"
+ << "QPlatformTheme::Cancel"
+ << "QPlatformTheme::Open"
<< "QFileDialog::File &name:");
}