diff --git a/src/declarativeimports/calendar/calendar.cpp b/src/declarativeimports/calendar/calendar.cpp index bf8b6ddda..cb1f10499 100644 --- a/src/declarativeimports/calendar/calendar.cpp +++ b/src/declarativeimports/calendar/calendar.cpp @@ -28,11 +28,7 @@ Calendar::Calendar(QObject *parent) QDateTime Calendar::displayedDate() const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) return m_displayedDate.startOfDay(); -#else - return QDateTime(m_displayedDate); -#endif } void Calendar::setDisplayedDate(const QDate &dateTime) @@ -65,11 +61,7 @@ void Calendar::setDisplayedDate(const QDateTime &dateTime) QDateTime Calendar::today() const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) return m_today.startOfDay(); -#else - return QDateTime(m_today); -#endif } void Calendar::setToday(const QDateTime &dateTime) diff --git a/src/declarativeimports/calendar/calendarplugin.cpp b/src/declarativeimports/calendar/calendarplugin.cpp index 01df50070..7c5865d56 100644 --- a/src/declarativeimports/calendar/calendarplugin.cpp +++ b/src/declarativeimports/calendar/calendarplugin.cpp @@ -27,13 +27,8 @@ void CalendarPlugin::registerTypes(const char *uri) Q_ASSERT(uri == QByteArray("org.kde.plasma.calendar")); qmlRegisterType(uri, 2, 0, "CalendarData"); qmlRegisterType(uri, 2, 0, "Calendar"); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) qmlRegisterAnonymousType(uri, 1); qmlRegisterAnonymousType(uri, 1); -#else - qmlRegisterType(); - qmlRegisterType(); -#endif qmlRegisterSingletonType(uri, 2, 0, "EventPluginsManager", event_plugins_manager_provider); qmlRegisterUncreatableType(uri, 2, 0, "EventDataDecorator", QStringLiteral("Unabel to create EventDataDecorator from QML")); diff --git a/src/declarativeimports/core/corebindingsplugin.cpp b/src/declarativeimports/core/corebindingsplugin.cpp index 7e9b9f94f..78c24fdc9 100644 --- a/src/declarativeimports/core/corebindingsplugin.cpp +++ b/src/declarativeimports/core/corebindingsplugin.cpp @@ -110,17 +110,9 @@ QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations") QT_WARNING_POP qmlRegisterType(uri, 2, 0, "ServiceOperationStatus"); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) qmlRegisterAnonymousType(uri, 1); -#else - qmlRegisterType(); -#endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) qmlRegisterAnonymousType(uri, 1); -#else - qmlRegisterType(); -#endif qmlRegisterType(uri, 2, 0, "IconItem"); qmlRegisterType(uri, 2, 0, "WindowThumbnail"); diff --git a/src/plasma/containmentactions.cpp b/src/plasma/containmentactions.cpp index 5325d3f3e..bc3ff95cd 100644 --- a/src/plasma/containmentactions.cpp +++ b/src/plasma/containmentactions.cpp @@ -121,15 +121,9 @@ QString ContainmentActions::eventToString(QEvent *event) case QEvent::Wheel: { QWheelEvent *e = static_cast(event); trigger = QStringLiteral("wheel:"); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - const int o = QObject::staticQtMetaObject.indexOfEnumerator("Orientations"); - QMetaEnum orient = QObject::staticQtMetaObject.enumerator(o); - trigger += QString::fromLatin1(orient.valueToKey(e->orientation())); -#else // ContainmentInterface::wheelEvent uses angleDelta.y() // To support both, should we just remove this orientation string? trigger += QStringLiteral("Vertical"); -#endif modifiers = e->modifiers(); break; } diff --git a/src/plasma/pluginloader.cpp b/src/plasma/pluginloader.cpp index feea3ec7e..5cfee0de2 100644 --- a/src/plasma/pluginloader.cpp +++ b/src/plasma/pluginloader.cpp @@ -646,11 +646,7 @@ QStringList PluginLoader::listAppletCategories(const QString &parentApp, bool vi void PluginLoader::setCustomAppletCategories(const QStringList &categories) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) PluginLoaderPrivate::s_customCategories = QSet(categories.begin(), categories.end()); -#else - PluginLoaderPrivate::s_customCategories = QSet::fromList(categories); -#endif } QStringList PluginLoader::customAppletCategories() const diff --git a/src/plasma/svg.cpp b/src/plasma/svg.cpp index 3db90389c..a589a8092 100644 --- a/src/plasma/svg.cpp +++ b/src/plasma/svg.cpp @@ -680,11 +680,7 @@ void SvgPrivate::createRenderer() void SvgPrivate::eraseRenderer() { if (renderer && -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) renderer->ref.loadRelaxed() == 2) { -#else - renderer->ref.load() == 2) { -#endif // this and the cache reference it s_renderers.erase(s_renderers.find(styleCrc + path)); } diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index 7b98f8e2e..9a96c652b 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -1278,24 +1278,13 @@ bool Dialog::event(QEvent *event) case QEvent::Wheel: { QWheelEvent *we = static_cast(event); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - const QPoint pos = we->pos(); -#else const QPoint pos = we->position().toPoint(); -#endif if (!d->mainItemContainsPosition(pos)) { -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QWheelEvent we2(d->positionAdjustedForMainItem(pos), - d->positionAdjustedForMainItem(pos) + position(), - we->pixelDelta(), we->angleDelta(), we->angleDelta().y(), - we->orientation(), we->buttons(), we->modifiers(), we->phase()); -#else QWheelEvent we2(d->positionAdjustedForMainItem(pos), d->positionAdjustedForMainItem(pos) + position(), we->pixelDelta(), we->angleDelta(), we->buttons(), we->modifiers(), we->phase(), false /*inverted*/); -#endif if (isVisible()) { QCoreApplication::sendEvent(this, &we2); diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 8c8301859..9e68c49d9 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -43,11 +43,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant m_dummyNativeInterface(nullptr), m_positionBeforeRemoval(QPointF(-1, -1)) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) qmlRegisterAnonymousType("org.kde.plasma.plasmoid", 1); -#else - qmlRegisterType(); -#endif connect(this, &AppletInterface::configNeedsSaving, applet(), &Plasma::Applet::configNeedsSaving); diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index badb3ad8b..970731943 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -445,11 +445,7 @@ void ContainmentInterface::processMimeData(QMimeData *mimeData, int x, int y, KI if (mimeData->hasFormat(QStringLiteral("text/x-plasmoidservicename"))) { QString data = QString::fromUtf8( mimeData->data(QStringLiteral("text/x-plasmoidservicename")) ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) const QStringList appletNames = data.split(QLatin1Char('\n'), Qt::SkipEmptyParts); -#else - const QStringList appletNames = data.split(QLatin1Char('\n'), QString::SkipEmptyParts); -#endif for (const QString &appletName : appletNames) { qDebug() << "adding" << appletName; diff --git a/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp b/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp index 4cece7b34..486db1262 100644 --- a/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp +++ b/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp @@ -49,11 +49,7 @@ DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariant qmlRegisterUncreatableType("org.kde.plasma.plasmoid", 2, 0, "Wallpaper", QStringLiteral("Do not create objects of type Wallpaper")); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) qmlRegisterAnonymousType("org.kde.plasma.plasmoid", 1); -#else - qmlRegisterType(); -#endif } DeclarativeAppletScript::~DeclarativeAppletScript()