Commit 6d029470 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use directly QT_VERSION

parent 1c359dee
Pipeline #122499 passed with stage
in 10 minutes and 15 seconds
......@@ -27,8 +27,7 @@
using namespace std::chrono_literals;
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
......@@ -124,7 +123,7 @@ void MailDispatcherAgent::dispatch()
MailDispatcherAgent::MailDispatcherAgent(const QString &id)
: AgentBase(id)
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("maildispatcheragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("maildispatcheragentrc") << QStringLiteral("akonadi_maildispatcher_agent.notifyrc"));
migrate.migrate();
......
......@@ -32,8 +32,7 @@
#include <KLocalizedString>
#include <KMime/Message>
#include <KNotification>
#include <kcoreaddons_version.h>
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
#if HAVE_TEXT_TO_SPEECH_SUPPORT
......@@ -45,7 +44,7 @@ using namespace Akonadi;
NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
: AgentBase(id)
{
#if KCOREADDONS_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator migrate(QStringLiteral("newmailnotifieragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_newmailnotifier_agentrc") << QStringLiteral("akonadi_newmailnotifier_agent.notifyrc"));
migrate.migrate();
......
......@@ -10,7 +10,6 @@
#include "pimkolab_debug.h"
#include <QBuffer>
#include <QImageReader>
#include <kcontacts_version.h>
namespace Kolab
{
namespace Conversion
......@@ -461,13 +460,9 @@ KContacts::Addressee toKABC(const Kolab::Contact &contact)
} else {
preferredEmail = fromStdString(contact.emailAddresses().at(0).address());
}
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
addressee.insertEmail(preferredEmail, true);
#else
KContacts::Email email(preferredEmail);
email.setPreferred(true);
addressee.addEmail(email);
#endif
}
if (!contact.freeBusyUrl().empty()) {
......
......@@ -18,7 +18,6 @@
#include <QDomElement>
#include <QImage>
#include <QRegularExpression>
#include <kcontacts_version.h>
using namespace OXA;
void OXA::ContactUtils::parseContact(const QDomElement &propElement, Object &object)
......@@ -183,20 +182,12 @@ void OXA::ContactUtils::parseContact(const QDomElement &propElement, Object &obj
contact.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Office"), text);
// communication
} else if (tagName == QLatin1String("email1")) {
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
contact.insertEmail(text, true);
#else
KContacts::Email email(text);
email.setPreferred(true);
contact.addEmail(email);
#endif
} else if (tagName == QLatin1String("email2") || tagName == QLatin1String("email3")) {
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
contact.insertEmail(text);
#else
KContacts::Email email(text);
contact.addEmail(email);
#endif
} else if (tagName == QLatin1String("mobile1")) {
contact.insertPhoneNumber(KContacts::PhoneNumber(text, KContacts::PhoneNumber::Cell));
} else if (tagName == QLatin1String("instant_messenger")) {
......
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