Accepting request 319198 from KDE:Qt5

- Added QMimeDatabase-use-QElapsedTimer.patch: reduces the number
  of syscalls greatly, by avoiding the timezone conversion every time;
  massively improves kbuildsycoca5 speed

- Fix the suse_version condition checks - treat Leap equally as 13.2
  wrt which system libs shall be used

OBS-URL: https://build.opensuse.org/request/show/319198
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=44
This commit is contained in:
Dominique Leuenberger 2015-08-02 20:45:47 +00:00 committed by Git OBS Bridge
parent f7a299974b
commit c56a9d1b0f
3 changed files with 74 additions and 3 deletions

View File

@ -0,0 +1,56 @@
From 3426ce9b8e62e8d76db0d9cc2899113c0c3cb073 Mon Sep 17 00:00:00 2001
From: David Faure <david.faure@kdab.com>
Date: Mon, 27 Jul 2015 00:22:11 +0200
Subject: [PATCH 1/1] QMimeDatabase: use QElapsedTimer instead of
QDateTime::currentDateTime()
This reduces the number of syscalls greatly, by avoiding the timezone
conversion every time.
Change-Id: I39a54def4b45f25c6e037ced6943b05ddc749c9d
---
src/corelib/mimetypes/qmimeprovider.cpp | 5 ++---
src/corelib/mimetypes/qmimeprovider_p.h | 3 ++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index cca9a40b9f28e1b45a6e5e0172f512c5880a10d6..9f6bdb30981f4f236ef422cfd16f6c1cd38c643f 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -77,10 +77,9 @@ Q_CORE_EXPORT int qmime_secondsBetweenChecks = 5; // exported for the unit test
bool QMimeProviderBase::shouldCheck()
{
- const QDateTime now = QDateTime::currentDateTime();
- if (m_lastCheck.isValid() && m_lastCheck.secsTo(now) < qmime_secondsBetweenChecks)
+ if (m_lastCheck.isValid() && m_lastCheck.elapsed() < qmime_secondsBetweenChecks)
return false;
- m_lastCheck = now;
+ m_lastCheck.start();
return true;
}
diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h
index 027fddd2c81ddb52fb3c383edfeda3a03f9ccaac..e4bc55a1a2deb5f4d030f451dd97729c2ca95bb8 100644
--- a/src/corelib/mimetypes/qmimeprovider_p.h
+++ b/src/corelib/mimetypes/qmimeprovider_p.h
@@ -48,6 +48,7 @@
#include <QtCore/qdatetime.h>
#include "qmimedatabase_p.h"
#include <QtCore/qset.h>
+#include <QtCore/qelapsedtimer.h>
QT_BEGIN_NAMESPACE
@@ -74,7 +75,7 @@ public:
QMimeDatabasePrivate *m_db;
protected:
bool shouldCheck();
- QDateTime m_lastCheck;
+ QElapsedTimer m_lastCheck;
};
/*
--
2.4.6

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jul 28 21:39:35 UTC 2015 - hrvoje.senjan@gmail.com
- Added QMimeDatabase-use-QElapsedTimer.patch: reduces the number
of syscalls greatly, by avoiding the timezone conversion every time;
massively improves kbuildsycoca5 speed
-------------------------------------------------------------------
Sun Jul 26 15:30:15 UTC 2015 - hrvoje.senjan@gmail.com
- Fix the suse_version condition checks - treat Leap equally as 13.2
wrt which system libs shall be used
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 9 19:04:26 UTC 2015 - hrvoje.senjan@gmail.com Tue Jun 9 19:04:26 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -71,6 +71,7 @@ Patch2012: 0003-Fix-centering-dialogs.patch
Patch2013: 0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch Patch2013: 0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch
Patch2014: 0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch Patch2014: 0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch
Patch2015: 0006-xcb-set-SM_CLIENT_ID-property.patch Patch2015: 0006-xcb-set-SM_CLIENT_ID-property.patch
Patch2016: QMimeDatabase-use-QElapsedTimer.patch
BuildRequires: alsa-devel BuildRequires: alsa-devel
BuildRequires: cups-devel BuildRequires: cups-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -111,12 +112,12 @@ BuildRequires: xz
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
%if 0%{?suse_version} >= 1320 %if 0%{?suse_version} > 1310
BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(harfbuzz)
%endif %endif
BuildRequires: pkgconfig(ice) BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(sm)
%if 0%{?suse_version} >= 1315 %if 0%{?suse_version} > 1310
BuildRequires: pkgconfig(xkbcommon) >= 0.4.1 BuildRequires: pkgconfig(xkbcommon) >= 0.4.1
BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1 BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1
%else %else
@ -167,6 +168,7 @@ handling.
%patch2013 -p1 %patch2013 -p1
%patch2014 -p1 %patch2014 -p1
%patch2015 -p1 %patch2015 -p1
%patch2016 -p1
# be sure not to use them # be sure not to use them
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib} rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
@ -759,7 +761,7 @@ echo yes | ./configure $platform \
-system-libjpeg \ -system-libjpeg \
-openssl-linked \ -openssl-linked \
-system-libpng \ -system-libpng \
%if 0%{?suse_version} >= 1320 %if 0%{?suse_version} > 1310
-system-harfbuzz \ -system-harfbuzz \
%endif %endif
-fontconfig \ -fontconfig \