diff options
Diffstat (limited to 'src/platformsupport/themes/genericunix/qgenericunixthemes.cpp')
-rw-r--r-- | src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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. */ |