Commit b5fba0d5 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Reset KF_MIN_VERSION back to 5.71.0

7e42fcc2 updated KF_MIN_VERSION; reset
it back to a lower version with #ifdefs
parent 38fc4569
Pipeline #99521 passed with stage
in 1 minute and 52 seconds
......@@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
# Match KDE Frameworks update Apr 2021
set (QT_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.86.0")
set (KF5_MIN_VERSION "5.71.0")
# Release script will create bugzilla versions
project(konsole VERSION ${RELEASE_SERVICE_VERSION})
......
......@@ -21,6 +21,12 @@
#include <KMainWindow>
#include <KPluginFactory>
#include <qtest.h>
#include <kservice_version.h>
#if KSERVICE_VERSION < QT_VERSION_CHECK(5, 86, 0)
#include <KPluginLoader>
#include <KService>
#endif
// Konsole
#include "../Pty.h"
......@@ -103,11 +109,21 @@ void PartManualTest::shortcutTriggered()
KParts::Part *PartManualTest::createPart()
{
const KPluginFactory::Result<KParts::Part> result = KPluginFactory::instantiatePlugin<KParts::Part>(KPluginMetaData(QStringLiteral("konsolepart")), this);
#if KSERVICE_VERSION < QT_VERSION_CHECK(5, 86, 0)
KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
Q_ASSERT(service);
KPluginFactory *factory = KPluginLoader(service->library()).factory();
Q_ASSERT(factory);
auto *terminalPart = factory->create<KParts::Part>(this);
return terminalPart;
#else
const KPluginFactory::Result<KParts::Part> result = KPluginFactory::instantiatePlugin<KParts::Part>(KPluginMetaData(QStringLiteral("konsolepart")), this);
Q_ASSERT(result);
return result.plugin;
#endif
}
QTEST_MAIN(PartManualTest)
......@@ -16,6 +16,12 @@
#include <KWindowSystem>
#include <kwindowsystem_version.h>
#include <kservice_version.h>
#if KSERVICE_VERSION < QT_VERSION_CHECK(5, 86, 0)
#include <KPluginLoader>
#include <KService>
#endif
// see below notes
//#include "../../../WindowSystemInfo.h"
......@@ -73,12 +79,22 @@ demo_konsolepart::~demo_konsolepart()
KParts::ReadOnlyPart *demo_konsolepart::createPart()
{
#if KSERVICE_VERSION < QT_VERSION_CHECK(5, 86, 0)
KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
Q_ASSERT(service);
KPluginFactory *factory = KPluginLoader(service->library()).factory();
Q_ASSERT(factory);
auto *terminalPart = factory->create<KParts::ReadOnlyPart>(this);
return terminalPart;
#else
const KPluginFactory::Result<KParts::ReadOnlyPart> result =
KPluginFactory::instantiatePlugin<KParts::ReadOnlyPart>(KPluginMetaData(QStringLiteral("konsolepart")), this);
Q_ASSERT(result);
return result.plugin;
#endif
}
void demo_konsolepart::manageProfiles()
......
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