From fefe5cdf0c476db4bf3f49738b9abb9219357a34 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Tue, 8 May 2018 16:29:15 +0900 Subject: Fix build without features.cursor Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca Reviewed-by: Oswald Buddenhagen --- src/plugins/platforms/xcb/qxcbcursor.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index 8d151b760b..b401100dd4 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -301,8 +301,10 @@ QXcbCursorCacheKey::QXcbCursorCacheKey(const QCursor &c) QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false) { +#if QT_CONFIG(cursor) // see NUM_BITMAPS in libXcursor/src/xcursorint.h m_bitmapCache.setMaxCost(8); +#endif if (cursorCount++) return; -- cgit v1.2.3 From d55165b9c472a30958ef392cb52234041159279e Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 14 May 2018 12:08:58 +0200 Subject: Fix filter parsing in flatpak FileChooser portal Filters are usually in format (Name (*.foo *.bar)), but valid filter is also (Name ( *.bar *.foo )), containing additional spaces. When we split content in the brackets divided by spaces, there will be then empty strings which we need to filter out, otherwise the result we send over DBus is not valid. Change-Id: Iaa265189408f47324bc9b269d534bf4c8d7d2cae Reviewed-by: Thiago Macieira --- src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp index 186084abd4..c31b326357 100644 --- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp @@ -210,7 +210,7 @@ void QFlatpakFileDialog::openPortal() QRegularExpressionMatch match = regexp.match(filter); if (match.hasMatch()) { QString userVisibleName = match.captured(1); - QStringList filterStrings = match.captured(2).split(QLatin1String(" ")); + QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), QString::SkipEmptyParts); FilterConditionList filterConditions; for (const QString &filterString : filterStrings) { -- cgit v1.2.3 From 410b94351663a4ce12a2cad9c9a5d28fc6dfd5e4 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 14 May 2018 08:38:07 +0200 Subject: QMacStyle: remove unused qlibrary.h include Fixes build with -no-feature-library, because the qlibrary.h header contains QT_REQUIRE_CONFIG(library). Change-Id: If64ece8bd77e8824b86dc91f95dd9062cb2a1644 Reviewed-by: Gabriel de Dietrich --- src/plugins/styles/mac/qmacstyle_mac.mm | 1 - 1 file changed, 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 569eeef0ff..95809906c1 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -121,7 +121,6 @@ #include #endif #include -#include #if QT_CONFIG(datetimeedit) #include #endif -- cgit v1.2.3 From b1452011282bfd0213b9f35b446e4970cb60d112 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 26 Apr 2018 10:34:58 +0200 Subject: Windows QPA: Fix wrong initial size when launched on secondary screen Send changed events from QPlatformWindow::initialize() synchronously so a protentially changed screen takes effect in QWindow::resize() called by QWidget::show_sys(). Task-number: QTBUG-67777 Change-Id: I889500d458caf0e782bdbc237ce790f0b0bc2d95 Reviewed-by: Qt CI Bot Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index f1762146ec..f8d6ae222e 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1144,11 +1144,11 @@ void QWindowsWindow::initialize() const Qt::WindowState state = w->windowState(); if (state != Qt::WindowMaximized && state != Qt::WindowFullScreen && creationContext->requestedGeometryIn != creationContext->obtainedGeometry) { - QWindowSystemInterface::handleGeometryChange(w, creationContext->obtainedGeometry); + QWindowSystemInterface::handleGeometryChange(w, creationContext->obtainedGeometry); } QPlatformScreen *obtainedScreen = screenForGeometry(creationContext->obtainedGeometry); if (obtainedScreen && screen() != obtainedScreen) - QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen()); + QWindowSystemInterface::handleWindowScreenChanged(w, obtainedScreen->screen()); } } -- cgit v1.2.3 From 9c707f140e96937f2ea256a6a93dc827328f22ad Mon Sep 17 00:00:00 2001 From: Alexandra Cherdantseva Date: Wed, 13 Dec 2017 17:29:49 +0300 Subject: Windows Platform: Redirect wheel event to a window under mouse cursor Revert a part of af5c8d04fb0c9ddda58925e4862e857c78a5e563 which affected mouse wheel event redirection. Task-number: QTBUG-63979 Change-Id: Ice88675aadbb8a7477b3758a607db5979d62562c Reviewed-by: Friedemann Kleint Reviewed-by: Alexandra Cherdantseva Reviewed-by: Andy Shaw --- .../platforms/windows/qwindowsmousehandler.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp index 814291c54a..17851618b4 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp +++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp @@ -395,10 +395,24 @@ static bool isValidWheelReceiver(QWindow *candidate) static void redirectWheelEvent(QWindow *window, const QPoint &globalPos, int delta, Qt::Orientation orientation, Qt::KeyboardModifiers mods) { + // Redirect wheel event to one of the following, in order of preference: + // 1) The window under mouse + // 2) The window receiving the event // If a window is blocked by modality, it can't get the event. - if (isValidWheelReceiver(window)) { - QWindowSystemInterface::handleWheelEvent(window, - QWindowsGeometryHint::mapFromGlobal(window, globalPos), + + QWindow *receiver = QWindowsScreen::windowAt(globalPos, CWP_SKIPINVISIBLE); + while (receiver && receiver->flags().testFlag(Qt::WindowTransparentForInput)) + receiver = receiver->parent(); + bool handleEvent = true; + if (!isValidWheelReceiver(receiver)) { + receiver = window; + if (!isValidWheelReceiver(receiver)) + handleEvent = false; + } + + if (handleEvent) { + QWindowSystemInterface::handleWheelEvent(receiver, + QWindowsGeometryHint::mapFromGlobal(receiver, globalPos), globalPos, delta, orientation, mods); } } -- cgit v1.2.3 From b0f3cc1594308ed3f3977bdcd451e8cf0eb0478d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 15 May 2018 22:15:04 +0200 Subject: sqlite: Allow for duplicated placeholders with just one placeholder This accounts for a case of a placeholder being duplicated in the prepare query, but where only one placeholder was used. This amends e4e87a2ece1e0c9901514fea094f31863b64b570 Task-number: QTBUG-68299 Change-Id: Ia92ee912facd51a13e7222886debb219b24442b0 Reviewed-by: Simon Hausmann --- src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp index a862e8d2a7..2a770d0245 100644 --- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp +++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp @@ -496,10 +496,10 @@ bool QSQLiteResult::exec() #if (SQLITE_VERSION_NUMBER >= 3003011) // In the case of the reuse of a named placeholder - // We need to check explicitly that paramCount is greater than 1, as sqlite + // We need to check explicitly that paramCount is greater than or equal to 1, as sqlite // can end up in a case where for virtual tables it returns 0 even though it // has parameters - if (paramCount > 1 && paramCount < values.count()) { + if (paramCount >= 1 && paramCount < values.count()) { const auto countIndexes = [](int counter, const QVector &indexList) { return counter + indexList.length(); }; -- cgit v1.2.3 From 8d19afcc815c62c691293462d4ed0ff25e445cdf Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 18 May 2018 13:52:29 +0200 Subject: ibase: Don't use deprecated QSqlError constructor Task-number: QTBUG-68330 Change-Id: Ie6ece8574462699fca401139ea00f1925b0a440b Reviewed-by: Simon Hausmann --- src/plugins/sqldrivers/ibase/qsql_ibase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp index d89051191c..6fbdef2695 100644 --- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp +++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp @@ -323,7 +323,8 @@ public: return false; q->setLastError(QSqlError(QCoreApplication::translate("QIBaseDriver", msg), - imsg, typ, int(sqlcode))); + imsg, typ, + sqlcode != -1 ? QString::number(sqlcode) : QString())); return true; } -- cgit v1.2.3