summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilian Wolff <mail@milianw.de>2016-08-21 22:56:40 (GMT)
committerMilian Wolff <mail@milianw.de>2016-08-21 22:56:40 (GMT)
commitcf68a15c3dccfc11d1fb0a4aeef13908706f55f8 (patch)
tree03d141446f63a98cec2ae4e3c26cb8461b0beac8
parent31a9940a617ccfc0cb922ea676ccd515dc5b64e0 (diff)
Fix compile when deprecated Qt features are disabled
-rw-r--r--src/kmanagesieve/session.cpp1
-rw-r--r--src/ksieveui/util/util.cpp13
2 files changed, 10 insertions, 4 deletions
diff --git a/src/kmanagesieve/session.cpp b/src/kmanagesieve/session.cpp
index e5981aa..b4ed2c8 100644
--- a/src/kmanagesieve/session.cpp
+++ b/src/kmanagesieve/session.cpp
@@ -35,6 +35,7 @@
#include <kio/job.h>
#include <QRegularExpression>
#include <QTimer>
+#include <QUrlQuery>
using namespace KManageSieve;
diff --git a/src/ksieveui/util/util.cpp b/src/ksieveui/util/util.cpp
index 60e5127..8a82b10 100644
--- a/src/ksieveui/util/util.cpp
+++ b/src/ksieveui/util/util.cpp
@@ -45,6 +45,7 @@
#include <kimap/loginjob.h>
#include <kmime/kmime_message.h>
#include <MailTransport/mailtransport/transport.h>
+#include <QUrlQuery>
using namespace KSieveUi;
@@ -109,11 +110,13 @@ QUrl KSieveUi::Util::findSieveUrlForAccount(const QString &identifier, bool with
authStr = QStringLiteral("PLAIN");
break;
}
- u.addQueryItem(QStringLiteral("x-mech"), authStr);
+ QUrlQuery query;
+ query.addQueryItem(QStringLiteral("x-mech"), authStr);
const QString resultSafety = interface->safety();
if (resultSafety == QLatin1String("None")) {
- u.addQueryItem(QStringLiteral("x-allow-unencrypted"), QStringLiteral("true"));
+ query.addQueryItem(QStringLiteral("x-allow-unencrypted"), QStringLiteral("true"));
}
+ u.setQuery(query);
u = u.adjusted(QUrl::RemoveFilename);
if (withVacationFileName) {
u.setPath(u.path() + QLatin1Char('/') + QString(interface->sieveVacationFilename()));
@@ -150,10 +153,12 @@ QUrl KSieveUi::Util::findSieveUrlForAccount(const QString &identifier, bool with
authStr = QStringLiteral("PLAIN");
break;
}
- u.addQueryItem(QStringLiteral("x-mech"), authStr);
+ QUrlQuery query;
+ query.addQueryItem(QStringLiteral("x-mech"), authStr);
if (resultSafety == QLatin1String("None")) {
- u.addQueryItem(QStringLiteral("x-allow-unencrypted"), QStringLiteral("true"));
+ query.addQueryItem(QStringLiteral("x-allow-unencrypted"), QStringLiteral("true"));
}
+ u.setQuery(query);
const QString resultCustomAuthentication = interface->sieveCustomAuthentification();
if (resultCustomAuthentication == QLatin1String("ImapUserPassword")) {