Hello community, here is the log from the commit of package kidletime for openSUSE:Factory checked in at 2020-12-15 12:28:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kidletime (Old) and /work/SRC/openSUSE:Factory/.kidletime.new.2328 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kidletime" Tue Dec 15 12:28:49 2020 rev:85 rq:855437 version:5.77.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kidletime/kidletime.changes 2020-11-23 10:32:25.637488670 +0100 +++ /work/SRC/openSUSE:Factory/.kidletime.new.2328/kidletime.changes 2020-12-15 12:30:59.772029883 +0100 @@ -1,0 +2,10 @@ +Sat Dec 5 18:56:38 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.77.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.77.0 +- Changes since 5.76.0: + * Load statically linked system poller plugins + +------------------------------------------------------------------- Old: ---- kidletime-5.76.0.tar.xz kidletime-5.76.0.tar.xz.sig New: ---- kidletime-5.77.0.tar.xz kidletime-5.77.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kidletime.spec ++++++ --- /var/tmp/diff_new_pack.Cpk7Ld/_old 2020-12-15 12:31:00.428030411 +0100 +++ /var/tmp/diff_new_pack.Cpk7Ld/_new 2020-12-15 12:31:00.432030414 +0100 @@ -17,7 +17,7 @@ %define lname libKF5IdleTime5 -%define _tar_path 5.76 +%define _tar_path 5.77 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) @@ -25,7 +25,7 @@ # Only needed for the package signature condition %bcond_without lang Name: kidletime -Version: 5.76.0 +Version: 5.77.0 Release: 0 Summary: User and system idle time reporting singleton License: LGPL-2.1-or-later @@ -41,10 +41,10 @@ BuildRequires: fdupes BuildRequires: kf5-filesystem BuildRequires: pkgconfig -BuildRequires: cmake(Qt5Core) >= 5.12.0 -BuildRequires: cmake(Qt5DBus) >= 5.12.0 -BuildRequires: cmake(Qt5Widgets) >= 5.12.0 -BuildRequires: cmake(Qt5X11Extras) >= 5.12.0 +BuildRequires: cmake(Qt5Core) >= 5.13.0 +BuildRequires: cmake(Qt5DBus) >= 5.13.0 +BuildRequires: cmake(Qt5Widgets) >= 5.13.0 +BuildRequires: cmake(Qt5X11Extras) >= 5.13.0 BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xext) @@ -72,7 +72,7 @@ Group: Development/Libraries/KDE Requires: %{lname} = %{version} Requires: extra-cmake-modules -Requires: cmake(Qt5Core) >= 5.12.0 +Requires: cmake(Qt5Core) >= 5.13.0 %description devel Development files for KIdleTime, which is a singleton reporting ++++++ kidletime-5.76.0.tar.xz -> kidletime-5.77.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kidletime-5.76.0/CMakeLists.txt new/kidletime-5.77.0/CMakeLists.txt --- old/kidletime-5.76.0/CMakeLists.txt 2020-11-07 12:38:58.000000000 +0100 +++ new/kidletime-5.77.0/CMakeLists.txt 2020-12-05 11:09:01.000000000 +0100 @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.76.0") # handled by release scripts +set(KF5_VERSION "5.77.0") # handled by release scripts project(KIdleTime VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.76.0 NO_MODULE) +find_package(ECM 5.77.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -30,7 +30,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) -set(REQUIRED_QT_VERSION 5.12.0) +set(REQUIRED_QT_VERSION 5.13.0) find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui) if(APPLE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kidletime-5.76.0/src/abstractsystempoller.h new/kidletime-5.77.0/src/abstractsystempoller.h --- old/kidletime-5.76.0/src/abstractsystempoller.h 2020-11-07 12:38:58.000000000 +0100 +++ new/kidletime-5.77.0/src/abstractsystempoller.h 2020-12-05 11:09:01.000000000 +0100 @@ -11,6 +11,8 @@ #include <QObject> +#define AbstractSystemPoller_iid "org.kde.kidletime.AbstractSystemPoller" + class KIDLETIME_EXPORT AbstractSystemPoller : public QObject { Q_OBJECT @@ -39,6 +41,6 @@ }; -Q_DECLARE_INTERFACE(AbstractSystemPoller, "org.kde.kidletime.AbstractSystemPoller") +Q_DECLARE_INTERFACE(AbstractSystemPoller, AbstractSystemPoller_iid) #endif /* ABSTRACTSYSTEMPOLLER_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kidletime-5.76.0/src/kidletime.cpp new/kidletime-5.77.0/src/kidletime.cpp --- old/kidletime-5.76.0/src/kidletime.cpp 2020-11-07 12:38:58.000000000 +0100 +++ new/kidletime-5.77.0/src/kidletime.cpp 2020-12-05 11:09:01.000000000 +0100 @@ -172,30 +172,57 @@ return ret; } +static bool checkPlatform(const QJsonObject &metadata, const QString &platformName) +{ + const QJsonArray platforms = metadata.value(QStringLiteral("MetaData")) + .toObject().value(QStringLiteral("platforms")).toArray(); + return std::any_of(platforms.begin(), platforms.end(), [&platformName](const QJsonValue &value) { + return QString::compare(platformName, value.toString(), Qt::CaseInsensitive) == 0; + }); +} + static AbstractSystemPoller *loadPoller() { + const QString platformName = QGuiApplication::platformName(); + + const QVector<QStaticPlugin> staticPlugins = QPluginLoader::staticPlugins(); + for (const QStaticPlugin &staticPlugin : staticPlugins) { + const QJsonObject metadata = staticPlugin.metaData(); + if (metadata.value(QLatin1String("IID")) != QLatin1String(AbstractSystemPoller_iid)) { + continue; + } + if (checkPlatform(metadata, platformName)) { + AbstractSystemPoller *poller = qobject_cast<AbstractSystemPoller *>(staticPlugin.instance()); + if (poller) { + if (poller->isAvailable()) { + qCDebug(KIDLETIME) << "Loaded system poller from a static plugin"; + return poller; + } + delete poller; + } + } + } + const QStringList lstPlugins = pluginCandidates(); for (const QString &candidate : lstPlugins) { if (!QLibrary::isLibrary(candidate)) { continue; } QPluginLoader loader(candidate); - QJsonObject metaData = loader.metaData(); - const QJsonArray platforms = metaData.value(QStringLiteral("MetaData")).toObject().value(QStringLiteral("platforms")).toArray(); - for (auto it = platforms.begin(); it != platforms.end(); ++it) { - if (QString::compare(QGuiApplication::platformName(), (*it).toString(), Qt::CaseInsensitive) == 0) { - AbstractSystemPoller *poller = qobject_cast< AbstractSystemPoller* >(loader.instance()); - if (poller) { - qCDebug(KIDLETIME) << "Trying plugin" << candidate; - if (poller->isAvailable()) { - qCDebug(KIDLETIME) << "Using" << candidate << "for platform" << QGuiApplication::platformName(); - return poller; - } - delete poller; + if (checkPlatform(loader.metaData(), platformName)) { + AbstractSystemPoller *poller = qobject_cast< AbstractSystemPoller* >(loader.instance()); + if (poller) { + qCDebug(KIDLETIME) << "Trying plugin" << candidate; + if (poller->isAvailable()) { + qCDebug(KIDLETIME) << "Using" << candidate << "for platform" << platformName; + return poller; } + delete poller; } } } + + qCWarning(KIDLETIME) << "Could not find any system poller plugin"; return nullptr; } _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org