summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/serialization/qjsondocument.cpp7
-rw-r--r--src/corelib/serialization/qjsondocument.h10
-rw-r--r--src/gui/image/qpixmap.h3
-rw-r--r--src/gui/kernel/qguiapplication.cpp6
-rw-r--r--src/gui/rhi/qshaderdescription.cpp10
-rw-r--r--src/network/configure.json6
-rw-r--r--src/network/ssl/ssl.pri8
-rw-r--r--src/plugins/platforms/wasm/qwasmeventtranslator.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp5
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h2
-rw-r--r--src/testlib/doc/qttestlib.qdocconf2
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc4
-rw-r--r--src/widgets/kernel/qapplication.cpp2
-rw-r--r--src/widgets/util/qsystemtrayicon_qpa.cpp11
14 files changed, 58 insertions, 22 deletions
diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp
index b9b1902f34..fe0500bdef 100644
--- a/src/corelib/serialization/qjsondocument.cpp
+++ b/src/corelib/serialization/qjsondocument.cpp
@@ -237,7 +237,7 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other)
the application.
*/
-#if QT_CONFIG(binaryjson)
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
/*!
Creates a QJsonDocument that uses the first \a size bytes from
\a data. It assumes \a data contains a binary encoded JSON document.
@@ -385,10 +385,13 @@ QJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidati
QByteArray QJsonDocument::toBinaryData() const
{
int size = 0;
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
const char *raw = rawData(&size);
+QT_WARNING_POP
return QByteArray(raw, size);
}
-#endif // QT_CONFIG(binaryjson)
+#endif // QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
/*!
Creates a QJsonDocument from the QVariant \a variant.
diff --git a/src/corelib/serialization/qjsondocument.h b/src/corelib/serialization/qjsondocument.h
index 325e47b531..758bbfd9dd 100644
--- a/src/corelib/serialization/qjsondocument.h
+++ b/src/corelib/serialization/qjsondocument.h
@@ -111,13 +111,19 @@ public:
BypassValidation
};
-#if QT_CONFIG(binaryjson)
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("Use CBOR format instead")
static QJsonDocument fromRawData(const char *data, int size, DataValidation validation = Validate);
+
+ QT_DEPRECATED_X("Use CBOR format instead")
const char *rawData(int *size) const;
+ QT_DEPRECATED_X("Use CBOR format instead")
static QJsonDocument fromBinaryData(const QByteArray &data, DataValidation validation = Validate);
+
+ QT_DEPRECATED_X("Use CBOR format instead")
QByteArray toBinaryData() const;
-#endif // QT_CONFIG(binaryjson)
+#endif // QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
static QJsonDocument fromVariant(const QVariant &variant);
QVariant toVariant() const;
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 8c1395857e..8a06ebe603 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -227,7 +227,10 @@ inline bool QPixmap::loadFromData(const QByteArray &buf, const char *format,
#if QT_DEPRECATED_SINCE(5, 0)
inline QPixmap QPixmap::alphaChannel() const
{
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_DEPRECATED
return QPixmap::fromImage(toImage().alphaChannel());
+ QT_WARNING_POP
}
inline void QPixmap::setAlphaChannel(const QPixmap &p)
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 2291241ef6..03ea937ab3 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)
diff --git a/src/gui/rhi/qshaderdescription.cpp b/src/gui/rhi/qshaderdescription.cpp
index d0f73f6aa7..7e9b7d7b8e 100644
--- a/src/gui/rhi/qshaderdescription.cpp
+++ b/src/gui/rhi/qshaderdescription.cpp
@@ -342,8 +342,11 @@ bool QShaderDescription::isValid() const
*/
QByteArray QShaderDescription::toBinaryJson() const
{
-#if QT_CONFIG(binaryjson)
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
return d->makeDoc().toBinaryData();
+QT_WARNING_POP
#else
qWarning("Cannot generate binary JSON from QShaderDescription due to disabled binaryjson feature");
return QByteArray();
@@ -382,8 +385,11 @@ QByteArray QShaderDescription::toJson() const
QShaderDescription QShaderDescription::fromBinaryJson(const QByteArray &data)
{
QShaderDescription desc;
-#if QT_CONFIG(binaryjson)
+#if QT_CONFIG(binaryjson) && QT_DEPRECATED_SINCE(5, 15)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QShaderDescriptionPrivate::get(&desc)->loadDoc(QJsonDocument::fromBinaryData(data));
+QT_WARNING_POP
#else
Q_UNUSED(data);
qWarning("Cannot load QShaderDescription from binary JSON due to disabled binaryjson feature");
diff --git a/src/network/configure.json b/src/network/configure.json
index 6bc71469dc..496401749f 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -94,6 +94,10 @@
"condition": "config.msvc"
},
{
+ "libs": "-lssl_arm64-v8a -lcrypto_arm64-v8a",
+ "condition": "config.android"
+ },
+ {
"libs": "-lssl -lcrypto",
"condition": "!config.msvc"
}
@@ -432,7 +436,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 0c8b9ccd40..dfbf539303 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -115,9 +115,11 @@ qtConfig(ssl) {
# - libs in <OPENSSL_DIR>\lib\VC\static
# - configure: -openssl -openssl-linked -I <OPENSSL_DIR>\include -L <OPENSSL_DIR>\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
diff --git a/src/plugins/platforms/wasm/qwasmeventtranslator.cpp b/src/plugins/platforms/wasm/qwasmeventtranslator.cpp
index ad94ba9c77..a4ec78f27b 100644
--- a/src/plugins/platforms/wasm/qwasmeventtranslator.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventtranslator.cpp
@@ -544,7 +544,7 @@ void resizeWindow(QWindow *window, QWasmWindow::ResizeMode mode,
void QWasmEventTranslator::processMouse(int eventType, const EmscriptenMouseEvent *mouseEvent)
{
- auto timestamp = mouseEvent->timestamp;
+ auto timestamp = emscripten_date_now();
QPoint targetPoint(mouseEvent->targetX, mouseEvent->targetY);
QPoint globalPoint = screen()->geometry().topLeft() + targetPoint;
@@ -670,7 +670,7 @@ int QWasmEventTranslator::wheel_cb(int eventType, const EmscriptenWheelEvent *wh
QWasmEventTranslator *translator = (QWasmEventTranslator*)userData;
Qt::KeyboardModifiers modifiers = translator->translateMouseEventModifier(&mouseEvent);
- auto timestamp = mouseEvent.timestamp;
+ auto timestamp = emscripten_date_now();
QPoint targetPoint(mouseEvent.targetX, mouseEvent.targetY);
QPoint globalPoint = eventTranslator->screen()->geometry().topLeft() + targetPoint;
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 23ed80ab5a..adca902c69 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1394,6 +1394,8 @@ void QXcbWindow::propagateSizeHints()
}
xcb_icccm_set_wm_normal_hints(xcb_connection(), m_window, &hints);
+
+ m_sizeHintsScaleFactor = QHighDpiScaling::scaleAndOrigin(screen()).factor;
}
void QXcbWindow::requestActivateWindow()
@@ -1785,6 +1787,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 13b37db028..976a442b11 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -278,6 +278,8 @@ protected:
QXcbSyncWindowRequest *m_pendingSyncRequest = nullptr;
int m_swapInterval = -1;
+
+ qreal m_sizeHintsScaleFactor = 1.0;
};
class QXcbForeignWindow : public QXcbWindow
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
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 85542a75f8..9568e35639 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;
}
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 <QtGui/qpa/qplatformsystemtrayicon.h>
#include <qpa/qplatformtheme.h>
#include <private/qguiapplication_p.h>
+#include <private/qhighdpiscaling_p.h>
#include <QApplication>
#include <QStyle>
@@ -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()