Merge commit '923ba9b0e07343ec887105c33d8314fcbf1bf232' into f27

This commit is contained in:
Rex Dieter 2018-01-19 13:19:17 -06:00
commit ad01462fdc
5 changed files with 62 additions and 52 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/qtbase-opensource-src-5.9.2.tar.xz
/qtbase-opensource-src-5.9.3.tar.xz

View File

@ -1,45 +0,0 @@
From acdb3340321d1b8823b54f2ea492f975c6f942d8 Mon Sep 17 00:00:00 2001
From: Andy Shaw <andy.shaw@qt.io>
Date: Fri, 27 Oct 2017 08:36:25 +0200
Subject: [PATCH 106/127] Fix dragging inside a modal window when a
QShapedPixmapWindow is used
A regression was introduced with a3d59c7c7f675b0a4e128efeb781aa1c2f7db4c0
which caused dragging to fail within a modal dialog on the XCB platform.
By adding an exception for the QShapedPixmapWindow, which is the window
used for the drag, we can allow that to continue to work whilst blocking
to the other newly created windows.
Task-number: QTBUG-63846
Change-Id: I7c7f365f30fcf5f04f50dc1a7fff7a09e6e5ed6c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
---
src/gui/kernel/qwindow.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 43b201e9b0..9e5b687851 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -54,6 +54,7 @@
# include "qaccessible.h"
#endif
#include "qhighdpiscaling_p.h"
+#include "qshapedpixmapdndwindow_p.h"
#include <private/qevent_p.h>
@@ -576,7 +577,9 @@ void QWindow::setVisible(bool visible)
QGuiApplicationPrivate::showModalWindow(this);
else
QGuiApplicationPrivate::hideModalWindow(this);
- } else if (visible && QGuiApplication::modalWindow()) {
+ // QShapedPixmapWindow is used on some platforms for showing a drag pixmap, so don't block
+ // input to this window as it is performing a drag - QTBUG-63846
+ } else if (visible && QGuiApplication::modalWindow() && !qobject_cast<QShapedPixmapWindow *>(this)) {
QGuiApplicationPrivate::updateBlockedStatus(this);
}
--
2.14.3

View File

@ -54,8 +54,8 @@ BuildRequires: pkgconfig(libsystemd)
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.9.2
Release: 5%{?dist}
Version: 5.9.3
Release: 2%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -116,8 +116,7 @@ Patch66: qtbase-mariadb.patch
Patch67: https://bugreports.qt.io/secure/attachment/66353/xcberror_filter.patch
## upstream patches (5.9 branch)
Patch106: 0106-Fix-dragging-inside-a-modal-window-when-a-QShapedPix.patch
Patch100: qtbase-opensource-src-5.9.3-QTBUG-64742-out-of-bounds-in-qdnslookup_unix.patch
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
# Those themes are there for platform integration. If the required libraries are
@ -349,8 +348,6 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%setup -q -n %{qt_module}-opensource-src-%{version}
## upstream fixes
%patch106 -p1
%patch4 -p1 -b .QTBUG-35459
%patch50 -p1 -b .QT_VERSION_CHECK
@ -366,6 +363,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%endif
%patch66 -p1 -b .mariadb
%patch67 -p1 -b .xcberror_filter
%patch100 -p1 -b .QTBUG-64742-out-of-bounds-in-qdnslookup_unix
%if 0%{?inject_optflags}
## adjust $RPM_OPT_FLAGS
@ -983,6 +981,12 @@ fi
%changelog
* Thu Nov 30 2017 Than Ngo <than@redhat.com> - 5.9.3-2
- bz#1518958, backport to fix out of bounds reads in qdnslookup_unix
* Wed Nov 22 2017 Jan Grulich <jgrulich@redhat.com> - 5.9.3-1
- 5.9.3
* Thu Nov 09 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.9.2-5
- categoried logging for xcb entries (#1497564, QTBUG-55167)

View File

@ -0,0 +1,50 @@
diff -up qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp.orig qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp
--- qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp.orig 2017-11-16 06:15:28.000000000 +0100
+++ qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp 2017-11-30 09:22:47.525741040 +0100
@@ -42,6 +42,7 @@
#if QT_CONFIG(library)
#include <qlibrary.h>
#endif
+#include <qvarlengtharray.h>
#include <qscopedpointer.h>
#include <qurl.h>
#include <private/qnativesocketengine_p.h>
@@ -58,6 +59,8 @@
# include <gnu/lib-names.h>
#endif
+#include <cstring>
+
QT_BEGIN_NAMESPACE
#if QT_CONFIG(library)
@@ -189,11 +192,25 @@ void QDnsLookupRunnable::query(const int
QScopedPointer<struct __res_state, QDnsLookupStateDeleter> state_ptr(&state);
// Perform DNS query.
- unsigned char response[PACKETSZ];
- memset(response, 0, sizeof(response));
- const int responseLength = local_res_nquery(&state, requestName, C_IN, requestType, response, sizeof(response));
+ QVarLengthArray<unsigned char, PACKETSZ> buffer(PACKETSZ);
+ memset(buffer.data(), 0, buffer.size());
+ int responseLength = local_res_nquery(&state, requestName, C_IN, requestType, buffer.data(), buffer.size());
+ if (Q_UNLIKELY(responseLength > PACKETSZ)) {
+ buffer.resize(responseLength);
+ memset(buffer.data(), 0, buffer.size());
+ responseLength = local_res_nquery(&state, requestName, C_IN, requestType, buffer.data(), buffer.size());
+ if (Q_UNLIKELY(responseLength > buffer.size())) {
+ // Ok, we give up.
+ reply->error = QDnsLookup::ResolverError;
+ reply->errorString.clear(); // We cannot be more specific, alas.
+ return;
+ }
+ }
- // Check the response header.
+ unsigned char *response = buffer.data();
+ // Check the response header. Though res_nquery returns -1 as a
+ // responseLength in case of error, we still can extract the
+ // exact error code from the response.
HEADER *header = (HEADER*)response;
const int answerCount = ntohs(header->ancount);
switch (header->rcode) {

View File

@ -1 +1 @@
SHA512 (qtbase-opensource-src-5.9.2.tar.xz) = a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7
SHA512 (qtbase-opensource-src-5.9.3.tar.xz) = 256ffb8760e94c0f87790ed35e210d0c9613e14314ff442dd763cc93fbd5caa6c11c95f5d44b12a7687fb93c9f857878132cf6d76e5933f647ca7beb54b18c7c