Commit 72fd4d35 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against last qt5.15

parent 7cd5e62a
......@@ -25,7 +25,11 @@ QString KPIM::AddresseeLineEditUtil::adaptPasteMails(const QString &str)
{
QString newText = str;
// remove newlines in the to-be-pasted string
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList lines = newText.split(QRegularExpression(QStringLiteral("\r?\n")), QString::SkipEmptyParts);
#else
QStringList lines = newText.split(QRegularExpression(QStringLiteral("\r?\n")), Qt::SkipEmptyParts);
#endif
QStringList::iterator end(lines.end());
for (QStringList::iterator it = lines.begin(); it != end; ++it) {
// remove trailing commas and whitespace
......
......@@ -225,7 +225,11 @@ void LdapClient::Private::finishCurrentObject()
// No explicit mail address found so far?
// Fine, then we use the address stored in the DN.
QString sMail;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList lMail = mCurrentObject.dn().toString().split(QStringLiteral(",dc="), QString::SkipEmptyParts);
#else
const QStringList lMail = mCurrentObject.dn().toString().split(QStringLiteral(",dc="), Qt::SkipEmptyParts);
#endif
const int n = lMail.count();
if (n) {
if (lMail.first().startsWith(QLatin1String("cn="), Qt::CaseInsensitive)) {
......
......@@ -249,7 +249,11 @@ void BlackListBalooEmailCompletionWidget::slotCheckIfUpdateBlackListIsNeeded()
void BlackListBalooEmailCompletionWidget::save()
{
const QString domain = mExcludeDomainLineEdit->text().remove(QLatin1Char(' '));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList newExcludeDomain = domain.split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList newExcludeDomain = domain.split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
bool needToSave = (mOriginalExcludeDomain != newExcludeDomain);
KSharedConfig::Ptr config = KSharedConfig::openConfig(QStringLiteral("kpimbalooblacklist"));
KConfigGroup group(config, "AddressLineEdit");
......
Markdown is supported
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