SHA256
1
0
forked from pool/kcoreaddons
- Don't lower minimum Qt version anymore
- Drop patches for Qt 5.9
- Drop patches for Leap 42.x
- Drop conditionals for no longer supported distribution versions

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kcoreaddons?expand=0&rev=201
This commit is contained in:
Christophe Giboudeaux 2019-08-07 12:43:54 +00:00 committed by Git OBS Bridge
parent 8cdb244500
commit f65caf51a0
3 changed files with 7 additions and 74 deletions

View File

@ -1,68 +0,0 @@
From 16e8cf1e6607ae496515edce00a771ad0153b348 Mon Sep 17 00:00:00 2001
From: Milian Wolff <mail@milianw.de>
Date: Thu, 11 Jan 2018 15:39:35 +0100
Subject: Optimize: use QMetaObject::invokeMethod with functor
Summary:
When using this method with a string argument, the method would need
to be queried every time via QMetaObject::indexOfMethod. Using a
functor one can get rid of this, saving a few cycles which can
add up when handling many inotify events.
Note that the benchmark timing does not really improve significantly.
Using a profiler like perf, we do see that less cycles are consumed
though. In my measurement, this reduces the cpu cyles by about 2%.
Reviewers: dfaure
Subscribers: #frameworks
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D9823
---
src/lib/io/kdirwatch.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
(limited to 'src/lib/io/kdirwatch.cpp')
Rebased by Antonio Larrosa <alarrosa@suse.com> to recover this patch
which was later removed by
https://cgit.kde.org/kcoreaddons.git/commit/src/lib/io/kdirwatch.cpp?id=026bbfe17707b0f3999b8b461e24480a8a539226
diff --git a/src/lib/io/kdirwatch.cpp b/src/lib/io/kdirwatch.cpp
index eb8aeeb..7213ee6 100644
--- a/src/lib/io/kdirwatch.cpp
+++ b/src/lib/io/kdirwatch.cpp
@@ -1405,16 +1405,28 @@ void KDirWatchPrivate::emitEvent(Entry *e, int event, const QString &fileName)
// Emit the signals delayed, to avoid unexpected re-entrance from the slots (#220153)
if (event & Deleted) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+ QMetaObject::invokeMethod(c.instance, "setDeleted", Qt::QueuedConnection, Q_ARG(QString, path));
+#else
QMetaObject::invokeMethod(c.instance, [c, path]() { c.instance->setDeleted(path); }, Qt::QueuedConnection);
+#endif
}
if (event & Created) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+ QMetaObject::invokeMethod(c.instance, "setCreated", Qt::QueuedConnection, Q_ARG(QString, path));
+#else
QMetaObject::invokeMethod(c.instance, [c, path]() { c.instance->setCreated(path); }, Qt::QueuedConnection);
+#endif
// possible emit Change event after creation
}
if (event & Changed) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+ QMetaObject::invokeMethod(c.instance, "setDirty", Qt::QueuedConnection, Q_ARG(QString, path));
+#else
QMetaObject::invokeMethod(c.instance, [c, path]() { c.instance->setDirty(path); }, Qt::QueuedConnection);
+#endif
}
}
}
--
cgit v1.1

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jul 19 11:39:24 UTC 2019 - Wolfgang Bauer <wbauer@tmo.at>
- Don't lower minimum Qt version anymore, it requires 5.11 now
- Drop patch to support Qt 5.9:
* 0001-Do-not-use-functor-if-Qt-lt-5.10.patch
-------------------------------------------------------------------
Sun Jul 14 06:41:37 UTC 2019 - lbeltrame@kde.org

View File

@ -32,8 +32,6 @@ Group: System/GUI/KDE
URL: https://www.kde.org
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE
Patch0: 0001-Do-not-use-functor-if-Qt-lt-5.10.patch
BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules >= %{_tar_path}
BuildRequires: fdupes
@ -82,10 +80,6 @@ replacement, accessing user information and many more. Development files.
%prep
%setup -q
%autopatch -p1
%if 0%{?suse_version} == 1500
sed -i -e "s/^set *(REQUIRED_QT_VERSION 5.10.0)$/set(REQUIRED_QT_VERSION 5.9.0)/" CMakeLists.txt
%endif
%build
%cmake_kf5 -d build -- -Dlconvert_executable=%{_kf5_libdir}/qt5/bin/lconvert -DKDE4_DEFAULT_HOME=".kde4"