Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
commit
979a3fd88d
|
@ -1,3 +1,3 @@
|
|||
/qtbase-everywhere-src-5.10.1.tar.xz
|
||||
/qtbase-everywhere-src-5.11.0.tar.xz
|
||||
/qtbase-everywhere-src-5.11.1.tar.xz
|
||||
/qtbase-everywhere-src-5.12.1.tar.xz
|
||||
/qtbase-everywhere-src-5.12.3.tar.xz
|
||||
/qtbase-everywhere-src-5.12.4.tar.xz
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
From 1eac947ce2c1d63bd04a94939c4f04e9086913c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@qt.io>
|
||||
Date: Wed, 22 May 2019 14:01:41 +0200
|
||||
Subject: [PATCH 010/105] Work around crash where a destroyed window becomes
|
||||
focus_window
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Clear QGuiApplication::focus_window (again) in the
|
||||
QWindow destructor.
|
||||
|
||||
Task-number: QTBUG-75326
|
||||
Change-Id: Ief00b6adfb267fcc7e3881fd728e12df07fc1094
|
||||
Reviewed-by: Christian Andersen <csandersen3@gmail.com>
|
||||
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
||||
---
|
||||
src/gui/kernel/qwindow.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
|
||||
index bcd8351619..a19df4da0f 100644
|
||||
--- a/src/gui/kernel/qwindow.cpp
|
||||
+++ b/src/gui/kernel/qwindow.cpp
|
||||
@@ -218,6 +218,12 @@ QWindow::~QWindow()
|
||||
QGuiApplicationPrivate::window_list.removeAll(this);
|
||||
if (!QGuiApplicationPrivate::is_app_closing)
|
||||
QGuiApplicationPrivate::instance()->modalWindowList.removeOne(this);
|
||||
+
|
||||
+ // focus_window is normally cleared in destroy(), but the window may in
|
||||
+ // some cases end up becoming the focus window again. Clear it again
|
||||
+ // here as a workaround. See QTBUG-75326.
|
||||
+ if (QGuiApplicationPrivate::focus_window == this)
|
||||
+ QGuiApplicationPrivate::focus_window = 0;
|
||||
}
|
||||
|
||||
void QWindowPrivate::init(QScreen *targetScreen)
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
From 9b6928b7cc6f12638ae625c67ecf437cfc694498 Mon Sep 17 00:00:00 2001
|
||||
From: Val Doroshchuk <valentyn.doroshchuk@qt.io>
|
||||
Date: Fri, 31 May 2019 14:15:53 +0200
|
||||
Subject: [PATCH 054/105] Fix crash when app is going to shutdown but conf
|
||||
manager is requested
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If the app is finished and going to shutdown,
|
||||
qNetworkConfigurationManagerPrivate() returns nullptr.
|
||||
|
||||
Change-Id: I01915021d8698802b3a1d0dee43203cd3d4aba74
|
||||
Task-number: QTBUG-76090
|
||||
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
||||
---
|
||||
src/network/bearer/qnetworkconfigmanager.cpp | 27 ++++++++++----------
|
||||
src/network/bearer/qnetworksession.cpp | 3 ++-
|
||||
src/plugins/bearer/qnetworksession_impl.cpp | 13 +++++-----
|
||||
3 files changed, 23 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
|
||||
index 81b5e01d6a..cd87c3669c 100644
|
||||
--- a/src/network/bearer/qnetworkconfigmanager.cpp
|
||||
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
|
||||
@@ -233,19 +233,20 @@ QNetworkConfigurationManager::QNetworkConfigurationManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
|
||||
-
|
||||
- connect(priv, SIGNAL(configurationAdded(QNetworkConfiguration)),
|
||||
- this, SIGNAL(configurationAdded(QNetworkConfiguration)));
|
||||
- connect(priv, SIGNAL(configurationRemoved(QNetworkConfiguration)),
|
||||
- this, SIGNAL(configurationRemoved(QNetworkConfiguration)));
|
||||
- connect(priv, SIGNAL(configurationChanged(QNetworkConfiguration)),
|
||||
- this, SIGNAL(configurationChanged(QNetworkConfiguration)));
|
||||
- connect(priv, SIGNAL(onlineStateChanged(bool)),
|
||||
- this, SIGNAL(onlineStateChanged(bool)));
|
||||
- connect(priv, SIGNAL(configurationUpdateComplete()),
|
||||
- this, SIGNAL(updateCompleted()));
|
||||
-
|
||||
- priv->enablePolling();
|
||||
+ if (priv) {
|
||||
+ connect(priv, SIGNAL(configurationAdded(QNetworkConfiguration)),
|
||||
+ this, SIGNAL(configurationAdded(QNetworkConfiguration)));
|
||||
+ connect(priv, SIGNAL(configurationRemoved(QNetworkConfiguration)),
|
||||
+ this, SIGNAL(configurationRemoved(QNetworkConfiguration)));
|
||||
+ connect(priv, SIGNAL(configurationChanged(QNetworkConfiguration)),
|
||||
+ this, SIGNAL(configurationChanged(QNetworkConfiguration)));
|
||||
+ connect(priv, SIGNAL(onlineStateChanged(bool)),
|
||||
+ this, SIGNAL(onlineStateChanged(bool)));
|
||||
+ connect(priv, SIGNAL(configurationUpdateComplete()),
|
||||
+ this, SIGNAL(updateCompleted()));
|
||||
+
|
||||
+ priv->enablePolling();
|
||||
+ }
|
||||
}
|
||||
|
||||
/*!
|
||||
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
|
||||
index 471d322998..1636bcee97 100644
|
||||
--- a/src/network/bearer/qnetworksession.cpp
|
||||
+++ b/src/network/bearer/qnetworksession.cpp
|
||||
@@ -258,7 +258,8 @@ QNetworkSession::QNetworkSession(const QNetworkConfiguration &connectionConfig,
|
||||
|
||||
// invalid configuration
|
||||
if (!connectionConfig.identifier().isEmpty()) {
|
||||
- const auto engines = qNetworkConfigurationManagerPrivate()->engines();
|
||||
+ auto priv = qNetworkConfigurationManagerPrivate();
|
||||
+ const auto engines = priv ? priv->engines() : QList<QBearerEngine *>();
|
||||
for (QBearerEngine *engine : engines) {
|
||||
if (engine->hasIdentifier(connectionConfig.identifier())) {
|
||||
d = engine->createSessionBackend();
|
||||
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
|
||||
index 847479047f..903525a204 100644
|
||||
--- a/src/plugins/bearer/qnetworksession_impl.cpp
|
||||
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
|
||||
@@ -56,12 +56,13 @@ QT_BEGIN_NAMESPACE
|
||||
static QBearerEngineImpl *getEngineFromId(const QString &id)
|
||||
{
|
||||
QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
|
||||
-
|
||||
- const auto engines = priv->engines();
|
||||
- for (QBearerEngine *engine : engines) {
|
||||
- QBearerEngineImpl *engineImpl = qobject_cast<QBearerEngineImpl *>(engine);
|
||||
- if (engineImpl && engineImpl->hasIdentifier(id))
|
||||
- return engineImpl;
|
||||
+ if (priv) {
|
||||
+ const auto engines = priv->engines();
|
||||
+ for (QBearerEngine *engine : engines) {
|
||||
+ QBearerEngineImpl *engineImpl = qobject_cast<QBearerEngineImpl *>(engine);
|
||||
+ if (engineImpl && engineImpl->hasIdentifier(id))
|
||||
+ return engineImpl;
|
||||
+ }
|
||||
}
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,373 @@
|
|||
From 7ae2f47214408fb37ccb52d1fa659cc47a63443b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@qt.io>
|
||||
Date: Tue, 5 Mar 2019 00:17:43 +0100
|
||||
Subject: [PATCH 056/105] QHighDpi: Replace fromNative()/toNative() with
|
||||
scale()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
We need one scale() function for each type: the scale factor can be
|
||||
inverted by the caller for the fromNative case. Add a generic
|
||||
templated implementation which will handle simple types. Add add
|
||||
specialization functions for compound types that don't have
|
||||
operator*(), as well as for position types (e.g. QPoint) which account
|
||||
for the origin.
|
||||
|
||||
There's no need for fromNativePixels() and toNativePixels() overloads
|
||||
for each type; replace with generic implementations which call
|
||||
scale(). Do the same thing for fromNativeLocalPosition().
|
||||
|
||||
Some user code is calling fromNative()/toNative() directly, so leave a
|
||||
definition of those functions around for now. Also leave a couple of
|
||||
one-off scaling functions which do not fit the pattern.
|
||||
|
||||
Also fix “narrowing conversion scaleFactor to int” warning for the
|
||||
QMargins scale function.
|
||||
|
||||
Change-Id: Ia67accbb670a80dc1747c2e264b97aab75b1251b
|
||||
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||||
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
||||
---
|
||||
src/gui/kernel/qhighdpiscaling_p.h | 264 ++++++-----------------------
|
||||
1 file changed, 55 insertions(+), 209 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
|
||||
index dfc6abf5ba..525e3fe78e 100644
|
||||
--- a/src/gui/kernel/qhighdpiscaling_p.h
|
||||
+++ b/src/gui/kernel/qhighdpiscaling_p.h
|
||||
@@ -108,208 +108,114 @@ private:
|
||||
|
||||
namespace QHighDpi {
|
||||
|
||||
-inline QPointF fromNative(const QPointF &pos, qreal scaleFactor, const QPointF &origin)
|
||||
+template <typename T>
|
||||
+inline T scale(const T &value, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- return (pos - origin) / scaleFactor + origin;
|
||||
+ Q_UNUSED(origin)
|
||||
+ return value * scaleFactor;
|
||||
}
|
||||
|
||||
-inline QPointF toNative(const QPointF &pos, qreal scaleFactor, const QPointF &origin)
|
||||
+inline QPointF scale(const QPointF &pos, qreal scaleFactor, QPointF origin = QPointF(0, 0))
|
||||
{
|
||||
return (pos - origin) * scaleFactor + origin;
|
||||
}
|
||||
|
||||
-inline QPoint fromNative(const QPoint &pos, qreal scaleFactor, const QPoint &origin)
|
||||
-{
|
||||
- return (pos - origin) / scaleFactor + origin;
|
||||
-}
|
||||
-
|
||||
-inline QPoint toNative(const QPoint &pos, qreal scaleFactor, const QPoint &origin)
|
||||
+inline QPoint scale(const QPoint &pos, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
return (pos - origin) * scaleFactor + origin;
|
||||
}
|
||||
|
||||
-inline QPoint fromNative(const QPoint &pos, qreal scaleFactor)
|
||||
-{
|
||||
- return pos / scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QPoint toNative(const QPoint &pos, qreal scaleFactor)
|
||||
-{
|
||||
- return pos * scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QSize fromNative(const QSize &size, qreal scaleFactor)
|
||||
-{
|
||||
- return size / scaleFactor; // TODO: should we round up?
|
||||
-}
|
||||
-
|
||||
-inline QSize toNative(const QSize &size, qreal scaleFactor)
|
||||
+inline QRect scale(const QRect &rect, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- return size * scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QSizeF fromNative(const QSizeF &size, qreal scaleFactor)
|
||||
-{
|
||||
- return size / scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QSizeF toNative(const QSizeF &size, qreal scaleFactor)
|
||||
-{
|
||||
- return size * scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QRect fromNative(const QRect &rect, qreal scaleFactor, const QPoint &origin)
|
||||
-{
|
||||
- return QRect(fromNative(rect.topLeft(), scaleFactor, origin), fromNative(rect.size(), scaleFactor));
|
||||
-}
|
||||
-
|
||||
-inline QRect toNative(const QRect &rect, qreal scaleFactor, const QPoint &origin)
|
||||
-{
|
||||
- return QRect(toNative(rect.topLeft(), scaleFactor, origin), toNative(rect.size(), scaleFactor));
|
||||
-
|
||||
-}
|
||||
-
|
||||
-inline QRect fromNative(const QRect &rect, const QScreen *screen, const QPoint &screenOrigin)
|
||||
-{
|
||||
- return fromNative(rect, QHighDpiScaling::factor(screen), screenOrigin);
|
||||
-}
|
||||
-
|
||||
-inline QRect fromNativeScreenGeometry(const QRect &nativeScreenGeometry, const QScreen *screen)
|
||||
-{
|
||||
- return QRect(nativeScreenGeometry.topLeft(),
|
||||
- fromNative(nativeScreenGeometry.size(), QHighDpiScaling::factor(screen)));
|
||||
-}
|
||||
-
|
||||
-inline QPoint fromNativeLocalPosition(const QPoint &pos, const QWindow *window)
|
||||
-{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- return pos / scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QPoint toNativeLocalPosition(const QPoint &pos, const QWindow *window)
|
||||
-{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- return pos * scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QPointF fromNativeLocalPosition(const QPointF &pos, const QWindow *window)
|
||||
-{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- return pos / scaleFactor;
|
||||
-}
|
||||
-
|
||||
-inline QPointF toNativeLocalPosition(const QPointF &pos, const QWindow *window)
|
||||
-{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- return pos * scaleFactor;
|
||||
+ return QRect(scale(rect.topLeft(), scaleFactor, origin), scale(rect.size(), scaleFactor));
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QRect fromNativePixels(const QRect &pixelRect, const C *context)
|
||||
+inline QRectF scale(const QRectF &rect, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(context);
|
||||
- const QPoint origin = QHighDpiScaling::origin(context);
|
||||
- return QRect(fromNative(pixelRect.topLeft(), scaleFactor, origin),
|
||||
- fromNative(pixelRect.size(), scaleFactor));
|
||||
+ return QRectF(scale(rect.topLeft(), scaleFactor, origin), scale(rect.size(), scaleFactor));
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QRect toNativePixels(const QRect &pointRect, const C *context)
|
||||
+inline QMargins scale(const QMargins &margins, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(context);
|
||||
- const QPoint origin = QHighDpiScaling::origin(context);
|
||||
- return QRect(toNative(pointRect.topLeft(), scaleFactor, origin),
|
||||
- toNative(pointRect.size(), scaleFactor));
|
||||
+ Q_UNUSED(origin)
|
||||
+ return QMargins(qRound(qreal(margins.left()) * scaleFactor), qRound(qreal(margins.top()) * scaleFactor),
|
||||
+ qRound(qreal(margins.right()) * scaleFactor), qRound(qreal(margins.bottom()) * scaleFactor));
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QRectF toNativePixels(const QRectF &pointRect, const C *context)
|
||||
+template <typename T>
|
||||
+QVector<T> scale(const QVector<T> &vector, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(context);
|
||||
- const QPoint origin = QHighDpiScaling::origin(context);
|
||||
- return QRectF(toNative(pointRect.topLeft(), scaleFactor, origin),
|
||||
- toNative(pointRect.size(), scaleFactor));
|
||||
-}
|
||||
+ if (!QHighDpiScaling::isActive())
|
||||
+ return vector;
|
||||
|
||||
-template <typename C>
|
||||
-inline QRectF fromNativePixels(const QRectF &pixelRect, const C *context)
|
||||
-{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(context);
|
||||
- const QPoint origin = QHighDpiScaling::origin(context);
|
||||
- return QRectF(fromNative(pixelRect.topLeft(), scaleFactor, origin),
|
||||
- fromNative(pixelRect.size(), scaleFactor));
|
||||
+ QVector<T> scaled;
|
||||
+ scaled.reserve(vector.size());
|
||||
+ for (const T &item : vector)
|
||||
+ scaled.append(scale(item, scaleFactor, origin));
|
||||
+ return scaled;
|
||||
}
|
||||
|
||||
-inline QSize fromNativePixels(const QSize &pixelSize, const QWindow *window)
|
||||
+inline QRegion scale(const QRegion ®ion, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- return pixelSize / QHighDpiScaling::factor(window);
|
||||
-}
|
||||
+ if (!QHighDpiScaling::isActive())
|
||||
+ return region;
|
||||
|
||||
-inline QSize toNativePixels(const QSize &pointSize, const QWindow *window)
|
||||
-{
|
||||
- return pointSize * QHighDpiScaling::factor(window);
|
||||
+ QRegion scaled;
|
||||
+ for (const QRect &rect : region)
|
||||
+ scaled += scale(rect, scaleFactor, origin);
|
||||
+ return scaled;
|
||||
}
|
||||
|
||||
-inline QSizeF fromNativePixels(const QSizeF &pixelSize, const QWindow *window)
|
||||
+template <typename T, typename C>
|
||||
+T fromNativePixels(const T &value, const C *context)
|
||||
{
|
||||
- return pixelSize / QHighDpiScaling::factor(window);
|
||||
+ return scale(value, qreal(1) / QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
}
|
||||
|
||||
-inline QSizeF toNativePixels(const QSizeF &pointSize, const QWindow *window)
|
||||
+template <typename T, typename C>
|
||||
+T toNativePixels(const T &value, const C *context)
|
||||
{
|
||||
- return pointSize * QHighDpiScaling::factor(window);
|
||||
+ return scale(value, QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QPoint fromNativePixels(const QPoint &pixelPoint, const C *context)
|
||||
+template <typename T, typename C>
|
||||
+T fromNativeLocalPosition(const T &value, const C *context)
|
||||
{
|
||||
- return fromNative(pixelPoint, QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
+ return scale(value, qreal(1) / QHighDpiScaling::factor(context));
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QPoint toNativePixels(const QPoint &pointPoint, const C *context)
|
||||
+template <typename T, typename C>
|
||||
+T toNativeLocalPosition(const T &value, const C *context)
|
||||
{
|
||||
- return toNative(pointPoint, QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
+ return scale(value, QHighDpiScaling::factor(context));
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QPointF fromNativePixels(const QPointF &pixelPoint, const C *context)
|
||||
+template <typename T>
|
||||
+inline T fromNative(const T &value, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- return fromNative(pixelPoint, QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
+ return scale(value, qreal(1) / scaleFactor, origin);
|
||||
}
|
||||
|
||||
-template <typename C>
|
||||
-inline QPointF toNativePixels(const QPointF &pointPoint, const C *context)
|
||||
+template <typename T>
|
||||
+inline T toNative(const T &value, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
- return toNative(pointPoint, QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
+ return scale(value, scaleFactor, origin);
|
||||
}
|
||||
|
||||
-inline QMargins fromNativePixels(const QMargins &pixelMargins, const QWindow *window)
|
||||
+inline QRect fromNative(const QRect &rect, const QScreen *screen, const QPoint &screenOrigin)
|
||||
{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- return QMargins(pixelMargins.left() / scaleFactor, pixelMargins.top() / scaleFactor,
|
||||
- pixelMargins.right() / scaleFactor, pixelMargins.bottom() / scaleFactor);
|
||||
+ return scale(rect, qreal(1) / QHighDpiScaling::factor(screen), screenOrigin);
|
||||
}
|
||||
|
||||
-inline QMargins toNativePixels(const QMargins &pointMargins, const QWindow *window)
|
||||
+inline QRect fromNativeScreenGeometry(const QRect &nativeScreenGeometry, const QScreen *screen)
|
||||
{
|
||||
- const qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- return QMargins(pointMargins.left() * scaleFactor, pointMargins.top() * scaleFactor,
|
||||
- pointMargins.right() * scaleFactor, pointMargins.bottom() * scaleFactor);
|
||||
+ return QRect(nativeScreenGeometry.topLeft(),
|
||||
+ scale(nativeScreenGeometry.size(), qreal(1) / QHighDpiScaling::factor(screen)));
|
||||
}
|
||||
|
||||
inline QRegion fromNativeLocalRegion(const QRegion &pixelRegion, const QWindow *window)
|
||||
{
|
||||
- if (!QHighDpiScaling::isActive())
|
||||
- return pixelRegion;
|
||||
-
|
||||
- qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- QRegion pointRegion;
|
||||
- for (const QRect &rect : pixelRegion) {
|
||||
- pointRegion += QRect(fromNative(rect.topLeft(), scaleFactor),
|
||||
- fromNative(rect.size(), scaleFactor));
|
||||
- }
|
||||
- return pointRegion;
|
||||
+ return scale(pixelRegion, qreal(1) / QHighDpiScaling::factor(window));
|
||||
}
|
||||
|
||||
// When mapping expose events to Qt rects: round top/left towards the origin and
|
||||
@@ -333,67 +239,7 @@ inline QRegion fromNativeLocalExposedRegion(const QRegion &pixelRegion, const QW
|
||||
|
||||
inline QRegion toNativeLocalRegion(const QRegion &pointRegion, const QWindow *window)
|
||||
{
|
||||
- if (!QHighDpiScaling::isActive())
|
||||
- return pointRegion;
|
||||
-
|
||||
- qreal scaleFactor = QHighDpiScaling::factor(window);
|
||||
- QRegion pixelRegon;
|
||||
- for (const QRect &rect : pointRegion) {
|
||||
- pixelRegon += QRect(toNative(rect.topLeft(), scaleFactor),
|
||||
- toNative(rect.size(), scaleFactor));
|
||||
- }
|
||||
- return pixelRegon;
|
||||
-}
|
||||
-
|
||||
-// Any T that has operator/()
|
||||
-template <typename T, typename C>
|
||||
-T fromNativePixels(const T &pixelValue, const C *context)
|
||||
-{
|
||||
- if (!QHighDpiScaling::isActive())
|
||||
- return pixelValue;
|
||||
-
|
||||
- return pixelValue / QHighDpiScaling::factor(context);
|
||||
-
|
||||
-}
|
||||
-
|
||||
-// Any T that has operator*()
|
||||
-template <typename T, typename C>
|
||||
-T toNativePixels(const T &pointValue, const C *context)
|
||||
-{
|
||||
- if (!QHighDpiScaling::isActive())
|
||||
- return pointValue;
|
||||
-
|
||||
- return pointValue * QHighDpiScaling::factor(context);
|
||||
-}
|
||||
-
|
||||
-// Any QVector<T> where T has operator/()
|
||||
-template <typename T>
|
||||
-QVector<T> fromNativePixels(const QVector<T> &pixelValues, const QWindow *window)
|
||||
-{
|
||||
- if (!QHighDpiScaling::isActive())
|
||||
- return pixelValues;
|
||||
-
|
||||
- QVector<T> pointValues;
|
||||
- pointValues.reserve(pixelValues.size());
|
||||
- const auto factor = QHighDpiScaling::factor(window);
|
||||
- for (const T &pixelValue : pixelValues)
|
||||
- pointValues.append(pixelValue / factor);
|
||||
- return pointValues;
|
||||
-}
|
||||
-
|
||||
-// Any QVector<T> where T has operator*()
|
||||
-template <typename T>
|
||||
-QVector<T> toNativePixels(const QVector<T> &pointValues, const QWindow *window)
|
||||
-{
|
||||
- if (!QHighDpiScaling::isActive())
|
||||
- return pointValues;
|
||||
-
|
||||
- QVector<T> pixelValues;
|
||||
- pixelValues.reserve(pointValues.size());
|
||||
- const auto factor = QHighDpiScaling::factor(window);
|
||||
- for (const T &pointValue : pointValues)
|
||||
- pixelValues.append(pointValue * factor);
|
||||
- return pixelValues;
|
||||
+ return scale(pointRegion, QHighDpiScaling::factor(window));
|
||||
}
|
||||
|
||||
} // namespace QHighDpi
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 6d61b10f65cd276e009a02cec563cc469245e1f2 Mon Sep 17 00:00:00 2001
|
||||
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||||
Date: Wed, 19 Jun 2019 08:28:14 +0200
|
||||
Subject: [PATCH 066/105] High DPI: Fix crash in QWindow::mapFromGlobal()
|
||||
|
||||
With Web Engine, QQuickWidget or similar, the code can hit on the offscreen
|
||||
window, when its handle is null. Add a check.
|
||||
|
||||
Amends 3af7b279177f7fb092f0e0fb9ffc8e8d846ed774.
|
||||
|
||||
Fixes: QTBUG-76440
|
||||
Change-Id: I123633d18386efd3dbfb22aad6072e4f0877a62e
|
||||
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
---
|
||||
src/gui/kernel/qhighdpiscaling.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
|
||||
index 4f8e9a3817..93fcb1a216 100644
|
||||
--- a/src/gui/kernel/qhighdpiscaling.cpp
|
||||
+++ b/src/gui/kernel/qhighdpiscaling.cpp
|
||||
@@ -400,7 +400,7 @@ QPoint QHighDpiScaling::mapPositionToGlobal(const QPoint &pos, const QPoint &win
|
||||
QPoint QHighDpiScaling::mapPositionFromGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window)
|
||||
{
|
||||
QPoint windowPosCandidate = pos - windowGlobalPosition;
|
||||
- if (QGuiApplicationPrivate::screen_list.size() <= 1)
|
||||
+ if (QGuiApplicationPrivate::screen_list.size() <= 1 || window->handle() == nullptr)
|
||||
return windowPosCandidate;
|
||||
|
||||
// Device independent global (screen) space may discontiguous when high-dpi scaling
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
From b6ded193ee64ffe67df6d22e7a23aa1ea9e02ec7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@qt.io>
|
||||
Date: Tue, 5 Mar 2019 11:14:21 +0100
|
||||
Subject: [PATCH 100/105] QHighDpi::fromNativePixels: use correct screen
|
||||
|
||||
Calls like
|
||||
QHighDpi::fromNativePixels(point, window)
|
||||
|
||||
would return device independent coordinates outside any
|
||||
screen in cases where the window is spanning multiple
|
||||
screens and the native point was not on the main screen.
|
||||
|
||||
Correct this by looking up the correct screen and use
|
||||
its scale factor and origin when scaling coordinates.
|
||||
|
||||
Task-number: QTBUG-73231
|
||||
Change-Id: I01a3a42f42121b8d9f4ced2bb0fb023d6ae6bfe7
|
||||
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||||
---
|
||||
src/gui/kernel/qhighdpiscaling.cpp | 50 +++++++++---------------------
|
||||
src/gui/kernel/qhighdpiscaling_p.h | 37 ++++++++++++++++------
|
||||
2 files changed, 42 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
|
||||
index 93fcb1a216..0fea416404 100644
|
||||
--- a/src/gui/kernel/qhighdpiscaling.cpp
|
||||
+++ b/src/gui/kernel/qhighdpiscaling.cpp
|
||||
@@ -452,52 +452,30 @@ QDpi QHighDpiScaling::logicalDpi()
|
||||
return m_logicalDpi;
|
||||
}
|
||||
|
||||
-qreal QHighDpiScaling::factor(const QScreen *screen)
|
||||
+QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QPlatformScreen *platformScreen, QPoint *nativePosition)
|
||||
{
|
||||
- // Fast path for when scaling in Qt is not used at all.
|
||||
if (!m_active)
|
||||
- return qreal(1.0);
|
||||
-
|
||||
- // The effective factor for a given screen is the product of the
|
||||
- // screen and global sub-factors
|
||||
- qreal factor = m_factor;
|
||||
- if (screen)
|
||||
- factor *= screenSubfactor(screen->handle());
|
||||
- return factor;
|
||||
+ return { qreal(1), QPoint() };
|
||||
+ const QPlatformScreen *actualScreen = nativePosition ?
|
||||
+ platformScreen->screenForPosition(*nativePosition) : platformScreen;
|
||||
+ return { m_factor * screenSubfactor(actualScreen), actualScreen->geometry().topLeft() };
|
||||
}
|
||||
|
||||
-qreal QHighDpiScaling::factor(const QPlatformScreen *platformScreen)
|
||||
+QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QScreen *screen, QPoint *nativePosition)
|
||||
{
|
||||
if (!m_active)
|
||||
- return qreal(1.0);
|
||||
-
|
||||
- return m_factor * screenSubfactor(platformScreen);
|
||||
+ return { qreal(1), QPoint() };
|
||||
+ if (!screen)
|
||||
+ return { m_factor, QPoint() }; // the global factor
|
||||
+ return scaleAndOrigin(screen->handle(), nativePosition);
|
||||
}
|
||||
|
||||
-qreal QHighDpiScaling::factor(const QWindow *window)
|
||||
+QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QWindow *window, QPoint *nativePosition)
|
||||
{
|
||||
if (!m_active)
|
||||
- return qreal(1.0);
|
||||
-
|
||||
- return factor(window ? window->screen() : QGuiApplication::primaryScreen());
|
||||
-}
|
||||
-
|
||||
-QPoint QHighDpiScaling::origin(const QScreen *screen)
|
||||
-{
|
||||
- return screen->geometry().topLeft();
|
||||
-}
|
||||
-
|
||||
-QPoint QHighDpiScaling::origin(const QPlatformScreen *platformScreen)
|
||||
-{
|
||||
- return platformScreen->geometry().topLeft();
|
||||
-}
|
||||
-
|
||||
-QPoint QHighDpiScaling::origin(const QWindow *window)
|
||||
-{
|
||||
- if (window && window->isTopLevel() && window->screen())
|
||||
- return window->screen()->geometry().topLeft();
|
||||
-
|
||||
- return QPoint(0, 0);
|
||||
+ return { qreal(1), QPoint() };
|
||||
+ QScreen *screen = window ? window->screen() : QGuiApplication::primaryScreen();
|
||||
+ return scaleAndOrigin(screen, nativePosition);
|
||||
}
|
||||
|
||||
#endif //QT_NO_HIGHDPISCALING
|
||||
diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h
|
||||
index 525e3fe78e..3410c1d345 100644
|
||||
--- a/src/gui/kernel/qhighdpiscaling_p.h
|
||||
+++ b/src/gui/kernel/qhighdpiscaling_p.h
|
||||
@@ -78,14 +78,23 @@ public:
|
||||
static void setScreenFactor(QScreen *window, qreal factor);
|
||||
|
||||
static bool isActive() { return m_active; }
|
||||
- static qreal factor(const QWindow *window);
|
||||
- static qreal factor(const QScreen *screen);
|
||||
- static qreal factor(const QPlatformScreen *platformScreen);
|
||||
- static QPoint origin(const QScreen *screen);
|
||||
- static QPoint origin(const QPlatformScreen *platformScreen);
|
||||
- static QPoint origin(const QWindow *window);
|
||||
- static QPoint mapPositionToNative(const QPoint &pos, const QPlatformScreen *platformScreen);
|
||||
+
|
||||
+ struct ScaleAndOrigin
|
||||
+ {
|
||||
+ qreal factor;
|
||||
+ QPoint origin;
|
||||
+ };
|
||||
+ static ScaleAndOrigin scaleAndOrigin(const QPlatformScreen *platformScreen, QPoint *nativePosition = nullptr);
|
||||
+ static ScaleAndOrigin scaleAndOrigin(const QScreen *screen, QPoint *nativePosition = nullptr);
|
||||
+ static ScaleAndOrigin scaleAndOrigin(const QWindow *platformScreen, QPoint *nativePosition = nullptr);
|
||||
+
|
||||
+ template<typename C>
|
||||
+ static qreal factor(C *context, QPoint *nativePosition = nullptr) {
|
||||
+ return scaleAndOrigin(context, nativePosition).factor;
|
||||
+ }
|
||||
+
|
||||
static QPoint mapPositionFromNative(const QPoint &pos, const QPlatformScreen *platformScreen);
|
||||
+ static QPoint mapPositionToNative(const QPoint &pos, const QPlatformScreen *platformScreen);
|
||||
static QPoint mapPositionToGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window);
|
||||
static QPoint mapPositionFromGlobal(const QPoint &pos, const QPoint &windowGlobalPosition, const QWindow *window);
|
||||
static QDpi logicalDpi();
|
||||
@@ -166,16 +175,26 @@ inline QRegion scale(const QRegion ®ion, qreal scaleFactor, QPoint origin = Q
|
||||
return scaled;
|
||||
}
|
||||
|
||||
+template <typename T>
|
||||
+inline QPoint position(T) { return QPoint(); }
|
||||
+inline QPoint position(QPoint point) { return point; }
|
||||
+inline QPoint position(QPointF point) { return point.toPoint(); }
|
||||
+inline QPoint position(QRect rect) { return rect.center(); }
|
||||
+inline QPoint position(QRectF rect) { return rect.center().toPoint(); }
|
||||
+
|
||||
template <typename T, typename C>
|
||||
T fromNativePixels(const T &value, const C *context)
|
||||
{
|
||||
- return scale(value, qreal(1) / QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
+ QPoint nativePosition = position(value);
|
||||
+ QHighDpiScaling::ScaleAndOrigin so = QHighDpiScaling::scaleAndOrigin(context, &nativePosition);
|
||||
+ return scale(value, qreal(1) / so.factor, so.origin);
|
||||
}
|
||||
|
||||
template <typename T, typename C>
|
||||
T toNativePixels(const T &value, const C *context)
|
||||
{
|
||||
- return scale(value, QHighDpiScaling::factor(context), QHighDpiScaling::origin(context));
|
||||
+ QHighDpiScaling::ScaleAndOrigin so = QHighDpiScaling::scaleAndOrigin(context);
|
||||
+ return scale(value, so.factor, so.origin);
|
||||
}
|
||||
|
||||
template <typename T, typename C>
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
From fbf34883dfc23c109aa03d0df04a07bfd3be59e6 Mon Sep 17 00:00:00 2001
|
||||
From: Erik Kurzinger <ekurzinger@nvidia.com>
|
||||
Date: Mon, 10 Jun 2019 14:50:40 -0700
|
||||
Subject: [PATCH] Remove m_swapInterval from QGLXContext
|
||||
|
||||
As per GLX_EXT_swap_control, the GLX swap interval is specified on a
|
||||
per-drawable basis. However, QGLXContext only tracks it per-context
|
||||
using the m_swapInterval member. If a new drawable is made current to a
|
||||
context, it is still necessary to call glXSwapIntervalEXT to change the
|
||||
swap interval, even if it has been previously called for the same
|
||||
context with a different drawable. However, currently,
|
||||
QGLXContext::makeCurrent doesn't do this if m_swapInterval matches the
|
||||
new swap interval. This change removes m_swapInterval, forcing the swap
|
||||
interval to be set every time and relying on the OpenGL implementation
|
||||
to optimize away unnecessary calls.
|
||||
|
||||
Change-Id: Idc34101476c6af618059f6f3d8925dee743994a3
|
||||
---
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||
index 4adf662..01517eb 100644
|
||||
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||
@@ -204,7 +204,6 @@
|
||||
, m_shareContext(0)
|
||||
, m_format(format)
|
||||
, m_isPBufferCurrent(false)
|
||||
- , m_swapInterval(-1)
|
||||
, m_ownsContext(nativeHandle.isNull())
|
||||
, m_getGraphicsResetStatus(0)
|
||||
, m_lost(false)
|
||||
@@ -568,8 +567,7 @@
|
||||
if (success && surfaceClass == QSurface::Window) {
|
||||
int interval = surface->format().swapInterval();
|
||||
QXcbScreen *screen = screenForPlatformSurface(surface);
|
||||
- if (interval >= 0 && m_swapInterval != interval && screen) {
|
||||
- m_swapInterval = interval;
|
||||
+ if (interval >= 0 && screen) {
|
||||
typedef void (*qt_glXSwapIntervalEXT)(Display *, GLXDrawable, int);
|
||||
typedef void (*qt_glXSwapIntervalMESA)(unsigned int);
|
||||
static qt_glXSwapIntervalEXT glXSwapIntervalEXT = 0;
|
||||
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
|
||||
index be9d3f5..2a88fd6 100644
|
||||
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
|
||||
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
|
||||
@@ -87,7 +87,6 @@
|
||||
GLXContext m_shareContext;
|
||||
QSurfaceFormat m_format;
|
||||
bool m_isPBufferCurrent;
|
||||
- int m_swapInterval;
|
||||
bool m_ownsContext;
|
||||
GLenum (APIENTRY * m_getGraphicsResetStatus)();
|
||||
bool m_lost;
|
|
@ -0,0 +1,29 @@
|
|||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json 2019-02-03 13:41:27.392305128 -0600
|
||||
@@ -49,10 +49,11 @@
|
||||
"ibase": {
|
||||
"label": "InterBase",
|
||||
"test": {},
|
||||
- "headers": "ibase.h",
|
||||
+ "headers": "firebird/ibase.h",
|
||||
"sources": [
|
||||
{ "libs": "-lgds32_ms", "condition": "config.win32" },
|
||||
- { "libs": "-lgds", "condition": "!config.win32" }
|
||||
+ { "libs": "-lgds", "condition": "!config.win32" },
|
||||
+ { "libs": "-lfbclient", "condition": "!config.win32" }
|
||||
]
|
||||
},
|
||||
"mysql": {
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h 2019-02-03 13:27:30.683142996 -0600
|
||||
@@ -52,7 +52,7 @@
|
||||
//
|
||||
|
||||
#include <QtSql/qsqldriver.h>
|
||||
-#include <ibase.h>
|
||||
+#include <firebird/ibase.h>
|
||||
|
||||
#ifdef QT_PLUGIN
|
||||
#define Q_EXPORT_SQLDRIVER_IBASE
|
|
@ -1,32 +0,0 @@
|
|||
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
|
||||
index 234f880..7b13671 100644
|
||||
--- a/src/plugins/sqldrivers/configure.json
|
||||
+++ b/src/plugins/sqldrivers/configure.json
|
||||
@@ -50,11 +50,12 @@
|
||||
"ibase": {
|
||||
"label": "InterBase",
|
||||
"test": {
|
||||
- "include": "ibase.h"
|
||||
+ "include": "firebird/ibase.h"
|
||||
},
|
||||
"sources": [
|
||||
{ "libs": "-lgds32_ms", "condition": "config.win32" },
|
||||
- { "libs": "-lgds", "condition": "!config.win32" }
|
||||
+ { "libs": "-lgds", "condition": "!config.win32" },
|
||||
+ { "libs": "-lfbclient", "condition": "!config.win32" }
|
||||
]
|
||||
},
|
||||
"mysql": {
|
||||
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase_p.h b/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
||||
index c7cee41..6a9c56c 100644
|
||||
--- a/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
||||
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
||||
@@ -52,7 +52,7 @@
|
||||
//
|
||||
|
||||
#include <QtSql/qsqldriver.h>
|
||||
-#include <ibase.h>
|
||||
+#include <firebird/ibase.h>
|
||||
|
||||
#ifdef QT_PLUGIN
|
||||
#define Q_EXPORT_SQLDRIVER_IBASE
|
199
qt5-qtbase.spec
199
qt5-qtbase.spec
|
@ -14,6 +14,13 @@
|
|||
%endif
|
||||
%endif
|
||||
|
||||
# workaround https://bugzilla.redhat.com/show_bug.cgi?id=1668865
|
||||
# for current stable releases
|
||||
%if 0%{?fedora} && 0%{?fedora} < 30
|
||||
%global no_feature_statx -no-feature-statx
|
||||
%global no_feature_renameat2 -no-feature-renameat2
|
||||
%endif
|
||||
|
||||
# support qtchooser (adds qtchooser .conf file)
|
||||
%global qtchooser 1
|
||||
%if 0%{?qtchooser}
|
||||
|
@ -45,8 +52,8 @@ BuildRequires: pkgconfig(libsystemd)
|
|||
|
||||
Name: qt5-qtbase
|
||||
Summary: Qt5 - QtBase components
|
||||
Version: 5.11.1
|
||||
Release: 1.0.riscv64%{?dist}
|
||||
Version: 5.12.4
|
||||
Release: 6%{?dist}
|
||||
|
||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||
|
@ -95,6 +102,10 @@ Patch51: qtbase-hidpi_scale_at_192.patch
|
|||
# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff
|
||||
Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch
|
||||
|
||||
# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui
|
||||
# https://bugzilla.redhat.com/1704474
|
||||
Patch53: qtbase-everywhere-src-5.12.1-qt5gui_cmake_isystem_includes.patch
|
||||
|
||||
# respect QMAKE_LFLAGS_RELEASE when building qmake
|
||||
Patch54: qtbase-qmake_LFLAGS.patch
|
||||
|
||||
|
@ -102,7 +113,7 @@ Patch54: qtbase-qmake_LFLAGS.patch
|
|||
Patch61: qt5-qtbase-cxxflag.patch
|
||||
|
||||
# support firebird version 3.x
|
||||
Patch64: qt5-qtbase-5.9.1-firebird.patch
|
||||
Patch64: qt5-qtbase-5.12.1-firebird.patch
|
||||
|
||||
# fix for new mariadb
|
||||
Patch65: qtbase-opensource-src-5.9.0-mysql.patch
|
||||
|
@ -112,10 +123,26 @@ Patch65: qtbase-opensource-src-5.9.0-mysql.patch
|
|||
# https://bugzilla.redhat.com/show_bug.cgi?id=1497564
|
||||
Patch67: https://bugreports.qt.io/secure/attachment/66353/xcberror_filter.patch
|
||||
|
||||
# add support for RISC-V (riscv64)
|
||||
Patch68: qtbase5-double-conversion-add-riscv.patch
|
||||
# python3
|
||||
Patch68: qtbase-everywhere-src-5.11.1-python3.patch
|
||||
|
||||
# https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1732129
|
||||
Patch80: qtbase-use-wayland-on-gnome.patch
|
||||
|
||||
# glibc stat
|
||||
|
||||
## upstream patches
|
||||
# https://bugs.kde.org/show_bug.cgi?id=406180
|
||||
# https://codereview.qt-project.org/c/qt/qtbase/+/264563
|
||||
Patch100: fbf3488.diff
|
||||
Patch110: 0010-Work-around-crash-where-a-destroyed-window-becomes-f.patch
|
||||
Patch154: 0054-Fix-crash-when-app-is-going-to-shutdown-but-conf-man.patch
|
||||
Patch156: 0056-QHighDpi-Replace-fromNative-toNative-with-scale.patch
|
||||
Patch166: 0066-High-DPI-Fix-crash-in-QWindow-mapFromGlobal.patch
|
||||
## omit for now, appears to introduce symbol incompatibilities
|
||||
#Patch200: 0100-QHighDpi-fromNativePixels-use-correct-screen.patch
|
||||
Patch250: qtbase-revert-reset-qwidget-winid-when-backing-window-surface-destroyed.patch
|
||||
|
||||
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
|
||||
# Those themes are there for platform integration. If the required libraries are
|
||||
|
@ -162,7 +189,7 @@ BuildRequires: openssl-devel%{?openssl11: >= 1.1}
|
|||
%endif
|
||||
BuildRequires: pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib)
|
||||
%if 0%{?fedora}
|
||||
%global xkbcommon -system-xkbcommon
|
||||
#global xkbcommon -system-xkbcommon
|
||||
BuildRequires: pkgconfig(libinput)
|
||||
BuildRequires: pkgconfig(xcb-xkb) >= 1.10
|
||||
BuildRequires: pkgconfig(xkbcommon) >= 0.4.1
|
||||
|
@ -172,7 +199,7 @@ BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1
|
|||
%if 0%{?rhel} == 6
|
||||
%global xcb -qt-xcb
|
||||
%endif
|
||||
%global xkbcommon -qt-xkbcommon
|
||||
#global xkbcommon -qt-xkbcommon
|
||||
Provides: bundled(libxkbcommon) = 0.4.1
|
||||
%endif
|
||||
BuildRequires: pkgconfig(xkeyboard-config)
|
||||
|
@ -180,7 +207,11 @@ BuildRequires: pkgconfig(xkeyboard-config)
|
|||
%global egl 1
|
||||
BuildRequires: pkgconfig(egl)
|
||||
BuildRequires: pkgconfig(gbm)
|
||||
## TODO: apparently only needed if building opengl_es2 support, do we actually use it? -- rex
|
||||
## this dep was removed in rawhide with introduction of mesa-19.1
|
||||
%if 0%{?fedora} < 30
|
||||
BuildRequires: pkgconfig(glesv2)
|
||||
%endif
|
||||
%global sqlite -system-sqlite
|
||||
BuildRequires: pkgconfig(sqlite3) >= 3.7
|
||||
%if 0%{?fedora} > 22
|
||||
|
@ -199,6 +230,8 @@ BuildRequires: libicu-devel
|
|||
BuildRequires: pkgconfig(xcb) pkgconfig(xcb-glx) pkgconfig(xcb-icccm) pkgconfig(xcb-image) pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: perl-generators
|
||||
# see patch68
|
||||
BuildRequires: python3
|
||||
BuildRequires: qt5-rpm-macros
|
||||
|
||||
%if 0%{?tests}
|
||||
|
@ -226,11 +259,12 @@ Requires: %{name}-common = %{version}-%{release}
|
|||
%global tds -no-sql-tds
|
||||
%endif
|
||||
|
||||
# workaround gold linker bug by not using it
|
||||
# workaround gold linker bug(s) by not using it
|
||||
# https://bugzilla.redhat.com/1458003
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=21074
|
||||
# reportedly fixed or worked-around, re-enable if there's evidence of problems -- rex
|
||||
#global use_gold_linker -no-use-gold-linker
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1635973
|
||||
%global use_gold_linker -no-use-gold-linker
|
||||
|
||||
%description
|
||||
Qt is a software toolkit for developing applications.
|
||||
|
@ -250,7 +284,6 @@ BuildArch: noarch
|
|||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Provides: %{name}-private-devel = %{version}-%{release}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-gui%{?_isa}
|
||||
%if 0%{?egl}
|
||||
|
@ -264,6 +297,16 @@ Requires: clang >= 3.7.0
|
|||
%description devel
|
||||
%{summary}.
|
||||
|
||||
%package private-devel
|
||||
Summary: Development files for %{name} private APIs
|
||||
# upgrade path, when private-devel was introduced
|
||||
Obsoletes: %{name}-devel < 5.12.1-3
|
||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
# QtPrintSupport/private requires cups/ppd.h
|
||||
Requires: cups-devel
|
||||
%description private-devel
|
||||
%{summary}.
|
||||
|
||||
%package examples
|
||||
Summary: Programming examples for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
@ -314,7 +357,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||
|
||||
%package postgresql
|
||||
Summary: PostgreSQL driver for Qt5's SQL classes
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: libpq-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%description postgresql
|
||||
%{summary}.
|
||||
|
@ -349,14 +392,14 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
|||
|
||||
## upstream fixes
|
||||
|
||||
|
||||
|
||||
%patch4 -p1 -b .QTBUG-35459
|
||||
%patch8 -p1 -b .tell-the-truth-about-private-api
|
||||
# omit '-b .tell-the-truth-about-private-api' so it doesn't end up in installed files -- rdieter
|
||||
%patch8 -p1
|
||||
|
||||
%patch50 -p1 -b .QT_VERSION_CHECK
|
||||
%patch51 -p1 -b .hidpi_scale_at_192
|
||||
%patch52 -p1 -b .moc_macros
|
||||
%patch53 -p1 -b .qt5gui_cmake_isystem_includes
|
||||
%patch54 -p1 -b .qmake_LFLAGS
|
||||
%patch61 -p1 -b .qt5-qtbase-cxxflag
|
||||
%patch64 -p1 -b .firebird
|
||||
|
@ -365,9 +408,20 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
|||
%endif
|
||||
# FIXME/REBASE
|
||||
#patch67 -p1 -b .xcberror_filter
|
||||
%patch68 -p1 -b .double_con_riscv
|
||||
%patch68 -p1
|
||||
|
||||
%if 0%{?fedora} > 30
|
||||
%patch80 -p1 -b .use-wayland-on-gnome.patch
|
||||
%endif
|
||||
|
||||
## upstream patches
|
||||
%patch100 -p1
|
||||
%patch110 -p1
|
||||
%patch154 -p1
|
||||
%patch156 -p1
|
||||
%patch166 -p1
|
||||
#patch200 -p1
|
||||
%patch250 -p1
|
||||
|
||||
# move some bundled libs to ensure they're not accidentally used
|
||||
pushd src/3rdparty
|
||||
|
@ -460,6 +514,8 @@ export MAKEFLAGS="%{?_smp_mflags}"
|
|||
-system-zlib \
|
||||
%{?use_gold_linker} \
|
||||
-no-directfb \
|
||||
%{?no_feature_renameat2} \
|
||||
%{?no_feature_statx} \
|
||||
QMAKE_CFLAGS_RELEASE="${CFLAGS:-$RPM_OPT_FLAGS}" \
|
||||
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-$RPM_OPT_FLAGS}" \
|
||||
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-$RPM_LD_FLAGS}"
|
||||
|
@ -546,6 +602,7 @@ popd
|
|||
mkdir -p %{buildroot}%{_sysconfdir}/xdg/qtchooser
|
||||
pushd %{buildroot}%{_sysconfdir}/xdg/qtchooser
|
||||
echo "%{_qt5_bindir}" > 5-%{__isa_bits}.conf
|
||||
## FIXME/TODO: verify qtchooser (still) happy if _qt5_prefix uses %%_prefix instead of %%_libdir/qt5
|
||||
echo "%{_qt5_prefix}" >> 5-%{__isa_bits}.conf
|
||||
# alternatives targets
|
||||
touch default.conf 5.conf
|
||||
|
@ -566,6 +623,8 @@ popd
|
|||
|
||||
install -p -m755 -D %{SOURCE6} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/10-qt5-check-opengl2.sh
|
||||
|
||||
# f29+ enables sse2 unconditionally on ix86 -- rex
|
||||
%if 0%{?fedora} < 29
|
||||
# fix bz#1442553 multilib issue
|
||||
privat_header_file=%{buildroot}%{_qt5_headerdir}/QtCore/%{version}/QtCore/private/qconfig_p.h
|
||||
grep -v QT_FEATURE_sse2 $privat_header_file > ${privat_header_file}.me
|
||||
|
@ -577,6 +636,7 @@ cat >>${privat_header_file}<<EOF
|
|||
#define QT_FEATURE_sse2 -1
|
||||
#endif
|
||||
EOF
|
||||
%endif
|
||||
|
||||
# install privat headers for qtxcb
|
||||
mkdir -p %{buildroot}%{_qt5_headerdir}/QtXcb
|
||||
|
@ -648,7 +708,9 @@ fi
|
|||
%endif
|
||||
|
||||
%files
|
||||
%license LICENSE.LGPL* LGPL_EXCEPTION.txt LICENSE.FDL
|
||||
%license LICENSE.FDL
|
||||
%license LICENSE.GPL*
|
||||
%license LICENSE.LGPL*
|
||||
%if 0%{?qtchooser}
|
||||
%dir %{_sysconfdir}/xdg/qtchooser
|
||||
# not editable config files, so not using %%config here
|
||||
|
@ -681,7 +743,10 @@ fi
|
|||
%{_qt5_docdir}/global/
|
||||
%{_qt5_importdir}/
|
||||
%{_qt5_translationdir}/
|
||||
%if "%{_qt5_prefix}" != "%{_prefix}"
|
||||
%dir %{_qt5_prefix}/
|
||||
%endif
|
||||
%dir %{_qt5_archdatadir}/
|
||||
%dir %{_qt5_datadir}/
|
||||
%{_qt5_datadir}/qtlogging.ini
|
||||
%dir %{_qt5_libexecdir}/
|
||||
|
@ -814,7 +879,14 @@ fi
|
|||
%{_qt5_libdir}/libQt5EglFsKmsSupport.prl
|
||||
%{_qt5_libdir}/libQt5EglFsKmsSupport.so
|
||||
%endif
|
||||
## private-devel globs
|
||||
# keep mkspecs/modules stuff in -devel for now, https://bugzilla.redhat.com/show_bug.cgi?id=1705280
|
||||
%{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri
|
||||
%exclude %{_qt5_headerdir}/*/%{version}/*/private/
|
||||
|
||||
%files private-devel
|
||||
%{_qt5_headerdir}/*/%{version}/*/private/
|
||||
#{_qt5_archdatadir}/mkspecs/modules/qt_lib_*_private.pri
|
||||
|
||||
%files static
|
||||
%{_qt5_libdir}/libQt5Bootstrap.*a
|
||||
|
@ -960,17 +1032,104 @@ fi
|
|||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin.cmake
|
||||
%{_qt5_plugindir}/xcbglintegrations/libqxcb-glx-integration.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbGlxIntegrationPlugin.cmake
|
||||
%{_qt5_plugindir}/platformthemes/libqflatpak.so
|
||||
%{_qt5_plugindir}/platformthemes/libqxdgdesktopportal.so
|
||||
%{_qt5_plugindir}/platformthemes/libqgtk3.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QFlatpakThemePlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXdgDesktopPortalThemePlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QGtk3ThemePlugin.cmake
|
||||
%{_qt5_plugindir}/printsupport/libcupsprintersupport.so
|
||||
%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupport_QCupsPrinterSupportPlugin.cmake
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 21 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 5.11.1-1.0.riscv64
|
||||
- add support for RISC-V (riscv64)
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.12.4-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jul 23 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-5
|
||||
- Use qtwayland by default on Gnome Wayland sessions
|
||||
Resolves: bz#1732129
|
||||
|
||||
* Mon Jul 15 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-4
|
||||
- Revert "Reset QWidget's winId when backing window surface is destroyed"
|
||||
|
||||
* Fri Jun 28 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.4-3
|
||||
- omit QTBUG-73231 patch fix, appears to introduce incompatible symbols
|
||||
|
||||
* Wed Jun 26 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.4-2
|
||||
- pull in some upstream crash fixes
|
||||
|
||||
* Fri Jun 14 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.4-1
|
||||
- 5.12.4
|
||||
|
||||
* Wed Jun 12 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.3-2
|
||||
- pull in candidate upstream nvidia/optima fix (kde#406180)
|
||||
|
||||
* Tue Jun 04 2019 Jan Grulich <jgrulich@redhat.com> - 5.12.3-1
|
||||
- 5.12.3
|
||||
|
||||
* Fri May 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-7
|
||||
- Fix install targets for generated private headers (#1702858)
|
||||
|
||||
* Wed May 08 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-6
|
||||
- Blacklist nouveau and llvmpipe for multithreading (#1706420)
|
||||
- drop BR: pkgconfig(glesv2) on f31+, no longer provided in mesa-19.1+
|
||||
|
||||
* Thu May 02 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-5
|
||||
- keep mkspecs/modules/*_private.pri in -devel #1705280)
|
||||
|
||||
* Tue Apr 30 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-4
|
||||
- CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui (#1704474)
|
||||
|
||||
* Tue Apr 30 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-3
|
||||
- -private-devel subpkg, move Requires: cups-devel here
|
||||
|
||||
* Mon Mar 04 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-2
|
||||
- -devel: Requires: cups-devel
|
||||
|
||||
* Thu Feb 14 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-1
|
||||
- 5.12.1
|
||||
|
||||
* Wed Feb 13 2019 Than Ngo <than@redhat.com> - 5.11.3-4
|
||||
- fixed build issue with gcc9
|
||||
|
||||
* Sun Feb 03 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.11.3-3
|
||||
- disable renameat2/statx feature on < f30 (#1668865)
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.11.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Dec 07 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.3-1
|
||||
- 5.11.3
|
||||
|
||||
* Thu Oct 25 2018 Than Ngo <than@redhat.com> - 5.11.2-3
|
||||
- backported patch to fix selection rendering issues if rounding leads to left-out pixels
|
||||
- backported patch to optimize insertionPointsForLine
|
||||
|
||||
* Thu Oct 11 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.2-2
|
||||
- -no-use-gold-linker (#1635973)
|
||||
|
||||
|
||||
* Fri Sep 21 2018 Jan Grulich <jgrulich@redhat.com> - 5.11.2-1
|
||||
- 5.11.2
|
||||
|
||||
* Thu Jul 26 2018 Than Ngo <than@redhat.com> - 5.11.1-7
|
||||
- fixed FTBFS
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.11.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 5.11.1-5
|
||||
- Rebuild for ICU 62
|
||||
|
||||
* Mon Jul 02 2018 Than Ngo <than@redhat.com> - 5.11.1-4
|
||||
- fixed bz#1597110 - BRP mangle shebangs and calculation of provides should ignore backups files
|
||||
|
||||
* Fri Jun 29 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.1-3
|
||||
- apply sse2-related multilib hack on < f29 only
|
||||
- safer %%_qt5_prefix, %%qt5_archdatadir ownership
|
||||
- rebuild for %%_qt5_prefix = %%_prefix
|
||||
|
||||
* Sat Jun 23 2018 Than Ngo <than@redhat.com> - 5.11.1-2
|
||||
- fixed #1592146, python3
|
||||
|
||||
* Tue Jun 19 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.1-1
|
||||
- 5.11.1
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
diff -up qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py
|
||||
--- qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me 2018-06-23 11:29:21.750066271 +0200
|
||||
+++ qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py 2018-06-23 11:30:07.457292033 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
#############################################################################
|
||||
##
|
|
@ -0,0 +1,14 @@
|
|||
diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||
--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500
|
||||
+++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500
|
||||
@@ -66,8 +66,10 @@ unset(_GL_INCDIRS)
|
||||
# Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is
|
||||
# optional.
|
||||
|
||||
+if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include")
|
||||
list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
|
||||
set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
|
||||
+endif()
|
||||
|
||||
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp.fdo101667 qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp
|
||||
--- qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp.fdo101667 2018-01-16 00:53:43.000000000 -0600
|
||||
+++ qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp 2018-01-28 07:18:09.502534397 -0600
|
||||
@@ -418,6 +418,8 @@ QStringList QMimeType::suffixes() const
|
||||
*/
|
||||
QString QMimeType::preferredSuffix() const
|
||||
{
|
||||
+ if (isDefault()) // workaround for unwanted *.bin suffix for octet-stream, https://bugs.freedesktop.org/show_bug.cgi?id=101667, fixed upstream in 1.10
|
||||
+ return QString();
|
||||
const QStringList suffixList = suffixes();
|
||||
return suffixList.isEmpty() ? QString() : suffixList.at(0);
|
||||
}
|
|
@ -1,13 +1,12 @@
|
|||
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
index ec0f9ba..6d0d7a6 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
@@ -747,7 +747,7 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation)
|
||||
m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi());
|
||||
|
||||
qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4);
|
||||
- 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)
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 2019-02-03 13:21:27.866906481 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2019-02-03 13:23:47.554767565 -0600
|
||||
@@ -744,7 +744,7 @@ void QXcbScreen::updateGeometry(const QR
|
||||
// Use 128 as a reference DPI on small screens. This favors "small UI" over "large UI".
|
||||
qreal referenceDpi = physicalSize().width() <= 320 ? 128 : 96;
|
||||
|
||||
- m_pixelDensity = qMax(1, qRound(dpi/referenceDpi));
|
||||
+ m_pixelDensity = qMax(1, (int) (dpi/referenceDpi)); //instead of rounding at 1.5, round at 2.0 (same as GNOME)
|
||||
m_geometry = geometry;
|
||||
m_availableGeometry = geometry & m_virtualDesktop->workArea();
|
||||
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
From deac052a40c93633041da058d5c73c9e91aa76c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo@qt.io>
|
||||
Date: Fri, 12 Jul 2019 12:28:29 +0200
|
||||
Subject: Revert "Reset QWidget's winId when backing window surface is
|
||||
destroyed"
|
||||
|
||||
This reverts commit a9246c7132a2c8864d3ae6cebd260bb9ee711fcb.
|
||||
|
||||
The QWidget machinery is way to fragile to reset the winId under the
|
||||
feet of QWidget like that. We would potentially need to include all
|
||||
the logic in QWidget::destroy. This also ties into the flow between
|
||||
QtGui and QtWidgets during window closing, which is still unresolved.
|
||||
|
||||
Change-Id: I168048a63c89796398eb5331a80ce3e5c8d9a208
|
||||
Fixes: QTBUG-76588
|
||||
Task-number: QTBUG-69289
|
||||
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
||||
|
||||
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
|
||||
index fdb3872903..6f0f39a344 100644
|
||||
--- a/src/widgets/kernel/qwidget.cpp
|
||||
+++ b/src/widgets/kernel/qwidget.cpp
|
||||
@@ -9382,12 +9382,6 @@ bool QWidget::event(QEvent *event)
|
||||
d->renderToTextureReallyDirty = 1;
|
||||
#endif
|
||||
break;
|
||||
- case QEvent::PlatformSurface: {
|
||||
- auto surfaceEvent = static_cast<QPlatformSurfaceEvent*>(event);
|
||||
- if (surfaceEvent->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed)
|
||||
- d->setWinId(0);
|
||||
- break;
|
||||
- }
|
||||
#ifndef QT_NO_PROPERTIES
|
||||
case QEvent::DynamicPropertyChange: {
|
||||
const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName();
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
|
||||
index b8bfad4f16..676fdfad5e 100644
|
||||
--- a/src/gui/kernel/qguiapplication.cpp
|
||||
+++ b/src/gui/kernel/qguiapplication.cpp
|
||||
@@ -1376,14 +1376,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
|
||||
if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) {
|
||||
platformName = QByteArrayLiteral("xcb");
|
||||
} else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) {
|
||||
- QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
|
||||
- QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
|
||||
- if (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")) {
|
||||
- qInfo() << "Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome."
|
||||
- << "Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.";
|
||||
- } else {
|
||||
- platformName = QByteArrayLiteral("wayland");
|
||||
- }
|
||||
+ platformName = QByteArrayLiteral("wayland");
|
||||
}
|
||||
}
|
||||
#ifdef QT_QPA_DEFAULT_PLATFORM_NAME
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (qtbase-everywhere-src-5.11.1.tar.xz) = 5f45405872e541565d811c1973ae95b0f19593f4495375306917b72e21146e14fe8f7db5fbd629476476807f89ef1679aa59737ca5efdd9cbe6b14d7aa371b81
|
||||
SHA512 (qtbase-everywhere-src-5.12.4.tar.xz) = 28b029a0d3621477f625d474b8bc38ddcc7173df6adb274b438e290b6c50bd0891e5b62c04b566a281781acee3a353a6a3b0bc88228e996994f92900448d7946
|
||||
|
|
Loading…
Reference in New Issue