Commit 07a58d2f authored by Laurent Montel's avatar Laurent Montel 😁

Now it depends against new version. Old code can be removed

parent 8ff56c1c
......@@ -74,11 +74,7 @@ int main(int argc, char *argv[])
}
if (parser.isSet(uidsOption)) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList &uids = parser.value(uidsOption).split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList &uids = parser.value(uidsOption).split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
if (!uids.isEmpty()) {
properties.insert(QStringLiteral("uids"), uids);
}
......
......@@ -5,7 +5,6 @@
*/
#include "sudlg.h"
#include <kwidgetsaddons_version.h>
#include <QByteArray>
#include <KLocalizedString>
......@@ -16,11 +15,7 @@ KDEsuDialog::KDEsuDialog(QByteArray user, QByteArray authUser, bool enableKeep,
: KPasswordDialog(nullptr, enableKeep ? ShowKeepPassword : NoFlags)
{
if ( !icon.isEmpty() ) {
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5,63,0)
setIcon(QIcon::fromTheme(icon));
#else
setPixmap(QIcon::fromTheme(icon).pixmap(style()->pixelMetric(QStyle::PM_LargeIconSize)));
#endif
}
if ( withIgnoreButton ) {
......
......@@ -441,11 +441,7 @@ void MimeTypeData::syncServices()
// Clean out any kde-mimeapps.list which would take precedence any cancel our changes.
const QString desktops = QString::fromLocal8Bit(qgetenv("XDG_CURRENT_DESKTOP"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
foreach (const QString &desktop, desktops.split(QLatin1Char(':'), QString::SkipEmptyParts)) {
#else
foreach (const QString &desktop, desktops.split(QLatin1Char(':'), Qt::SkipEmptyParts)) {
#endif
const QString file = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation)
+ QLatin1Char('/') + desktop.toLower()
+ QLatin1String("-mimeapps.list");
......
......@@ -22,7 +22,6 @@
#include <kconfiggroup.h>
#include <kdesktopfile.h>
#include <ksycoca.h>
#include <kcoreaddons_version.h>
// Qt
#include <QProcess>
......@@ -45,11 +44,7 @@ class FileTypesTest : public QObject
private Q_SLOTS:
void initTestCase()
{
#if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 73, 0)
QLoggingCategory::setFilterRules(QStringLiteral("kf.coreaddons.kdirwatch.debug=true"));
#else
QLoggingCategory::setFilterRules(QStringLiteral("kf5.kcoreaddons.kdirwatch.debug=true"));
#endif
QStandardPaths::setTestModeEnabled(true);
......
......@@ -211,9 +211,7 @@ bool ClientApp::kde_open(const QString& url, const QString& mimeType, bool allow
KRun * run = new KRun( info.url, nullptr );
run->setRunExecutables(allowExec);
#if KIO_VERSION >= QT_VERSION_CHECK(5,55,0)
run->setFollowRedirections(false);
#endif
QObject::connect( run, &KRun::finished, this, &ClientApp::delayedQuit);
QObject::connect( run, &KRun::error, this, &ClientApp::delayedQuit);
qApp->exec();
......
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