Commit 4fc495ca authored by Natanael Copa's avatar Natanael Copa

community/qt5-qtbase: upgrade to 5.9.1

parent d2b8e910
From dd52fd0024600d3beffc82d6da02b4239a62d725 Mon Sep 17 00:00:00 2001
From: Jocelyn Turcotte <jturcotte@woboq.com>
Date: Tue, 17 Jan 2017 17:05:00 +0100
Subject: [PATCH] Ensure a pixel density of at least 1 for
Qt::AA_EnableHighDpiScaling
Very large 1080p TVs or any display which is running at an abnormally
low resolution can have a DPI lower than 48, which means that
qRound(dpi/96) will result in a 0 pixel density, causing critical
issues for applications using Qt::AA_EnableHighDpiScaling.
Make sure that we always have a pixel density of at least 1 to allow
applications not having to worry about such displays.
Task-number: QTBUG-56140
Change-Id: I1dafbf7794a99ae6f872984c0337d8ff0d1fc1c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
---
src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp | 2 +-
src/plugins/platforms/windows/qwindowsscreen.cpp | 2 +-
src/plugins/platforms/winrt/qwinrtscreen.cpp | 2 +-
src/plugins/platforms/xcb/qxcbscreen.cpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp
index 3e1e93f1e4..863a115b74 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp
@@ -226,7 +226,7 @@ QDpi QEglFSDeviceIntegration::logicalDpi() const
qreal QEglFSDeviceIntegration::pixelDensity() const
{
- return qRound(logicalDpi().first / qreal(100));
+ return qMax(1, qRound(logicalDpi().first / qreal(100)));
}
Qt::ScreenOrientation QEglFSDeviceIntegration::nativeOrientation() const
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index 7a885b462e..c70323c06f 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -265,7 +265,7 @@ qreal QWindowsScreen::pixelDensity() const
// the pixel density since it is reflects the Windows UI scaling.
// High DPI auto scaling should be disabled when the user chooses
// small fonts on a High DPI monitor, resulting in lower logical DPI.
- return qRound(logicalDpi().first / 96);
+ return qMax(1, qRound(logicalDpi().first / 96));
}
/*!
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index f87ae9fd24..2a4b6c8907 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -647,7 +647,7 @@ QDpi QWinRTScreen::logicalDpi() const
qreal QWinRTScreen::pixelDensity() const
{
Q_D(const QWinRTScreen);
- return qRound(d->logicalDpi / 96);
+ return qMax(1, qRound(d->logicalDpi / 96));
}
qreal QWinRTScreen::scaleFactor() const
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index a9675935f4..d8facdbb84 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -631,7 +631,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 = qMax(1, qRound(dpi/96));
m_geometry = QRect(xGeometry.topLeft(), xGeometry.size());
m_availableGeometry = xGeometry & m_virtualDesktop->workArea();
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
--
2.13.0
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qt5-qtbase
pkgver=5.8.0
pkgver=5.9.1
_ver=${pkgver/_p/-}
_ver=${_ver/_/-}
_ver=${_ver/beta0/beta}
_ver=${_ver/rc0/rc}
_V=${_ver/rc/RC}
pkgrel=3
pkgrel=0
pkgdesc="Qt5 - QtBase components"
url="http://qt-project.org/"
arch="all"
......@@ -38,7 +38,7 @@ makedepends="$depends_dev
libxv-dev
mariadb-dev
mtdev-dev
pcre-dev
pcre2-dev
postgresql-dev
unixodbc-dev
xcb-util-dev
......@@ -57,8 +57,6 @@ source="http://download.qt-project.org/$_rel/qt/${pkgver%.*}/$_ver/submodules/qt
qt-musl-iconv-no-bom.patch
libressl-compat.patch
hack-openssl_test.patch
s390x-big-endian.patch
0001-Ensure-a-pixel-density-of-at-least-1-for-Qt-AA_Enabl.patch
"
_qt5_prefix=/usr/lib/qt5
......@@ -212,9 +210,7 @@ x11() {
return 0
}
sha512sums="36a1ba4b0dba02ae65c3b2b0aa3fb3767cbee4dbdf204c9ded7d1700e70144ce85a3a66167f86cc716a1fdd38d832962b2a752e803b0647d03032b2685da5ced qtbase-opensource-src-5.8.0.tar.xz
sha512sums="b384e91b3fd88b2f32e826e3dd1c930213683a0fdbfd284a319204fa8d27c796b54324cf4a715f6bebd92fca6426e37cf0be5866fc1f6053b8758570ddb2fa45 qtbase-opensource-src-5.9.1.tar.xz
7d68421a14f0259535c977d8a521c98918193c107b76ac664571b12f5b0d7588a0d0e1297af412a26753a393b21f3f44c3274fa8ab5bc87f03705a3a03acb444 qt-musl-iconv-no-bom.patch
af284ebb51e3d903275f0f43901755fee0d0071a2fa4f5d6e8a4b00d9185d9d9fffba8e5cbda8c4aa2b3acde69fd26a449b23ad104f509fd4156f6908e0b43da libressl-compat.patch
3bc1380268f077587114cfa535c58403f59c4c931902d0599633e1365f075d2e253b6f461e22ed3fe3adb12ef45ea97e1dbcbc1bbe0d151435703986f25c44c6 hack-openssl_test.patch
aef4633243e53dc5c09eafb785d105659ee5f56c6cc9faf927b8207cda774e31df262e2c63dc05496977cd081a9dd9c7545fbcd5b5ed351aab33e4666957909c s390x-big-endian.patch
1a56a38d63001f74aa9b3630feb4902f12a3b19b0c03db0dd1bf80d28090fb4f7d71f4e281f5c6611e01aa516324393791bee520a03909364ce302f18b7c0ecb 0001-Ensure-a-pixel-density-of-at-least-1-for-Qt-AA_Enabl.patch"
3bc1380268f077587114cfa535c58403f59c4c931902d0599633e1365f075d2e253b6f461e22ed3fe3adb12ef45ea97e1dbcbc1bbe0d151435703986f25c44c6 hack-openssl_test.patch"
From 6f64bfa654fb7e20bb75ec3b0544b81482babb44 Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@digia.com>
Date: Fri, 10 Feb 2017 13:56:58 +0100
Subject: fix VNC platform plugin build on big-endian machines
Task-number: QTBUG-58734
Change-Id: I3e44ee4be5003acaba2f1b8ed2658a3ff1bd700e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
---
src/plugins/platforms/vnc/qvncclient.cpp | 6 +++---
src/plugins/platforms/vnc/qvncscreen.cpp | 7 ++++++-
src/plugins/platforms/vnc/qvncscreen.h | 2 +-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/plugins/platforms/vnc/qvncclient.cpp b/src/plugins/platforms/vnc/qvncclient.cpp
index dae3e83..58dcfc9 100644
--- a/src/plugins/platforms/vnc/qvncclient.cpp
+++ b/src/plugins/platforms/vnc/qvncclient.cpp
@@ -142,7 +142,7 @@ void QVncClient::convertPixels(char *dst, const char *src, int count) const
case 16: {
quint16 p = *reinterpret_cast<const quint16*>(src);
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- if (swapBytes)
+ if (m_swapBytes)
p = ((p & 0xff) << 8) | ((p & 0xff00) >> 8);
#endif
r = (p >> 11) & 0x1f;
@@ -484,7 +484,7 @@ void QVncClient::setPixelFormat()
m_sameEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) == !!m_pixelFormat.bigEndian;
m_needConversion = pixelConversionNeeded();
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- m_swapBytes = qvnc_screen->swapBytes();
+ m_swapBytes = server()->screen()->swapBytes();
#endif
}
}
@@ -639,7 +639,7 @@ bool QVncClient::pixelConversionNeeded() const
return true;
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- if (qvnc_screen->swapBytes())
+ if (server()->screen()->swapBytes())
return true;
#endif
diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp
index 34def45..64f1bc0 100644
--- a/src/plugins/platforms/vnc/qvncscreen.cpp
+++ b/src/plugins/platforms/vnc/qvncscreen.cpp
@@ -43,6 +43,7 @@
#include <QtFbSupport/private/qfbcursor_p.h>
#include <QtGui/QPainter>
+#include <QtGui/QScreen>
#include <QtCore/QRegularExpression>
@@ -172,14 +173,18 @@ QPixmap QVncScreen::grabWindow(WId wid, int x, int y, int width, int height) con
}
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-bool QVNCScreen::swapBytes() const
+bool QVncScreen::swapBytes() const
{
+ return false;
+
+ /* TODO
if (depth() != 16)
return false;
if (screen())
return screen()->frameBufferLittleEndian();
return frameBufferLittleEndian();
+ */
}
#endif
diff --git a/src/plugins/platforms/vnc/qvncscreen.h b/src/plugins/platforms/vnc/qvncscreen.h
index 785abd6..0b42c3c 100644
--- a/src/plugins/platforms/vnc/qvncscreen.h
+++ b/src/plugins/platforms/vnc/qvncscreen.h
@@ -73,7 +73,7 @@ public:
void clearDirty() { dirtyRegion = QRegion(); }
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- bool swapBytes() const
+ bool swapBytes() const;
#endif
QStringList mArgs;
--
cgit v1.0-4-g1e03
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment