From 5be69f0daba256cd3faad0aaa16dee8447a76af4 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Fri, 30 Sep 2022 19:56:52 +0200 Subject: Port away from deprecated KMessageBox Yes/No GIT_SILENT --- src/dolphinmainwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/dolphinmainwindow.cpp') 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 #include +#include #include #include @@ -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; } } -- cgit v1.3