Accepting request 288115 from KDE:Qt5

Update to 5.4.1

OBS-URL: https://build.opensuse.org/request/show/288115
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=38
This commit is contained in:
Dominique Leuenberger 2015-03-01 14:27:47 +00:00 committed by Git OBS Bridge
parent 7169baff88
commit 48a849b9f3
20 changed files with 254 additions and 671 deletions

View File

@ -0,0 +1,37 @@
From 8d6341a721d07e3cc30032bcc89f7e25cb00b9eb Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Mon, 16 Feb 2015 22:53:02 +0100
Subject: [PATCH] Call [ofono|nm]Registered delayed in constructor otherwise
signals will be lost
If we call them just in the constructor all the signals they sent
out can't be connected and will be lost, particularly this means
the QNetworkConfigurationManager doesn't see my ethernet connection
and thus thinks i'm not online
Change-Id: I1480f76338d6ae4fbed676f9fa40ada18ea431ad
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
---
src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index f52b9d4..0378ac7 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -80,10 +80,10 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
this, SLOT(ofonoUnRegistered(QString)));
if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.ofono"))
- ofonoRegistered();
+ QMetaObject::invokeMethod(this, "ofonoRegistered", Qt::QueuedConnection);
if (QDBusConnection::systemBus().interface()->isServiceRegistered(NM_DBUS_SERVICE))
- nmRegistered();
+ QMetaObject::invokeMethod(this, "nmRegistered", Qt::QueuedConnection);
}
QNetworkManagerEngine::~QNetworkManagerEngine()
--
2.1.4

View File

@ -1,30 +0,0 @@
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Sat, 29 Nov 2014 00:06:18 +0000
Subject: Configure: Fix detection of GCC 5
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=9fb4c2c412621b63c06dbbd899f44041b2e126c2
---
Configure: Fix detection of GCC 5
$ gcc-5 -dumpversion
5
No dots.
Change-Id: I5dd547f257718c981e7be64fca3eec980136ba3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
---
--- a/configure
+++ b/configure
@@ -6031,6 +6031,10 @@
QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
QT_GCC_PATCH_VERSION=0
;;
+ *)
+ QT_GCC_MAJOR_VERSION=$COMPILER_VERSION
+ QT_GCC_MINOR_VERSION=0
+ QT_GCC_PATCH_VERSION=0
esac
;;

View File

@ -1,85 +0,0 @@
From: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Date: Wed, 07 Jan 2015 14:19:07 +0000
Subject: Fix physical DPI and size for rotated screens on X11
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=e6699afbee77b853773579d29d78a1ade2a4ab2c
---
Fix physical DPI and size for rotated screens on X11
Rotated screens would use the unrotated physical geometry, causing the
calculated physical DPI to be completely wrong.
In RandR, the output does not rotate, so the physical size is always for the
unrotated display. The transformation is done on the crtc.
http://www.x.org/releases/X11R7.6/doc/randrproto/randrproto.txt
Task-number: QTBUG-43688
Change-Id: Ifde192fcc99a37d0bfd6d57b4cdeac124a054ca3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
---
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -53,7 +53,7 @@
, m_screen(scr)
, m_crtc(output ? output->crtc : 0)
, m_outputName(outputName)
- , m_sizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize())
+ , m_outputSizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize())
, m_virtualSize(scr->width_in_pixels, scr->height_in_pixels)
, m_virtualSizeMillimeters(scr->width_in_millimeters, scr->height_in_millimeters)
, m_orientation(Qt::PrimaryOrientation)
@@ -71,6 +71,7 @@
updateGeometry(output ? output->timestamp : 0);
updateRefreshRate();
+
const int dpr = int(devicePixelRatio());
// On VNC, it can be that physical size is unknown while
// virtual size is known (probably back-calculated from DPI and resolution)
@@ -93,6 +94,7 @@
qDebug(" virtual height.: %lf", m_virtualSizeMillimeters.height());
qDebug(" virtual geom...: %d x %d", m_virtualSize.width(), m_virtualSize.height());
qDebug(" avail virt geom: %d x %d +%d +%d", m_availableGeometry.width(), m_availableGeometry.height(), m_availableGeometry.x(), m_availableGeometry.y());
+ qDebug(" orientation....: %d", m_orientation);
qDebug(" pixel ratio....: %d", m_devicePixelRatio);
qDebug(" depth..........: %d", screen()->root_depth);
qDebug(" white pixel....: %x", screen()->white_pixel);
@@ -413,6 +415,24 @@
if (crtc) {
xGeometry = QRect(crtc->x, crtc->y, crtc->width, crtc->height);
xAvailableGeometry = xGeometry;
+ switch (crtc->rotation) {
+ case XCB_RANDR_ROTATION_ROTATE_0: // xrandr --rotate normal
+ m_orientation = Qt::LandscapeOrientation;
+ m_sizeMillimeters = m_outputSizeMillimeters;
+ break;
+ case XCB_RANDR_ROTATION_ROTATE_90: // xrandr --rotate left
+ m_orientation = Qt::PortraitOrientation;
+ m_sizeMillimeters = m_outputSizeMillimeters.transposed();
+ break;
+ case XCB_RANDR_ROTATION_ROTATE_180: // xrandr --rotate inverted
+ m_orientation = Qt::InvertedLandscapeOrientation;
+ m_sizeMillimeters = m_outputSizeMillimeters;
+ break;
+ case XCB_RANDR_ROTATION_ROTATE_270: // xrandr --rotate right
+ m_orientation = Qt::InvertedPortraitOrientation;
+ m_sizeMillimeters = m_outputSizeMillimeters.transposed();
+ break;
+ }
free(crtc);
}
}
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -111,6 +111,7 @@
xcb_screen_t *m_screen;
xcb_randr_crtc_t m_crtc;
QString m_outputName;
+ QSizeF m_outputSizeMillimeters;
QSizeF m_sizeMillimeters;
QRect m_geometry;
QRect m_availableGeometry;

View File

@ -1,28 +0,0 @@
From: Aleix Pol <aleixpol@kde.org>
Date: Mon, 22 Dec 2014 15:34:54 +0000
Subject: Fix typo in Qt5CoreMacros.cmake
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=c63bb90ac7224927b56197d80252c79d01ff3b6f
---
Fix typo in Qt5CoreMacros.cmake
According to the documentation, the argument is called COPYONLY instead
of COPY_ONLY.
Fixes warning and ensures it works properly.
Change-Id: I643f5ea808aaaf94c3ee666ec39485e84ed38df1
Reviewed-by: Vishesh Handa <vhanda@kde.org>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
---
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -221,7 +221,7 @@
# let's make a configured file and add it as a dependency so cmake is run
# again when dependencies need to be recomputed.
qt5_make_output_file("${infile}" "" "qrc.depends" out_depends)
- configure_file("${infile}" "${out_depends}" COPY_ONLY)
+ configure_file("${infile}" "${out_depends}" COPYONLY)
else()
# The .qrc file does not exist (yet). Let's add a dependency and hope
# that it will be generated later

View File

@ -1,37 +0,0 @@
From: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
Date: Wed, 07 Jan 2015 13:50:41 +0000
Subject: Fix use-after-free bug
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=d40b66a8ef98777c69ac293dac9a332f88832c23
---
Fix use-after-free bug
xcb_image_destroy() calls free on m_xcb_image
and then few lines down we access member of
m_xcb_image. Swap order of these two actions.
Change-Id: I01fb43a066459cce462df6af22161c35cef524eb
Task-number: QTBUG-43623
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
---
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -145,8 +145,6 @@
if (segmentSize && m_shm_info.shmaddr)
Q_XCB_CALL(xcb_shm_detach(xcb_connection(), m_shm_info.shmseg));
- xcb_image_destroy(m_xcb_image);
-
if (segmentSize) {
if (m_shm_info.shmaddr) {
shmdt(m_shm_info.shmaddr);
@@ -155,6 +153,8 @@
free(m_xcb_image->data);
}
}
+
+ xcb_image_destroy(m_xcb_image);
if (m_gc)
Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));

View File

@ -1,32 +0,0 @@
From: Martin Gräßlin <mgraesslin@kde.org>
Date: Wed, 10 Dec 2014 06:27:23 +0000
Subject: Handle SelectionClientClose in QXcbClipboard
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2
---
Handle SelectionClientClose in QXcbClipboard
QXcbClipboard listens for subtype SelectionClientClose of Xfixes
SelectionNotify event, but doesn't handle it. When the client holding
the clipboard selection closes the Clipboard becomes empty and thus the
change should be emitted.
This fixes downstream KDE Bug #329174.
Change-Id: I19fb8cfd7bd3b249c0bc6ca2a724a9aeeb05ac7e
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
---
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -742,7 +742,8 @@
m_xClipboard[mode]->reset();
}
emitChanged(mode);
- }
+ } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE)
+ emitChanged(mode);
}

View File

@ -0,0 +1,36 @@
From a95b2e88603ecd18d54c384869ff1281e569f556 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <mgraesslin@kde.org>
Date: Fri, 6 Feb 2015 07:34:43 +0100
Subject: [PATCH] Handle SelectionWindowDestroy in QXcbClipboard
This change is related to 6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2
which added handling for SelectionClientClose. Further testing showed
that with e.g. Qt 4 applications the SelectionClientClose is not
emitted, but the selection window seems to be destroyed before the
client is destroyed.
Fur a destroyed selection window the same applies: the clipboard
content is no longer valid and we should emit the changed signal.
Change-Id: Id3778a28b9f5601bf2c6e0106981316e0efa6e7c
---
src/plugins/platforms/xcb/qxcbclipboard.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index f56a29d..4b6caa9 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -742,7 +742,8 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve
m_xClipboard[mode]->reset();
}
emitChanged(mode);
- } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE)
+ } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE ||
+ event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY)
emitChanged(mode);
}
--
2.1.4

View File

@ -1,47 +0,0 @@
From: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Date: Thu, 08 Jan 2015 12:55:32 +0000
Subject: Multi-screen DPI support for X11
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=3f0b8a9f198cd1e0e8ae9150561f93fb1b931b7e
---
Multi-screen DPI support for X11
Calculate the logical DPI independently per screen, but
only when auto dpr is enabled.
Using a constant DPI value for all screens, based on the combined
geometry is arguably incorrect, but changing this now will
cause pixel-size fonts to behave visibly different from point-size
fonts when moving the window to a different screen.
However, with QT_DEVICE_PIXEL_RATIO=auto, the pixel size fonts are
already changing when the devicePixelRatio changes. Without this change,
the point-size fonts will *not* adapt, which is a clear bug.
Task-number: QTBUG-43713
Change-Id: I3e71618f9d55b7828ccd70b69a7b7ce656c69d65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
---
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -317,8 +317,14 @@
if (m_forcedDpi > 0)
return QDpi(m_forcedDpi/dpr, m_forcedDpi/dpr);
- return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width() / dpr,
- Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height() / dpr);
+ static const bool auto_dpr = qgetenv("QT_DEVICE_PIXEL_RATIO").toLower() == "auto";
+ if (auto_dpr) {
+ return QDpi(Q_MM_PER_INCH * m_geometry.width() / m_sizeMillimeters.width(),
+ Q_MM_PER_INCH * m_geometry.height() / m_sizeMillimeters.height());
+ } else {
+ return QDpi(Q_MM_PER_INCH * m_virtualSize.width() / m_virtualSizeMillimeters.width() / dpr,
+ Q_MM_PER_INCH * m_virtualSize.height() / m_virtualSizeMillimeters.height() / dpr);
+ }
}

View File

@ -1,38 +0,0 @@
From: Allan Sandfeld Jensen <allan.jensen@digia.com>
Date: Tue, 11 Nov 2014 12:48:27 +0000
Subject: Do not apply subpixel gamma-correction on XCB
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=501c510cc3cb6215aed27af7599395480a049667
---
Do not apply subpixel gamma-correction on XCB
To match rendering of subpixel antialiased text in Qt 4.8 and other
toolkits on X11, we should not apply gamma-correction. This also
makes the rendering of subpixel antialiased text closer to normal
antialiased text.
Task-number: QTBUG-41590
Change-Id: I45ad3448334951353657b878d002eea429858f2d
Reviewed-by: Samuel Rødal <srodal@gmail.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
---
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -427,12 +427,14 @@
case QPlatformIntegration::StartDragTime:
case QPlatformIntegration::KeyboardAutoRepeatRate:
case QPlatformIntegration::PasswordMaskDelay:
- case QPlatformIntegration::FontSmoothingGamma:
case QPlatformIntegration::StartDragVelocity:
case QPlatformIntegration::UseRtlExtensions:
case QPlatformIntegration::PasswordMaskCharacter:
// TODO using various xcb, gnome or KDE settings
break; // Not implemented, use defaults
+ case QPlatformIntegration::FontSmoothingGamma:
+ // Match Qt 4.8 text rendering, and rendering of other X11 toolkits.
+ return qreal(1.0);
case QPlatformIntegration::StartDragDistance: {
// The default (in QPlatformTheme::defaultThemeHint) is 10 pixels, but
// on a high-resolution screen it makes sense to increase it.

View File

@ -1,127 +0,0 @@
From: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Date: Wed, 07 Jan 2015 14:44:12 +0000
Subject: X11 devicePixelRatio screen mapping fix
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=075ae987c48ce732e6a22c1eba71023fa0ea1775
---
X11 devicePixelRatio screen mapping fix
Fix screen detection and window geometry when screens have
different displayPixelRatios.
We must use the native coordinate system to figure out which
screen a window belongs to. Also, when a window moves to a
screen with a different devicePixelRatio, we must recalculate
the Qt geometry.
Task-number: QTBUG-43713
Change-Id: I93063e37354ff88f3c8a13320b76dfb272e43a9c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
---
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -77,8 +77,10 @@
// virtual size is known (probably back-calculated from DPI and resolution)
if (m_sizeMillimeters.isEmpty())
m_sizeMillimeters = m_virtualSizeMillimeters;
- if (m_geometry.isEmpty())
+ if (m_geometry.isEmpty()) {
m_geometry = QRect(QPoint(), m_virtualSize/dpr);
+ m_nativeGeometry = QRect(QPoint(), m_virtualSize);
+ }
if (m_availableGeometry.isEmpty())
m_availableGeometry = m_geometry;
@@ -461,6 +463,7 @@
m_devicePixelRatio = qRound(dpi/96);
const int dpr = int(devicePixelRatio()); // we may override m_devicePixelRatio
m_geometry = QRect(xGeometry.topLeft()/dpr, xGeometry.size()/dpr);
+ m_nativeGeometry = QRect(xGeometry.topLeft(), xGeometry.size());
m_availableGeometry = QRect(xAvailableGeometry.topLeft()/dpr, xAvailableGeometry.size()/dpr);
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -62,6 +62,7 @@
QWindow *topLevelAt(const QPoint &point) const;
QRect geometry() const { return m_geometry; }
+ QRect nativeGeometry() const { return m_nativeGeometry; }
QRect availableGeometry() const {return m_availableGeometry;}
int depth() const { return m_screen->root_depth; }
QImage::Format format() const;
@@ -114,6 +115,7 @@
QSizeF m_outputSizeMillimeters;
QSizeF m_sizeMillimeters;
QRect m_geometry;
+ QRect m_nativeGeometry;
QRect m_availableGeometry;
QSize m_virtualSize;
QSizeF m_virtualSizeMillimeters;
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1831,6 +1831,23 @@
}
}
+// Temporary workaround for bug in QPlatformScreen::screenForNativeGeometry
+// we need the native geometries to detect our screen, but that's not
+// available in cross-platform code. Will be fixed properly when highDPI
+// support is refactored to expose the native coordinate system.
+
+QPlatformScreen *QXcbWindow::screenForNativeGeometry(const QRect &newGeometry) const
+{
+ QXcbScreen *currentScreen = static_cast<QXcbScreen*>(screen());
+ if (!parent() && !currentScreen->nativeGeometry().intersects(newGeometry)) {
+ Q_FOREACH (QPlatformScreen* screen, currentScreen->virtualSiblings()) {
+ if (static_cast<QXcbScreen*>(screen)->nativeGeometry().intersects(newGeometry))
+ return screen;
+ }
+ }
+ return currentScreen;
+}
+
void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event)
{
bool fromSendEvent = (event->response_type & 0x80);
@@ -1847,15 +1864,23 @@
}
}
- QRect rect = mapFromNative(QRect(pos, QSize(event->width, event->height)), int(devicePixelRatio()));
+ const int dpr = devicePixelRatio();
+ const QRect nativeRect = QRect(pos, QSize(event->width, event->height));
+ const QRect rect = mapFromNative(nativeRect, dpr);
QPlatformWindow::setGeometry(rect);
QWindowSystemInterface::handleGeometryChange(window(), rect);
- QPlatformScreen *newScreen = screenForGeometry(rect);
+ QPlatformScreen *newScreen = screenForNativeGeometry(nativeRect);
if (newScreen != m_screen) {
m_screen = static_cast<QXcbScreen*>(newScreen);
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen());
+ int newDpr = devicePixelRatio();
+ if (newDpr != dpr) {
+ QRect newRect = mapFromNative(nativeRect, newDpr);
+ QPlatformWindow::setGeometry(newRect);
+ QWindowSystemInterface::handleGeometryChange(window(), newRect);
+ }
}
m_configureNotifyPending = false;
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -154,6 +154,8 @@
qreal devicePixelRatio() const;
+ QPlatformScreen *screenForNativeGeometry(const QRect &newGeometry) const;
+
public Q_SLOTS:
void updateSyncRequestCounter();

View File

@ -0,0 +1,40 @@
From: Richard J. Moore <rich@kde.org>
Date: Sat, 21 Feb 2015 17:43:21 +0000
Subject: Fix a division by zero when processing malformed BMP files.
---
Fix a division by zero when processing malformed BMP files.
This fixes a division by 0 when processing a maliciously crafted BMP
file. No impact beyond DoS.
Task-number: QTBUG-44547
Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
---
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -314,12 +314,20 @@
}
} else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
red_shift = calc_shift(red_mask);
+ if (((red_mask >> red_shift) + 1) == 0)
+ return false;
red_scale = 256 / ((red_mask >> red_shift) + 1);
green_shift = calc_shift(green_mask);
+ if (((green_mask >> green_shift) + 1) == 0)
+ return false;
green_scale = 256 / ((green_mask >> green_shift) + 1);
blue_shift = calc_shift(blue_mask);
+ if (((blue_mask >> blue_shift) + 1) == 0)
+ return false;
blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
alpha_shift = calc_shift(alpha_mask);
+ if (((alpha_mask >> alpha_shift) + 1) == 0)
+ return false;
alpha_scale = 256 / ((alpha_mask >> alpha_shift) + 1);
} else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
blue_mask = 0x000000ff;

View File

@ -1,124 +0,0 @@
From: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
Date: Wed, 07 Jan 2015 12:51:38 +0000
Subject: Fix drag and drop regression
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=3c21c4581dbd957d9f660dd52d0298ecef1001cb
---
Fix drag and drop regression
Fix regression introduced by e4becdc3d310a0dd1a6d34d0796a52b21dedeb2d
Add QPlatformDrag::ownsDragObject() function, QDragManager can use the
return value of this function to decide if it should take care of deleting
QDrag object or platform plugin will take care of deleting QDrag.
XCB platform plugins uses async dnd data delivery mechanism. It allows
user to drop something and then continue working with the assurance that
the target will get the data regardless of how slow the network connections
are, which means that a source window should preserve QDrag data until
dnd has finished.
Change-Id: I1fbad7380cddec98b756698993dd397409833150
Task-number: QTBUG-43436
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
---
--- a/src/gui/kernel/qdnd.cpp
+++ b/src/gui/kernel/qdnd.cpp
@@ -134,7 +134,8 @@
QGuiApplicationPrivate::instance()->notifyDragStarted(o);
const Qt::DropAction result = m_platformDrag->drag(m_object);
m_object = 0;
- o->deleteLater();
+ if (!m_platformDrag->ownsDragObject())
+ o->deleteLater();
return result;
}
--- a/src/gui/kernel/qplatformdrag.cpp
+++ b/src/gui/kernel/qplatformdrag.cpp
@@ -241,6 +241,18 @@
return *qt_drag_default_pixmap();
}
+/*!
+ \since 5.4
+ \brief Returns bool indicating whether QPlatformDrag takes ownership
+ and therefore responsibility of deleting the QDrag object passed in
+ from QPlatformDrag::drag. This can be useful on platforms where QDrag
+ object has to be kept around.
+ */
+bool QPlatformDrag::ownsDragObject() const
+{
+ return false;
+}
+
#endif // QT_NO_DRAGANDDROP
QT_END_NAMESPACE
--- a/src/gui/kernel/qplatformdrag.h
+++ b/src/gui/kernel/qplatformdrag.h
@@ -98,6 +98,8 @@
static QPixmap defaultPixmap();
+ virtual bool ownsDragObject() const;
+
private:
QPlatformDragPrivate *d_ptr;
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -999,6 +999,8 @@
if (at != -1) {
Transaction t = transactions.takeAt(at);
+ if (t.drag)
+ t.drag->deleteLater();
// QDragManager *manager = QDragManager::self();
// Window target = current_target;
@@ -1186,6 +1188,11 @@
}
}
+bool QXcbDrag::ownsDragObject() const
+{
+ return true;
+}
+
QXcbDropData::QXcbDropData(QXcbDrag *d)
: QXcbMime(),
drag(d)
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -70,12 +70,11 @@
virtual QMimeData *platformDropData();
-
- void startDrag();
- void cancel();
- void move(const QMouseEvent *me);
- void drop(const QMouseEvent *me);
- void endDrag();
+ void startDrag() Q_DECL_OVERRIDE;
+ void cancel() Q_DECL_OVERRIDE;
+ void move(const QMouseEvent *me) Q_DECL_OVERRIDE;
+ void drop(const QMouseEvent *me) Q_DECL_OVERRIDE;
+ void endDrag() Q_DECL_OVERRIDE;
void handleEnter(QWindow *window, const xcb_client_message_event_t *event);
void handlePosition(QWindow *w, const xcb_client_message_event_t *event);
@@ -87,6 +86,7 @@
void handleFinished(const xcb_client_message_event_t *event);
bool dndEnable(QXcbWindow *win, bool on);
+ bool ownsDragObject() const Q_DECL_OVERRIDE;
void updatePixmap();
xcb_timestamp_t targetTime() { return target_time; }

View File

@ -1,2 +1,3 @@
addFilter("files-duplicated-waste .*")
addFilter("files-duplicate .*")
addFilter("files-duplicate .*")
addFilter("shlib-fixed-dependency .*")

View File

@ -1,3 +1,113 @@
-------------------------------------------------------------------
Fri Feb 27 17:19:10 UTC 2015 - hrvoje.senjan@gmail.com
- Added fix-a-division-by-zero-when-processing-malformed-BMP-files.patch,
CVE-2015-0295
-------------------------------------------------------------------
Tue Feb 24 16:10:10 UTC 2015 - hrvoje.senjan@gmail.com
- Update to 5.4.1:
* Important Behavior Changes:
* Restored binary compatibility with Qt 5.3.2 on Windows when
using MSVC 2012 or MSVC 2013. This means that Qt 5.4.1 is no
longer binary compatible with Qt 5.4.0 when using either of
those compilers.
* [QTBUG-42594] OS X binary package: fixed incorrect linking
to libraries in /opt/local/lib
* Library:
* QtCore:
* [QTBUG-43893] Fixed memory leak in qSetMessagePattern
* [QTBUG-43513] QXmlStreamReader: Correctly parse XML
containing NUL bytes in the input stream
* [QTBUG-43352] QTemporaryDirectory: Properly clean up in
case of a failure
* [QTBUG-43827] Fixed regression in QSortFilterProxyModel
which crashed when sorting a tree model
* QtGui:
* [QTBUG-44273] Fixed misplacement of outlined text with
native text rendering
* [QTBUG-44147] Fixed VNC not working on some VNC servers
* [QTBUG-43850] Fixed crash with multi-threaded font usage
* [QTBUG-43850] Made the old harfbuzz fallback available
at runtime
* Improvements to the experimental high-dpi support
* [QTBUG-43318] Better resolving of GLES3 functions to
avoid issues when deploying on systems with GLES 2.0 only
* QtWidgets:
* [QTBUG-43830] Fixed crash in stylesheets when
styling QProgressBar
* [QTBUG-43663] QColorDialog: Don't lose focus while
color picking
* QtNetwork:
* [QTBUG-43793] Fixed disconnections of QSSLSocket after
starting encryption
* QtSql:
* [QTBUG-36211] qpsql: Added timezone support for
datetime fields.
* qodbc: Fixed converted string values on Microsoft SQL
Server 2012
* [QTBUG-43874] QSqlQuery: Fixed failure of multiple
execBatch() calls after a single prepare() call
* QtPrintSupport:
* [QTBUG-43124] Fixed QPrinter::{width,height} return values
* Platform Specific Changes:
* Linux/XCB:
* [QTBUG-43436] Fixed regression when drag and drop to
other applications
* [QTBUG-43809] Turned off font hinting when doing
high DPI scaling
* [QTBUG-43743] Fixed constantly resizing bigger window when
devicePixelRatio is greater than 1
* [QTBUG-43713] Fixed problems with multiple screens with
different device pixel ratios regarding window mapping
and font sizes.
* [QTBUG-43688] Fixed physical DPI and size for
rotated screens on X11
* [QTBUG-43049] Fixed grabKeyboard and grabMouse
* [QTBUG-36862] Now sends a leave event to the other window
when a popup shows which grabs the input
* [QTBUG-41590] Turned off subpixel gamma-correction on XCB
* Added support for SelectionClientClose in QXcbClipboard
* Fixed -nograb and -dograb arguments
* [QTBUG-43623] Fixed use after free
* [QTBUG-43436] Fixed regression in DnD. Make sure to preserve
the QDrag until all data has been received.
* Tools:
* configure & build system:
* configure will now reject invalid -no-feature-* options.
* pkg-config assisted libudev detection was fixed.
* [QTBUG-43302][Android] The Android style is included
when cross-building on Windows as well.
* [QTBUG-43205][Unix] Fixed build D-Bus headers cannot be found.
* qmake:
* [QTBUG-39690][Windows] Fixed file separators in 'make clean'.
* [QTBUG-40264][Unix] Fixed 'make distclean' for a dynamic
library target.
* [QTBUG-42678] 'make distclean' now removes .qmake.{stash|super}.
* [QTBUG-43026][VS2010+] Fixed compilation of .rc files.
* [QTBUG-43457][MSVC] Fixed QMAKE_TARGET.arch for
amd64_x86 x-build.
* INCLUDEPATH+=. is now unnecessary with all generators.
* For more details please see:
http://blog.qt.io/blog/2015/02/24/qt-5-4-1-released/
- Drop merged or obsolete patches:
qmake-add-usr-include.diff, QTBUG41590.patch,
Handle-SelectionClientClose-in-QXcbClipboard.patch,
qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch,
Fix-use-after-free-bug.patch, fix-drag-and-drop-regression.patch,
Fix-detection-of-GCC5.patch, Fix-typo-in-Qt5CoreMacroscmake.patch,
Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch,
X11-devicePixelRatio-screen-mapping-fix.patch,
Multi-screen-DPI-support-for-X11.patch and
xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch
- Added Handle-SelectionWindowDestroy-in-QXcbClipboard.patch and
Call-ofono-nm-Registered-delayed-in-constructor-othe.patch from
upstrean
- Make sure each lib requires equal version of other qtbase libs
it needs (added filtering for shlib-fixed-dependency to rpmlintrc
accordingly)
-------------------------------------------------------------------
Wed Feb 18 01:41:07 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -26,15 +26,15 @@
%endif
Name: libqt5-qtbase
Version: 5.4.0
Version: 5.4.1
Release: 0
Summary: C++ Program Library, Core Components
License: GPL-3.0 or SUSE-LGPL-2.1-with-digia-exception-1.1
Group: System/Libraries
Url: http://qt.digia.com
%define base_name libqt5
%define real_version 5.4.0
%define so_version 5.4.0
%define real_version 5.4.1
%define so_version 5.4.1
%define tar_version qtbase-opensource-src-%{real_version}
Source: %{tar_version}.tar.xz
# to get mtime of file:
@ -45,8 +45,6 @@ Source99: libqt5-qtbase-rpmlintrc
# patches 0-1000 are openSUSE and/or non-upstream(able) patches #
# PATCH-FIX-UPSTREAM libqt5-libtool-nodate.diff -- for ommiting date/time on build
Patch0: libqt5-libtool-nodate.diff
# PATCH-FIX-UPSTREAM qmake-add-usr-include.diff -- explicitly include /usr/include path
Patch1: qmake-add-usr-include.diff
# PATCH-FIX-UPSTREAM use-freetype-default.patch -- allow using lcd-default filter regardless of how freetype2 library has been built (w/ & w/o subpixel)
Patch2: use-freetype-default.patch
# PATCH-FIX-SUSE libqt5-Fix-Gujarati-font.patch bnc#878292 fix broken Gujarati font rendering
@ -55,40 +53,24 @@ Patch3: libqt5-Fix-Gujarati-font.patch
Patch4: protect-geometry-QTBUG-40584.patch
# Patch-FIX-SUSE libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch -- bnc#888858
Patch5: libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch
# PATCH-FIX-OPENSUSE QTBUG41590.patch -- https://bugreports.qt-project.org/browse/QTBUG-40971 https://bugreports.qt-project.org/browse/QTBUG-41590
Patch6: QTBUG41590.patch
# PATCH-FIX-OPENSUSE make-qdbusxml2cpp-output-reproducible.patch -- https://codereview.qt-project.org/#/c/105210/1
Patch7: make-qdbusxml2cpp-output-reproducible.patch
# patches 1000-2000 and above from upstream 5.3 branch #
# patches 2000-3000 and above from upstream 5.4 branch #
# PATCH-FIX-UPSTREAM Handle-SelectionClientClose-in-QXcbClipboard.patch -- kde#329174
Patch2000: Handle-SelectionClientClose-in-QXcbClipboard.patch
# PATCH-FIX-UPSTREAM qimage_conversions.cpp: Fix build on big endian systems
Patch2001: qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch
# PATCH-FIX-UPSTREAM Fix-use-after-free-bug.patch
Patch2002: Fix-use-after-free-bug.patch
# PATCH-FIX-UPSTREAM fix-drag-and-drop-regression.patch
Patch2003: fix-drag-and-drop-regression.patch
# PATCH-FIX-UPSTREAM Fix-detection-of-GCC5.patch
Patch2004: Fix-detection-of-GCC5.patch
# PATCH-FIX-UPSTREAM Fix-typo-in-Qt5CoreMacroscmake.patch
Patch2005: Fix-typo-in-Qt5CoreMacroscmake.patch
# PATCH-FIX-UPSTREAM Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch
Patch2006: Fix-physical-DPI-and-size-for-rotated-screens-on-X11.patch
# PATCH-FIX-UPSTREAM X11-devicePixelRatio-screen-mapping-fix.patch
Patch2007: X11-devicePixelRatio-screen-mapping-fix.patch
# PATCH-FIX-UPSTREAM Multi-screen-DPI-support-for-X11.patch
Patch2008: Multi-screen-DPI-support-for-X11.patch
# PATCH-FIX-UPSTREAM xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch
Patch2009: xcb-Dont-return-0-from-QXcbKeyboard-possibleKeys.patch
# PATCH-FIX-UPSTREAM QSystemTrayIcon-handle-submenus-correctly.patch
Patch2010: QSystemTrayIcon-handle-submenus-correctly.patch
Patch2000: QSystemTrayIcon-handle-submenus-correctly.patch
# PATCH-FIX-UPSTREAM Fix-Meta-shortcuts-on-XCB.patch
Patch2011: Fix-Meta-shortcuts-on-XCB.patch
Patch2001: Fix-Meta-shortcuts-on-XCB.patch
# PATCH-FIX-UPSTREAM Update-mouse-buttons-from-MotionNotify-events.patch
Patch2012: Update-mouse-buttons-from-MotionNotify-events.patch
Patch2002: Update-mouse-buttons-from-MotionNotify-events.patch
# PATCH-FIX-UPSTREAM Make-sure-theres-a-scene-before-using-it.patch
Patch2013: Make-sure-theres-a-scene-before-using-it.patch
Patch2003: Make-sure-theres-a-scene-before-using-it.patch
# PATCH-FIX-UPSTREAM Handle-SelectionWindowDestroy-in-QXcbClipboard.patch
Patch2004: Handle-SelectionWindowDestroy-in-QXcbClipboard.patch
# PATCH-FIX-UPSTREAM Call-ofono-nm-Registered-delayed-in-constructor-othe.patch
Patch2005: Call-ofono-nm-Registered-delayed-in-constructor-othe.patch
# PATCH-FIX-UPSTREAM fix-a-division-by-zero-when-processing-malformed-BMP-files.patch
Patch2006: fix-a-division-by-zero-when-processing-malformed-BMP-files.patch
BuildRequires: alsa-devel
BuildRequires: cups-devel
BuildRequires: gcc-c++
@ -168,12 +150,10 @@ handling.
%prep
%setup -q -n qtbase-opensource-src-%{real_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p0
%patch2000 -p1
%patch2001 -p1
@ -182,13 +162,6 @@ handling.
%patch2004 -p1
%patch2005 -p1
%patch2006 -p1
%patch2007 -p1
%patch2008 -p1
%patch2009 -p1
%patch2010 -p1
%patch2011 -p1
%patch2012 -p1
%patch2013 -p1
# be sure not to use them
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
@ -259,6 +232,7 @@ Qt 5 Core Library - Non-ABI stable development files.
%package -n libQt5Concurrent5
Summary: Qt 5 Concurrent Library
Group: Development/Libraries/X11
Requires: libQt5Core5 = %{version}
%description -n libQt5Concurrent5
The Qt 5 Concurrent library.
@ -275,6 +249,7 @@ The Qt 5 Concurrent library - development files.
%package -n libQt5DBus5
Summary: Qt 5 DBus Library
Group: Development/Libraries/X11
Requires: libQt5Core5 = %{version}
%description -n libQt5DBus5
The Qt 5 DBus library.
@ -302,6 +277,8 @@ Qt 5 DBus Library - Non-ABI stable development files.
%package -n libQt5Network5
Summary: Qt 5 Network Library
Group: Development/Libraries/X11
Requires: libQt5Core5 = %{version}
Requires: libQt5DBus5 = %{version}
%description -n libQt5Network5
The Qt 5 Network library.
@ -328,6 +305,7 @@ Qt 5 Network Library - Non-ABI stable development files.
%package -n libQt5OpenGL5
Summary: Qt 5 OpenGL Library
Group: Development/Libraries/X11
Requires: libQt5Widgets5 = %{version}
%description -n libQt5OpenGL5
The Qt 5 OpenGL library.
@ -364,6 +342,7 @@ Qt 5 OpenGL Library - Non-ABI stable development files.
%package -n libQt5PrintSupport5
Summary: Qt 5 Print Support Library
Group: Development/Libraries/X11
Requires: libQt5Widgets5 = %{version}
%description -n libQt5PrintSupport5
The Qt 5 Print Support library.
@ -394,6 +373,7 @@ Qt 5 Print Support Library - Non-ABI stable development files.
%package -n libQt5Xml5
Summary: Qt 5 Xml Library
Group: Development/Libraries/X11
Requires: libQt5Core5 = %{version}
%description -n libQt5Xml5
The Qt 5 Xml library.
@ -410,6 +390,7 @@ The Qt 5 Xml library - development files.
%package -n libQt5Test5
Summary: Qt 5 Test Library
Group: Development/Libraries/X11
Requires: libQt5Core5 = %{version}
%description -n libQt5Test5
The Qt 5 library for testing.
@ -436,6 +417,7 @@ Qt 5 Test Library - Non-ABI stable development files.
%package -n libQt5Widgets5
Summary: Qt 5 Widgets Library
Group: Development/Libraries/X11
Requires: libQt5Gui5 = %{version}
%description -n libQt5Widgets5
The Qt 5 library to display widgets.
@ -511,6 +493,8 @@ A plugin to support MySQL server in Qt applications.
Summary: Qt 5 GUI related libraries
Group: Development/Libraries/C and C++
Recommends: libqt5-qtimageformats = %{version}
Requires: libQt5Core5 = %{version}
Requires: libQt5DBus5 = %{version}
%description -n libQt5Gui5
Qt 5 libraries which are depending on X11.
@ -519,6 +503,7 @@ Qt 5 libraries which are depending on X11.
Summary: Qt 5 gtk2 plugin
Group: Development/Libraries/C and C++
Supplements: packageand(libQt5Gui5:libgtk-2_0-0)
Requires: libQt5Gui5 = %{version}
%description platformtheme-gtk2
Qt 5 plugin for better integration with gtk2-based desktop enviroments.
@ -556,6 +541,7 @@ Summary: Qt 5 SQL related libraries
Group: Development/Libraries/C and C++
Recommends: libqt5_sql_backend = %{version}
Suggests: libqt5-sql-sqlite
Requires: libQt5Core5 = %{version}
%description -n libQt5Sql5
Qt 5 libraries which are used for connection with an SQL server. You

View File

@ -1,37 +0,0 @@
From 404f4281fda764cafdaa5635db995dabc4f1de8c Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
Date: Tue, 9 Dec 2014 09:27:53 +0300
Subject: [PATCH] qimage_conversions.cpp: Fix build on big endian systems
Change-Id: I8149eb2deaa101daf85a957ff48c3a7140c43bbc
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
---
src/gui/image/qimage_conversions.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
index 17563b1..858a0d9 100644
--- a/src/gui/image/qimage_conversions.cpp
+++ b/src/gui/image/qimage_conversions.cpp
@@ -2252,7 +2252,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_ARGB_to_ARGB_PM,
#else
0,
- 0
+ 0,
#endif
0, 0, 0, 0
}, // Format_RGBA8888
@@ -2281,7 +2281,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
#else
0,
0,
- 0
+ 0,
#endif
0, 0, 0, 0
}, // Format_RGBA8888_Premultiplied
--
2.2.0

View File

@ -1,13 +0,0 @@
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index e4d33e2..920ebe9 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -128,7 +128,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< varGlue("DEFINES","-D"," -D","") << endl;
t << "CFLAGS = " << var("QMAKE_CFLAGS") << " $(DEFINES)\n";
t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " $(DEFINES)\n";
- t << "INCPATH = -I" << specdir();
+ t << "INCPATH = -I/usr/include -I" << specdir();
if(!project->isActiveConfig("no_include_pwd")) {
QString pwd = escapeFilePath(fileFixify(qmake_getpwd()));
if(pwd.isEmpty())

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:daea240ba5e77bc2d78ec21a2cb664eed83b3d4ad409b6277a6f7d4c0c8e91d1
size 46109688

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8574a593830959c0f7e5430fe77a43832ea7f5299e14a397a74576b3df7fb1b7
size 46132220

View File

@ -1,29 +0,0 @@
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Fri, 12 Dec 2014 11:37:36 +0000
Subject: xcb: Don't return 0 from QXcbKeyboard::possibleKeys
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8a075c405709eab9c08ed4230d795ca45eabd5a7
---
xcb: Don't return 0 from QXcbKeyboard::possibleKeys
It's possible to get 0 for baseQtKey in case Caps Lock is used as
a layout switcher. So don't include this value in the result.
Similar fix was in commit d904533acba1267431ca2c5f0d3e85cc59a20a26.
Task-number: QTCREATORBUG-9589
Change-Id: I46fc91f9faf6fd0699f062a72fd2ca3187232f5a
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
---
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -957,7 +957,8 @@
QList<int> result;
int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode));
- result += (baseQtKey + modifiers); // The base key is _always_ valid, of course
+ if (baseQtKey)
+ result += (baseQtKey + modifiers);
xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt");