Accepting request 338269 from KDE:Qt5

- Added xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch
  and xcb-fix-yet-another-crash-when-screens-are-disconnected.patch
  (kde#341497, qtbug#47385)

- Added QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch

- When in SLE12, use the internal Harfbuzz version instead of the system
  one (which is too old for Qt's requirements)

- Fix-compile-error-on-big-endian.patch: Fix compile error on big endian

OBS-URL: https://build.opensuse.org/request/show/338269
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=47
This commit is contained in:
Dominique Leuenberger 2015-10-14 14:39:32 +00:00 committed by Git OBS Bridge
parent 05c147f1a9
commit 3b1f949c32
6 changed files with 203 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 02ab210ea9bc5ee53fa4f1db2f068ce24272a6cd Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Date: Fri, 3 Jul 2015 14:19:02 +0200
Subject: [PATCH] Fix compile error on big endian
DestFormat is not defined here but should be Format_RGBX8888
Change-Id: Ie33989a6fc31650434281a6b7b0f4806524268af
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
---
src/gui/image/qimage_conversions.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: qtbase-opensource-src-5.5.0/src/gui/image/qimage_conversions.cpp
===================================================================
--- qtbase-opensource-src-5.5.0.orig/src/gui/image/qimage_conversions.cpp
+++ qtbase-opensource-src-5.5.0/src/gui/image/qimage_conversions.cpp
@@ -1103,7 +1103,7 @@ static bool mask_alpha_converter_rgbx_in
}
rgb_data += pad;
}
- data->format = DestFormat;
+ data->format = QImage::Format_RGBX8888;
return true;
#endif
}

View File

@ -0,0 +1,47 @@
From eda79a467ee7e45f3de63973b633e2a790b613eb Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Thu, 25 Jun 2015 22:34:58 +0200
Subject: QDate/QTime: fix SiC introduced by adding new non-explicit ctors
The new constructors were added in c94d41d9 to help
constexpr'ify QDate and QTime. Even though private,
they participate in overload resolution and break
function pairs overloaded on QDate and int or
QTime and int.
Mark them explicit.
[ChangeLog][QtCore][QDate/QTime] Fixed a minor source-incompatibility
between Qt 5.4 and 5.5.0 involving sets of functions overloaded on
QTime and some integer or QDate and some integer.
Change-Id: I65a09aaca2b083cda90255c24cc72ef51119d3b1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
---
src/corelib/tools/qdatetime.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index 78ec2b1..6651efd 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -59,7 +59,7 @@ public:
StandaloneFormat
};
private:
- Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
+ explicit Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {}
public:
Q_DECL_CONSTEXPR QDate() : jd(nullJd()) {}
QDate(int y, int m, int d);
@@ -138,7 +138,7 @@ Q_DECLARE_TYPEINFO(QDate, Q_MOVABLE_TYPE);
class Q_CORE_EXPORT QTime
{
- Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
+ explicit Q_DECL_CONSTEXPR QTime(int ms) : mds(ms)
#if defined(Q_OS_WINCE)
, startTick(NullTime)
#endif
--
cgit v0.11.0

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Mon Oct 12 17:53:42 UTC 2015 - hrvoje.senjan@gmail.com
- Added xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch
and xcb-fix-yet-another-crash-when-screens-are-disconnected.patch
(kde#341497, qtbug#47385)
-------------------------------------------------------------------
Fri Oct 9 19:42:43 UTC 2015 - hrvoje.senjan@gmail.com
- Added QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch
-------------------------------------------------------------------
Wed Oct 7 15:11:51 UTC 2015 - alarrosa@suse.com
- When in SLE12, use the internal Harfbuzz version instead of the system
one (which is too old for Qt's requirements)
-------------------------------------------------------------------
Sun Sep 27 08:43:03 UTC 2015 - schwab@suse.de
- Fix-compile-error-on-big-endian.patch: Fix compile error on big endian
-------------------------------------------------------------------
Tue Aug 18 16:38:29 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -64,9 +64,13 @@ Patch2013: 0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch
Patch2014: 0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch
Patch2015: 0006-xcb-set-SM_CLIENT_ID-property.patch
Patch2016: QMimeDatabase-use-QElapsedTimer.patch
Patch2017: QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch
Patch3000: Add-a-linker-version-script-to-Qt-libraries.patch
Patch3001: Add-a-qt_version_tag-symbol-to-QtCore-that-uses-ELF-versions.patch
Patch3002: Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch
Patch3003: Fix-compile-error-on-big-endian.patch
Patch3004: xcb-fix-yet-another-crash-when-screens-are-disconnected.patch
Patch3005: xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch
BuildRequires: alsa-devel
BuildRequires: cups-devel
BuildRequires: gcc-c++
@ -107,7 +111,9 @@ BuildRequires: xorg-x11-devel
BuildRequires: xz
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
%if 0%{?is_opensuse} || 0%{?suse_version} != 1315
BuildRequires: pkgconfig(harfbuzz)
%endif
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(libinput)
BuildRequires: pkgconfig(libudev)
@ -157,9 +163,13 @@ handling.
%patch2014 -p1
%patch2015 -p1
%patch2016 -p1
%patch2017 -p1
%patch3000 -p1
%patch3001 -p1
%patch3002 -p1
%patch3003 -p1
%patch3004 -p1
%patch3005 -p1
# be sure not to use them
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
@ -751,7 +761,9 @@ echo yes | ./configure $platform \
-system-libjpeg \
-openssl-linked \
-system-libpng \
%if 0%{?is_opensuse} || 0%{?suse_version} != 1315
-system-harfbuzz \
%endif
-fontconfig \
-system-freetype \
-cups \

View File

@ -0,0 +1,57 @@
From c2dd0bb2c7a0468abefb9556dead85456daa851f Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Date: Fri, 4 Sep 2015 14:25:15 +0200
Subject: [PATCH] xcb: don't crash in mapToNative/mapFromNative if the screen
is null
The results will be wrong, but it only happens in rare cases anyway.
Task-number: QTBUG-42985
Task-number: QTBUG-47385
Change-Id: I6438f219f175af2b118e6b3af16b5b626136defa
---
src/plugins/platforms/xcb/qxcbwindow.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 4fdebe1..3b589d2 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -179,6 +179,8 @@ QXcbScreen *QXcbWindow::parentScreen()
QPoint QXcbWindow::mapToNative(const QPoint &pos, const QXcbScreen *screen) const
{
+ if (!screen)
+ return pos;
if (parent())
return pos * int(screen->devicePixelRatio());
else
@@ -186,6 +188,8 @@ QPoint QXcbWindow::mapToNative(const QPoint &pos, const QXcbScreen *screen) cons
}
QPoint QXcbWindow::mapFromNative(const QPoint &pos, const QXcbScreen *screen) const
{
+ if (!screen)
+ return pos;
if (parent())
return pos / int(screen->devicePixelRatio());
else
@@ -193,6 +197,8 @@ QPoint QXcbWindow::mapFromNative(const QPoint &pos, const QXcbScreen *screen) co
}
QRect QXcbWindow::mapToNative(const QRect &rect, const QXcbScreen *screen) const
{
+ if (!screen)
+ return rect;
if (parent())
return mapLocalGeometryToNative(rect, int(screen->devicePixelRatio()));
else
@@ -200,6 +206,8 @@ QRect QXcbWindow::mapToNative(const QRect &rect, const QXcbScreen *screen) const
}
QRect QXcbWindow::mapFromNative(const QRect &rect, const QXcbScreen *screen) const
{
+ if (!screen)
+ return rect;
if (parent())
return mapLocalGeometryFromNative(rect, int(screen->devicePixelRatio()));
else
--
2.3.5

View File

@ -0,0 +1,36 @@
From d72da0b4b2ee089156d1bd614523838b1635bbf5 Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Date: Fri, 4 Sep 2015 13:27:48 +0200
Subject: [PATCH] xcb: fix yet another crash when screens are disconnected
Can't assume that m_screens is not an empty list.
Task-number: QTBUG-42985
Change-Id: I6f9422638c219123dc898813910d03c7afbd1450
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbconnection.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index f65437f..c35b019 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1300,10 +1300,12 @@ void QXcbConnection::sendConnectionEvent(QXcbAtom::Atom a, uint id)
memset(&event, 0, sizeof(event));
const xcb_window_t eventListener = xcb_generate_id(m_connection);
+ xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup);
+ xcb_screen_t *screen = it.data;
Q_XCB_CALL(xcb_create_window(m_connection, XCB_COPY_FROM_PARENT,
- eventListener, m_screens.at(0)->root(),
+ eventListener, screen->root,
0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY,
- m_screens.at(0)->screen()->root_visual, 0, 0));
+ screen->root_visual, 0, 0));
event.response_type = XCB_CLIENT_MESSAGE;
event.format = 32;
--
2.3.5