Commit 19b1d625 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Bump min Qt/KF version to 5.15/5.80

GIT_SILENT
parent bfd443aa
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
# Release Service version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "21")
......@@ -12,8 +12,8 @@ set(MARKDOWNPART_VERSION "${MARKDOWNPART_BASE_VERSION}.${RELEASE_SERVICE_COMPACT
project(markdownpart VERSION ${MARKDOWNPART_VERSION})
set(QT_MIN_VERSION "5.14.0")
set(KF_MIN_VERSION "5.66.0")
set(QT_MIN_VERSION "5.15.0")
set(KF_MIN_VERSION "5.80.0")
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
......@@ -45,7 +45,7 @@ add_definitions(
-DQT_NO_KEYWORDS
-DQT_NO_FOREACH
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054600
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055200
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
......
add_definitions(-DTRANSLATION_DOMAIN=\"markdownpart\")
if(${KF5_VERSION} VERSION_LESS 5.77.0)
configure_file(markdownpartconfig.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/markdownpartconfig.hpp)
endif()
configure_file(markdownpart.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/markdownpart.desktop @ONLY)
set(markdownpart_SRCS
......
......@@ -11,11 +11,7 @@
#include "markdownbrowserextension.hpp"
#include "searchtoolbar.hpp"
// KF
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
#include <KPluginMetaData>
#else
#include <KAboutData>
#endif
#include <KActionCollection>
#include <KStandardAction>
#include <KLocalizedString>
......@@ -36,11 +32,7 @@
#include <QVBoxLayout>
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
MarkdownPart::MarkdownPart(QWidget* parentWidget, QObject* parent, const KPluginMetaData& metaData, Modus modus)
#else
MarkdownPart::MarkdownPart(QWidget* parentWidget, QObject* parent, const KAboutData& aboutData, Modus modus)
#endif
: KParts::ReadOnlyPart(parent)
, m_sourceDocument(new QTextDocument(this))
, m_widget(new MarkdownView(m_sourceDocument, parentWidget))
......@@ -48,12 +40,7 @@ MarkdownPart::MarkdownPart(QWidget* parentWidget, QObject* parent, const KAboutD
, m_browserExtension(new MarkdownBrowserExtension(this))
{
// set component data
// the first arg must be the same as the subdirectory into which the part's rc file is installed
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
setMetaData(metaData);
#else
setComponentData(aboutData);
#endif
// set internal UI
auto* mainLayout = new QVBoxLayout;
......
......@@ -17,11 +17,7 @@
class MarkdownBrowserExtension;
class MarkdownView;
class SearchToolBar;
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
class KPluginMetaData;
#else
class KAboutData;
#endif
class QTextDocument;
......@@ -38,11 +34,7 @@ public:
/**
* Default constructor, with arguments as expected by MarkdownPartFactory
*/
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
MarkdownPart(QWidget* parentWidget, QObject* parent, const KPluginMetaData& metaData, Modus modus);
#else
MarkdownPart(QWidget* parentWidget, QObject* parent, const KAboutData& aboutData, Modus modus);
#endif
~MarkdownPart() override;
public:
......
/* Generated by cmake from markdownpartconfig.h.cmake */
#ifndef MARKDOWNPARTCONFIG_HPP
#define MARKDOWNPARTCONFIG_HPP
#define MARKDOWNPART_VERSION "@markdownpart_VERSION@"
#endif
......@@ -8,34 +8,12 @@
// part
#include "markdownpart.hpp"
#if KPARTS_VERSION < QT_VERSION_CHECK(5, 77, 0)
#include "markdownpartconfig.hpp"
#endif
// KF
#include <KLocalizedString>
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
#include <KPluginMetaData>
#endif
MarkdownPartFactory::MarkdownPartFactory()
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
{
#else
: m_aboutData(QStringLiteral("markdownpart"),
i18n("MarkdownPart"),
QStringLiteral(MARKDOWNPART_VERSION),
i18n("For the rendered display of Markdown files in a webpage-like layout"),
KAboutLicense::LGPL_V2_1,
i18n("Copyright 2020 Friedrich W. H. Kossebau"),
QString(),
QStringLiteral("https://commits.kde.org/markdownpart")
)
{
m_aboutData.addAuthor(i18nc("@info:credit", "Friedrich W. H. Kossebau"),
i18nc("@info:credit", "Author"), QStringLiteral("kossebau@kde.org"));
#endif
}
MarkdownPartFactory::MarkdownPartFactory() = default;
MarkdownPartFactory::~MarkdownPartFactory() = default;
......@@ -51,9 +29,5 @@ QObject* MarkdownPartFactory::create(const char* iface,
wantBrowserView ? MarkdownPart::BrowserViewModus :
/* else */ MarkdownPart::ReadOnlyModus;
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 77, 0)
return new MarkdownPart(parentWidget, parent, metaData(), modus);
#else
return new MarkdownPart(parentWidget, parent, m_aboutData, modus);
#endif
}
......@@ -10,9 +10,6 @@
// KF
#include <KPluginFactory>
#include <kparts_version.h>
#if KPARTS_VERSION < QT_VERSION_CHECK(5, 77, 0)
#include <KAboutData>
#endif
class MarkdownPartFactory : public KPluginFactory
......@@ -29,11 +26,6 @@ public:
QObject* create(const char* iface,
QWidget* parentWidget, QObject* parent,
const QVariantList& args, const QString& keyword) override;
#if KPARTS_VERSION < QT_VERSION_CHECK(5, 77, 0)
private:
KAboutData m_aboutData;
#endif
};
#endif
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