Commit 721042c2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated qt5 methods

parent fe47c24f
Pipeline #24631 passed with stage
in 6 minutes and 55 seconds
......@@ -229,7 +229,11 @@ KConfigBasedKeyFilter::KConfigBasedKeyFilter(const KConfigGroup &config)
{ "appearance", Appearance },
{ "filtering", Filtering },
};
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList contexts = config.readEntry("match-contexts", "any").toLower().split(QRegExp(QLatin1String("[^a-zA-Z0-9_-!]+")), QString::SkipEmptyParts);
#else
const QStringList contexts = config.readEntry("match-contexts", "any").toLower().split(QRegExp(QLatin1String("[^a-zA-Z0-9_-!]+")), Qt::SkipEmptyParts);
#endif
setMatchContexts(NoMatchContext);
for (const QString & ctx : contexts) {
bool found = false;
......
......@@ -979,7 +979,11 @@ Kleo::CryptoConfigEntryKeyserver::CryptoConfigEntryKeyserver(
Kleo::ParsedKeyserver Kleo::parseKeyserver(const QString &str)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList list = str.split(QRegExp(QLatin1String("[\\s,]")), QString::SkipEmptyParts);
#else
const QStringList list = str.split(QRegExp(QLatin1String("[\\s,]")), Qt::SkipEmptyParts);
#endif
if (list.empty()) {
return Kleo::ParsedKeyserver();
}
......
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