summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/themes
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/themes')
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp20
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h3
2 files changed, 22 insertions, 1 deletions
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index f44d53a00e..c72815ca1b 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>
@@ -537,6 +538,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 03445776f4..36fcdd8dce 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes_p.h
@@ -86,8 +86,8 @@ class QKdeThemePrivate;
class QKdeTheme : public QPlatformTheme
{
Q_DECLARE_PRIVATE(QKdeTheme)
- QKdeTheme(const QString &kdeHome, int kdeVersion);
public:
+ QKdeTheme(const QString &kdeHome, int kdeVersion);
static QPlatformTheme *createKdeTheme();
virtual QVariant themeHint(ThemeHint hint) const;
@@ -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;
};