Commit caa85f77 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Port away from deprecated KIO messageBox Yes/No API

NO_CHANGELOG
parent e8f455ca
Pipeline #252291 failed with stage
in 2 minutes and 46 seconds
......@@ -55,6 +55,7 @@
#include <errno.h>
#endif
#include <kio_version.h>
#include <KLocalizedString>
#include <KRemoteEncoding>
......@@ -665,8 +666,13 @@ int fishProtocol::establishConnection(const QByteArray &buffer) {
#else
return 0;
} else if (buf.endsWith('?')) {
#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
int rc = messageBox(QuestionTwoActions, thisFn+buf, QString(), i18nc("@action:button", "Yes"), i18nc("@action:button", "No"));
if (rc == KIO::SlaveBase::PrimaryAction) {
#else
int rc = messageBox(QuestionYesNo,thisFn+buf);
if (rc == KIO::SlaveBase::Yes) {
#endif
writeChild("yes\n",4);
} else {
writeChild("no\n",3);
......@@ -680,8 +686,13 @@ int fishProtocol::establishConnection(const QByteArray &buffer) {
}
#ifdef Q_OS_WIN
if (buf.endsWith(QLatin1String("(y/n)"))) {
#if KIO_VERSION >= QT_VERSION_CHECK(5, 100, 0)
int rc = messageBox(QuestionTwoActions, thisFn+buf, QString(), i18nc("@action:button", "Yes"), i18nc("@action:button", "No"));
if (rc == KIO::SlaveBase::PrimaryAction) {
#else
int rc = messageBox(QuestionYesNo,thisFn+buf);
if (rc == KIO::SlaveBase::Yes) {
#endif
writeChild("y\n",2);
} else {
writeChild("n\n",2);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment