From e52239f525d59f965dbbc5dbe2c28314498690b0 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 6 Jan 2020 16:06:35 +0200 Subject: Use prefixed ssl libs when "-openssl-linked" configure params is used As long as we do a multi abi build in one go there is no easy way for us to know where the ssl libs are located for each ABI. The easiest way is to use libs prefixed with the ABI. For configure set we are using "_arm64-v8a" prefix as the configure script will always use arm64-v8a to run the tests. Don't show the OPENSSL_LIBS example as it won't work on Android. Here https://github.com/KDAB/android_openssl/commit/ebb0b68be4 you can find a script which builds these libs. Fixes: QTBUG-80862 Change-Id: I019c2a208ae48a7356b8f3933d0f4aad5ac156a3 Reviewed-by: Andy Shaw --- src/network/configure.json | 6 +++++- src/network/ssl/ssl.pri | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/network/configure.json b/src/network/configure.json index f501465c91..ddf8f4c709 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -93,6 +93,10 @@ "libs": "-llibssl -llibcrypto -lUser32 -lWs2_32 -lAdvapi32 -lCrypt32", "condition": "config.msvc" }, + { + "libs": "-lssl_arm64-v8a -lcrypto_arm64-v8a", + "condition": "config.android" + }, { "libs": "-lssl -lcrypto", "condition": "!config.msvc" @@ -445,7 +449,7 @@ "report": [ { "type": "note", - "condition": "features.openssl-linked && libs.openssl.source != 0 + "condition": "!config.android && features.openssl-linked && libs.openssl.source != 0 && input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''", "message": "When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 8bb70a2aed..a9b7197aca 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -125,9 +125,11 @@ qtConfig(ssl) { # - libs in \lib\VC\static # - configure: -openssl -openssl-linked -I \include -L \lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD" - qtConfig(openssl-linked): \ - QMAKE_USE_FOR_PRIVATE += openssl - else: \ + qtConfig(openssl-linked): { + android { + build_pass: LIBS_PRIVATE += -lssl_$${QT_ARCH} -lcrypto_$${QT_ARCH} + } else: QMAKE_USE_FOR_PRIVATE += openssl + } else: \ QMAKE_USE_FOR_PRIVATE += openssl/nolink win32 { LIBS_PRIVATE += -lcrypt32 -- cgit v1.2.3 From 78d2a04a01dbb989c017843f9d6d1f0c485c0e86 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 2 Dec 2019 14:05:58 +0100 Subject: QSystemTrayIcon: Fix geometry() to work with scaling enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add missing call to QHighDpi::fromNativePixels(), retrieving the screen from the menu. Task-number: QTBUG-79248 Change-Id: I9f358c8010615c3f96ed9dc3b6666013ae9a0ed9 Reviewed-by: Morten Johan Sørvig --- src/widgets/util/qsystemtrayicon_qpa.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp index c0bf058681..f2b0819132 100644 --- a/src/widgets/util/qsystemtrayicon_qpa.cpp +++ b/src/widgets/util/qsystemtrayicon_qpa.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -75,10 +76,14 @@ void QSystemTrayIconPrivate::remove_sys() QRect QSystemTrayIconPrivate::geometry_sys() const { - if (qpa_sys) - return qpa_sys->geometry(); - else + if (!qpa_sys) return QRect(); + auto screen = QGuiApplication::primaryScreen(); +#if QT_CONFIG(menu) + if (menu) + screen = menu->screen(); +#endif + return QHighDpi::fromNativePixels(qpa_sys->geometry(), screen); } void QSystemTrayIconPrivate::updateIcon_sys() -- cgit v1.2.3 From 24217594581e93b7ec3849fb56e49279c5cd3be2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 2 Jan 2020 11:33:53 +0100 Subject: Restore High DPI scale factors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the default rounding policy to "Round" so that 2 is used for 150% (144DPI) on Windows, as it was in 5.13. Fixes: QTBUG-80934 Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qguiapplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index d49f349e7a..888ccd8453 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -153,7 +153,7 @@ Qt::HighDpiScaleFactorRoundingPolicy QGuiApplicationPrivate::highDpiScaleFactorR // that behavior by disabling rounding by default. Qt::HighDpiScaleFactorRoundingPolicy::PassThrough; #else - Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor; + Qt::HighDpiScaleFactorRoundingPolicy::Round; #endif bool QGuiApplicationPrivate::highDpiScalingUpdated = false; @@ -3554,8 +3554,8 @@ Qt::ApplicationState QGuiApplication::applicationState() environment variable. The QGuiApplication::highDpiScaleFactorRoundingPolicy() accessor will reflect the environment, if set. - The default value is Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor. - On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThough, + The default value is Qt::HighDpiScaleFactorRoundingPolicy::Round. + On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThrough, which preserves historical behavior from earlier Qt versions. */ void QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy) -- cgit v1.2.3 From 5af73cd9db52da287070cede300295b90f7ced67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 7 Jan 2020 13:45:49 +0100 Subject: Skip WA_DontShowOnScreen widgets when checking whether application can quit QApplication tries to close all windows on quit using closeAllWindows, but closeAllWindows skips some windows, in particular any widget with WA_DontShowOnScreen set. QApplication then tries to verify that all windows have been closed, and that logic should skip the same kind of windows as closeAllWindows does. We include WA_DontShowOnScreen so that widgets that are proxied via QGraphicProxyWidget will not prevent the application from quitting. There's still some divergence between closeAllWindows and the logic in QApplication::event's quit handling, but aligning that requires more work than this particular fix, and should probably also be based on using the return value of tryCloseAllWindows() directly. Change-Id: I2555eeee0cb04b8e736109fed57f37150efd1964 Fixes: QTBUG-81107 Reviewed-by: Friedemann Kleint Reviewed-by: Paul Olav Tvete --- src/widgets/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index bf3cf090ba..f334cc58f9 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1868,7 +1868,7 @@ bool QApplication::event(QEvent *e) closeAllWindows(); for (auto *w : topLevelWidgets()) { if (w->isVisible() && !(w->windowType() == Qt::Desktop) && !(w->windowType() == Qt::Popup) && - (!(w->windowType() == Qt::Dialog) || !w->parentWidget())) { + (!(w->windowType() == Qt::Dialog) || !w->parentWidget()) && !w->testAttribute(Qt::WA_DontShowOnScreen)) { e->ignore(); return true; } -- cgit v1.2.3 From f3b3c971cf4d41d8e10c1374e23917e38c537c54 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 3 Jan 2020 16:19:32 +0100 Subject: Doc: Correct link errors Task-number: QTBUG-79824 Change-Id: I05caaccab1efa16bc0a01ce3045a9377f9ef640e Reviewed-by: Paul Wicking --- src/testlib/doc/qttestlib.qdocconf | 2 +- src/testlib/doc/src/qttestlib-manual.qdoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf index 73310221cf..52e1480295 100644 --- a/src/testlib/doc/qttestlib.qdocconf +++ b/src/testlib/doc/qttestlib.qdocconf @@ -28,7 +28,7 @@ qhp.QtTestLib.subprojects.classes.sortPages = true tagfile = ../../../doc/qttestlib/qttestlib.tags -depends += qtcore qtdoc qtwidgets qtgui qmake qtqmltest +depends += qtcore qtdoc qtwidgets qtgui qmake qtqmltest qtcmake headerdirs += .. diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc index 688cc2f2f6..89edabf3f3 100644 --- a/src/testlib/doc/src/qttestlib-manual.qdoc +++ b/src/testlib/doc/src/qttestlib-manual.qdoc @@ -85,7 +85,7 @@ You can use a Qt Creator wizard to create a project that contains Qt tests and build and run them directly from Qt Creator. For more information, see - \l {Running Autotests}. + \l {Qt Creator: Running Autotests}{Running Autotests}. \section1 Creating a Test @@ -146,7 +146,7 @@ \section2 Building with CMake and CTest - You can use \l {CMake and CTest} to create a test. + You can use \l {Building with CMake and CTest} to create a test. \l{https://cmake.org/cmake/help/latest/manual/ctest.1.html}{CTest} enables you to include or exclude tests based on a regular expression that is matched against the test name. You can further apply the \c LABELS property -- cgit v1.2.3 From f2a61f2ce2fa81acb526965d55e5f22d47673b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Mon, 2 Dec 2019 18:17:35 +0100 Subject: xcb: Propagate size hints when window changes its scaling factor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Properly scale size hints to the new scaling factor. Fixes: QTBUG-80476 Change-Id: I1081c9b01560f7e434f0f1de0199ef3d3cae787c Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/xcb/qxcbwindow.cpp | 5 +++++ src/plugins/platforms/xcb/qxcbwindow.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 97da420798..cfe048d5c4 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1398,6 +1398,8 @@ void QXcbWindow::propagateSizeHints() } xcb_icccm_set_wm_normal_hints(xcb_connection(), m_window, &hints); + + m_sizeHintsScaleFactor = QHighDpiScaling::scaleAndOrigin(screen()).factor; } void QXcbWindow::requestActivateWindow() @@ -1789,6 +1791,9 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t * // will make the comparison later. QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen()); + if (!qFuzzyCompare(QHighDpiScaling::scaleAndOrigin(newScreen).factor, m_sizeHintsScaleFactor)) + propagateSizeHints(); + // Send the synthetic expose event on resize only when the window is shrinked, // because the "XCB_GRAVITY_NORTH_WEST" flag doesn't send it automatically. if (!m_oldWindowSize.isEmpty() diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 5de5974ca7..a808437c5a 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -280,6 +280,8 @@ protected: QXcbSyncWindowRequest *m_pendingSyncRequest = nullptr; int m_swapInterval = -1; + + qreal m_sizeHintsScaleFactor = 1.0; }; class QXcbForeignWindow : public QXcbWindow -- cgit v1.2.3