From 6a8a1e7326cc067219c561a587ced59aeda8edaf Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Aug 18 2017 11:11:49 +0000 Subject: Rebase previously used patches so we can use them again --- diff --git a/qt5-qtbase-cxxflag.patch b/qt5-qtbase-cxxflag.patch index d428c6f..321f051 100644 --- a/qt5-qtbase-cxxflag.patch +++ b/qt5-qtbase-cxxflag.patch @@ -1,12 +1,13 @@ -diff -up qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf.than qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf ---- qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf.than 2016-06-02 17:30:07.249027901 +0200 -+++ qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf 2016-06-02 17:30:14.681748012 +0200 +diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf +index e7e6ee1..ff2a939 100644 +--- a/mkspecs/common/gcc-base.conf ++++ b/mkspecs/common/gcc-base.conf @@ -32,7 +32,7 @@ # QMAKE_CFLAGS_OPTIMIZE = -O2 -QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 +QMAKE_CFLAGS_OPTIMIZE_FULL = -O2 + QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og + QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os - QMAKE_CFLAGS += -pipe - QMAKE_CFLAGS_DEPS += -M diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index 330d869..9eb56b4 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -334,9 +334,9 @@ Qt5 libraries used for drawing widgets and OpenGL items. %patch4 -p1 -b .QTBUG-35459 %patch50 -p1 -b .QT_VERSION_CHECK -#patch51 -p1 -b .hidpi_scale_at_192 +%patch51 -p1 -b .hidpi_scale_at_192 %patch52 -p1 -b .moc_macros -#patch61 -p1 -b .qt5-qtbase-cxxflag +%patch61 -p1 -b .qt5-qtbase-cxxflag %if 0%{?openssl11} %patch63 -p1 -b .openssl11 %endif diff --git a/qtbase-hidpi_scale_at_192.patch b/qtbase-hidpi_scale_at_192.patch index 123f1ae..c6c377d 100644 --- a/qtbase-hidpi_scale_at_192.patch +++ b/qtbase-hidpi_scale_at_192.patch @@ -1,11 +1,13 @@ ---- qtbase-opensource-src-5.7.1/src/plugins/platforms/xcb/qxcbscreen.cpp.orig 2017-01-11 11:42:59.544860428 +0100 -+++ qtbase-opensource-src-5.7.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2017-01-11 11:43:51.142956762 +0100 -@@ -633,7 +633,7 @@ void QXcbScreen::updateGeometry(const QR +diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp +index 5e136b5..0ad2842 100644 +--- a/src/plugins/platforms/xcb/qxcbscreen.cpp ++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp +@@ -620,7 +620,7 @@ void QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation) m_sizeMillimeters = sizeInMillimeters(xGeometry.size(), virtualDpi()); - + qreal dpi = xGeometry.width() / physicalSize().width() * qreal(25.4); -- m_pixelDensity = qRound(dpi/96); -+ m_pixelDensity = (int) (dpi/96); // instead of rounding at 1.5, round at 2.0 (same as GNOME) +- m_pixelDensity = qMax(1, qRound(dpi/96)); ++ m_pixelDensity = qMax(1, (int) (dpi/96)); // instead of rounding at 1.5, round at 2.0 (same as GNOME) m_geometry = QRect(xGeometry.topLeft(), xGeometry.size()); m_availableGeometry = xGeometry & m_virtualDesktop->workArea(); QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);