diff options
| author | Friedrich W. H. Kossebau <[email protected]> | 2022-09-30 19:56:52 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2022-10-15 07:18:34 +0000 |
| commit | 5be69f0daba256cd3faad0aaa16dee8447a76af4 (patch) | |
| tree | 1b3f83de331543ea418fe4a5fb9842431b6454aa /src/dolphinmainwindow.cpp | |
| parent | a509bd76291d330c69cb89284b2d99a3512a199e (diff) | |
Port away from deprecated KMessageBox Yes/No
GIT_SILENT
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 384e91ec9..e4aa16d5f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -70,6 +70,7 @@ #include <KWindowSystem> #include <KXMLGUIFactory> +#include <kwidgetsaddons_version.h> #include <kio_version.h> #include <QApplication> @@ -1177,11 +1178,19 @@ void DolphinMainWindow::openTerminalHere() if (urls.count() > 5) { QString question = i18np("Are you sure you want to open 1 terminal window?", "Are you sure you want to open %1 terminal windows?", urls.count()); +#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) + const int answer = KMessageBox::warningTwoActions(this, question, {}, +#else const int answer = KMessageBox::warningYesNo(this, question, {}, +#endif KGuiItem(i18ncp("@action:button", "Open %1 Terminal", "Open %1 Terminals", urls.count()), QStringLiteral("utilities-terminal")), KStandardGuiItem::cancel()); +#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) + if (answer != KMessageBox::PrimaryAction) { +#else if (answer != KMessageBox::Yes) { +#endif return; } } |
