aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2021-09-21 12:43:57 +0200
committerBart Ribbers <bribbers@disroot.org>2021-09-21 13:01:31 +0200
commitf479373be8f583e67c7155d68c08c865f95b1f55 (patch)
tree5af073acc692ee35444c9cc94aac832eb4b94c33
parent830e21739928c710e773a36f2795ed569140b2d3 (diff)
downloadaports-f479373be8f583e67c7155d68c08c865f95b1f55.tar.gz
aports-f479373be8f583e67c7155d68c08c865f95b1f55.tar.bz2
aports-f479373be8f583e67c7155d68c08c865f95b1f55.tar.xz
community/ruqola: upgrade to 1.5.0
-rw-r--r--community/ruqola/0001-Make-it-compile-with-last-api.patch143
-rw-r--r--community/ruqola/0001-Port-away-from-KStatefulBrush-brush.patch25
-rw-r--r--community/ruqola/0002-Build-against-last-kf5.patch40
-rw-r--r--community/ruqola/APKBUILD11
4 files changed, 189 insertions, 30 deletions
diff --git a/community/ruqola/0001-Make-it-compile-with-last-api.patch b/community/ruqola/0001-Make-it-compile-with-last-api.patch
new file mode 100644
index 0000000000..b436baabb4
--- /dev/null
+++ b/community/ruqola/0001-Make-it-compile-with-last-api.patch
@@ -0,0 +1,143 @@
+From 41dd72101605cf1b97a01ab9d3bfa675358066c2 Mon Sep 17 00:00:00 2001
+From: Laurent Montel <montel@kde.org>
+Date: Thu, 19 Aug 2021 13:10:40 +0200
+Subject: [PATCH] Make it compile with last api
+
+---
+ src/core/authenticationmanager.cpp | 14 +++++++++++++-
+ src/core/authenticationmanager.h | 1 +
+ src/widgets/room/textpluginmanager.cpp | 13 +++++++++++++
+ src/widgets/room/textpluginmanager.h | 1 +
+ 4 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/authenticationmanager.cpp b/src/core/authenticationmanager.cpp
+index db7ff9f03..710e0d899 100644
+--- a/src/core/authenticationmanager.cpp
++++ b/src/core/authenticationmanager.cpp
+@@ -19,8 +19,8 @@
+ */
+
+ #include "authenticationmanager.h"
++#include "kcoreaddons_version.h"
+ #include "ruqola_debug.h"
+-
+ #include <KPluginFactory>
+ #include <KPluginLoader>
+ #include <KPluginMetaData>
+@@ -46,7 +46,11 @@ AuthenticationManager *AuthenticationManager::self()
+
+ void AuthenticationManager::initializePluginList()
+ {
++#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 86, 0)
+ const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("ruqolaplugins/authentication"));
++#else
++ const QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("ruqolaplugins/authentication"));
++#endif
+
+ QVectorIterator<KPluginMetaData> i(plugins);
+ i.toBack();
+@@ -58,6 +62,7 @@ void AuthenticationManager::initializePluginList()
+ // 1) get plugin data => name/description etc.
+ info.pluginData = createPluginMetaData(data);
+ // 2) look at if plugin is activated
++ info.data = data;
+ info.metaDataFileNameBaseName = QFileInfo(data.fileName()).baseName();
+ info.metaDataFileName = data.fileName();
+ // only load plugins once, even if found multiple times!
+@@ -76,11 +81,18 @@ void AuthenticationManager::initializePluginList()
+
+ void AuthenticationManager::loadPlugin(AuthenticationManagerInfo *item)
+ {
++#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 86, 0)
+ KPluginLoader pluginLoader(item->metaDataFileName);
+ if (pluginLoader.factory()) {
+ item->plugin = pluginLoader.factory()->create<PluginAuthentication>(this, QVariantList() << item->metaDataFileNameBaseName);
+ mPluginDataList.append(item->pluginData);
+ }
++#else
++ if (auto plugin = KPluginFactory::instantiatePlugin<PluginAuthentication>(item->data, this, QVariantList() << item->metaDataFileNameBaseName).plugin) {
++ item->plugin = plugin;
++ mPluginDataList.append(item->pluginData);
++ }
++#endif
+ }
+
+ QVector<PluginAuthentication *> AuthenticationManager::pluginsList() const
+diff --git a/src/core/authenticationmanager.h b/src/core/authenticationmanager.h
+index 95bfdde4c..2dc10ff86 100644
+--- a/src/core/authenticationmanager.h
++++ b/src/core/authenticationmanager.h
+@@ -44,6 +44,7 @@ public:
+ {
+ }
+
++ KPluginMetaData data;
+ QString metaDataFileNameBaseName;
+ QString metaDataFileName;
+ PluginUtilData pluginData;
+diff --git a/src/widgets/room/textpluginmanager.cpp b/src/widgets/room/textpluginmanager.cpp
+index f8be071ad..a58b03e48 100644
+--- a/src/widgets/room/textpluginmanager.cpp
++++ b/src/widgets/room/textpluginmanager.cpp
+@@ -19,6 +19,7 @@
+ */
+
+ #include "textpluginmanager.h"
++#include "kcoreaddons_version.h"
+ #include "plugins/plugintext.h"
+
+ #include <KPluginFactory>
+@@ -45,7 +46,11 @@ TextPluginManager *TextPluginManager::self()
+
+ void TextPluginManager::initializePluginList()
+ {
++#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 86, 0)
+ const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("ruqolaplugins/textplugins"));
++#else
++ const QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("ruqolaplugins/textplugins"));
++#endif
+
+ QVectorIterator<KPluginMetaData> i(plugins);
+ i.toBack();
+@@ -59,6 +64,7 @@ void TextPluginManager::initializePluginList()
+ // 2) look at if plugin is activated
+ info.metaDataFileNameBaseName = QFileInfo(data.fileName()).baseName();
+ info.metaDataFileName = data.fileName();
++ info.data = data;
+ // only load plugins once, even if found multiple times!
+ if (unique.contains(info.metaDataFileNameBaseName)) {
+ continue;
+@@ -75,11 +81,18 @@ void TextPluginManager::initializePluginList()
+
+ void TextPluginManager::loadPlugin(TextPluginManagerInfo *item)
+ {
++#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 86, 0)
+ KPluginLoader pluginLoader(item->metaDataFileName);
+ if (pluginLoader.factory()) {
+ item->plugin = pluginLoader.factory()->create<PluginText>(this, QVariantList() << item->metaDataFileNameBaseName);
+ mPluginDataList.append(item->pluginData);
+ }
++#else
++ if (auto plugin = KPluginFactory::instantiatePlugin<PluginText>(item->data, this, QVariantList() << item->metaDataFileNameBaseName).plugin) {
++ item->plugin = plugin;
++ mPluginDataList.append(item->pluginData);
++ }
++#endif
+ }
+
+ QVector<PluginText *> TextPluginManager::pluginsList() const
+diff --git a/src/widgets/room/textpluginmanager.h b/src/widgets/room/textpluginmanager.h
+index b19510567..a88188366 100644
+--- a/src/widgets/room/textpluginmanager.h
++++ b/src/widgets/room/textpluginmanager.h
+@@ -46,6 +46,7 @@ public:
+ {
+ }
+
++ KPluginMetaData data;
+ QString metaDataFileNameBaseName;
+ QString metaDataFileName;
+ PluginTextUtilData pluginData;
+--
+GitLab
+
diff --git a/community/ruqola/0001-Port-away-from-KStatefulBrush-brush.patch b/community/ruqola/0001-Port-away-from-KStatefulBrush-brush.patch
deleted file mode 100644
index f2754d3456..0000000000
--- a/community/ruqola/0001-Port-away-from-KStatefulBrush-brush.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 1c9e8072fcb6cdbc1b3f2201eba902706f917b58 Mon Sep 17 00:00:00 2001
-From: Laurent Montel <montel@kde.org>
-Date: Thu, 24 Jun 2021 17:39:24 +0200
-Subject: [PATCH] Port away from KStatefulBrush::brush(const QWidget*)
-
----
- src/widgets/dialogs/channelnamevalidlineedit.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/widgets/dialogs/channelnamevalidlineedit.cpp b/src/widgets/dialogs/channelnamevalidlineedit.cpp
-index f2b4b625e..f90b66ec4 100644
---- a/src/widgets/dialogs/channelnamevalidlineedit.cpp
-+++ b/src/widgets/dialogs/channelnamevalidlineedit.cpp
-@@ -69,7 +69,7 @@ void ChannelNameValidLineEdit::updateStyleSheet(bool state)
- QString styleSheet;
- if (mNegativeBackground.isEmpty()) {
- const KStatefulBrush bgBrush(KColorScheme::View, KColorScheme::NegativeBackground);
-- mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(this).color().name());
-+ mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(palette()).color().name());
- }
- if (!state) {
- styleSheet = mNegativeBackground;
---
-GitLab
-
diff --git a/community/ruqola/0002-Build-against-last-kf5.patch b/community/ruqola/0002-Build-against-last-kf5.patch
new file mode 100644
index 0000000000..0311996781
--- /dev/null
+++ b/community/ruqola/0002-Build-against-last-kf5.patch
@@ -0,0 +1,40 @@
+From fbb4979c96f4d5b7df8fbd59591fb6ec3d489e05 Mon Sep 17 00:00:00 2001
+From: Laurent Montel <montel@kde.org>
+Date: Mon, 23 Aug 2021 06:56:25 +0200
+Subject: [PATCH] Build against last kf5
+
+---
+ src/widgets/configuredialog/configurefontwidget.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/widgets/configuredialog/configurefontwidget.cpp b/src/widgets/configuredialog/configurefontwidget.cpp
+index 35f36d487..3a858202c 100644
+--- a/src/widgets/configuredialog/configurefontwidget.cpp
++++ b/src/widgets/configuredialog/configurefontwidget.cpp
+@@ -22,6 +22,7 @@
+ #include "ruqolaglobalconfig.h"
+ #include <KFontChooser>
+ #include <KLocalizedString>
++#include <kwidgetsaddons_version.h>
+
+ #include <QCheckBox>
+ #include <QVBoxLayout>
+@@ -29,8 +30,15 @@
+ ConfigureFontWidget::ConfigureFontWidget(QWidget *parent)
+ : QWidget(parent)
+ , mCustomFontCheck(new QCheckBox(i18n("&Use custom fonts"), this))
++#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 86, 0)
++ , mFontChooser(new KFontChooser(KFontChooser::DisplayFrame, this))
++#else
+ , mFontChooser(new KFontChooser(this, KFontChooser::DisplayFrame, QStringList(), 4))
++#endif
+ {
++#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 86, 0)
++ mFontChooser->setMinVisibleItems(4);
++#endif
+ auto mainLayout = new QVBoxLayout(this);
+ mainLayout->setObjectName(QStringLiteral("mainLayout"));
+ mainLayout->setContentsMargins({});
+--
+GitLab
+
diff --git a/community/ruqola/APKBUILD b/community/ruqola/APKBUILD
index dbe64f9b38..ef6aa9890e 100644
--- a/community/ruqola/APKBUILD
+++ b/community/ruqola/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ruqola
-pkgver=1.4.1
+pkgver=1.5.0
pkgrel=0
pkgdesc="A Qt/QML client for Rocket Chat"
url="https://invent.kde.org/network/ruqola"
@@ -9,7 +9,6 @@ url="https://invent.kde.org/network/ruqola"
# s390x, mips64 and riscv64 blocked by polkit -> kio
arch="all !armhf !s390x !mips64 !riscv64"
license="GPL-2.0-only OR GPL-3.0-only"
-depends="kirigami2"
makedepends="
extra-cmake-modules
kconfig-dev
@@ -35,7 +34,8 @@ makedepends="
"
checkdepends="xvfb-run"
source="https://invent.kde.org/network/ruqola/-/archive/v$pkgver/ruqola-v$pkgver.tar.gz
- 0001-Port-away-from-KStatefulBrush-brush.patch
+ 0001-Make-it-compile-with-last-api.patch
+ 0002-Build-against-last-kf5.patch
"
builddir="$srcdir/$pkgname-v$pkgver"
@@ -75,6 +75,7 @@ package() {
}
sha512sums="
-1907667fd40a358497156c413b3cb7594a2efaf3f2a4633281b21d8f1bbd6f4b58ed9f7c72352b4a533d436776cd229adfd44d2b1653213c1b5581fbc2eb3337 ruqola-v1.4.1.tar.gz
-18ba23a2c9cfa091257b1984e90306be46b08a518906273c811017b3af176784bbab474d481b7d8bfdd7151041364f2ce734b3acbfc379ba7670f3e7b2d03c7e 0001-Port-away-from-KStatefulBrush-brush.patch
+4844b48134b1f10e9b0c76974b39dc132d36230911ee15f965f5af0e8e41aa5e5cce21a25b73056162fa8adee816b9e1102086413cbd50aaafdbbbf4e8a0e821 ruqola-v1.5.0.tar.gz
+22ec1f0812917d578a391d2ac1bfd2381a7067b4d6fa6f7e8e6a49034224ff742b75c1f58cbbc2dda58810f197b5eda862f2cde4c2d4211c6272fa0f23928363 0001-Make-it-compile-with-last-api.patch
+e8f1d14138928f53a79559276919f779d70a530b14319e3e843b12356525b1c6982731af20ce60857e68071982865adb969072286eb9f5fad2b0025187760a62 0002-Build-against-last-kf5.patch
"