From 312ff6f83be2ba5b577acfe9872f5e20b3430b6a Mon Sep 17 00:00:00 2001 From: Kavindra Palaraja Date: Tue, 29 Oct 2019 17:21:05 +0100 Subject: [PATCH 1/6] Docs: Fix a typo in the documentation Change-Id: Ice4d0842883e32f62abd27be826b1caf1c78d3b6 Fixes: QTBUG-55503 Reviewed-by: Frederik Schwarzer Reviewed-by: Andy Shaw --- examples/sql/doc/src/cachedtable.qdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/sql/doc/src/cachedtable.qdoc b/examples/sql/doc/src/cachedtable.qdoc index 2db80f9c8e..0dd7928e21 100644 --- a/examples/sql/doc/src/cachedtable.qdoc +++ b/examples/sql/doc/src/cachedtable.qdoc @@ -43,15 +43,15 @@ \section1 TableEditor Class Definition - The \c TableEditor class inherits QDialog making the table editor + The \c TableEditor class inherits QWidget making the table editor widget a top-level dialog window. \snippet cachedtable/tableeditor.h 0 The \c TableEditor constructor takes two arguments: The first is a - pointer to the parent widget and is passed on to the base class - constructor. The other is a reference to the database table the \c - TableEditor object will operate on. + reference to the database table the \c TableEditor object will operate + on. The other is a pointer to the parent widget and is passed on to the + base class constructor. Note the QSqlTableModel variable declaration: As we will see in this example, the QSqlTableModel class can be used to provide data From efaa4aa2a1452cf73bc3117c49d1345a4106fd57 Mon Sep 17 00:00:00 2001 From: Adam Sowa Date: Thu, 31 Oct 2019 08:52:26 +0100 Subject: [PATCH 2/6] QFile::decodeName(const char *): don't construct QByteArray but use the argument directly Use QString::fromLocal8Bit(const QByteArray &str) instead of constructing QByteArray to avoid memory allocation and strcpy. Change-Id: I32bbb47fbc45681c621adaebe8f8574d8f8ad6bf Fixes: QTBUG-79644 Reviewed-by: Thiago Macieira --- src/corelib/io/qfile.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h index cf1465ec70..2099b2852f 100644 --- a/src/corelib/io/qfile.h +++ b/src/corelib/io/qfile.h @@ -84,6 +84,10 @@ public: // note: duplicated in qglobal.cpp (qEnvironmentVariable) return QString::fromUtf8(localFileName).normalized(QString::NormalizationForm_C); } + static inline QString decodeName(const char *localFileName) + { + return QString::fromUtf8(localFileName).normalized(QString::NormalizationForm_C); + } #else static inline QByteArray encodeName(const QString &fileName) { @@ -93,9 +97,11 @@ public: { return QString::fromLocal8Bit(localFileName); } + static inline QString decodeName(const char *localFileName) + { + return QString::fromLocal8Bit(localFileName); + } #endif - inline static QString decodeName(const char *localFileName) - { return decodeName(QByteArray(localFileName)); } #if QT_DEPRECATED_SINCE(5,0) typedef QByteArray (*EncoderFn)(const QString &fileName); From 5436a6f3e0a9e7ef7ed51fc5b304e1f81eaed960 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 1 Nov 2019 10:58:24 +0100 Subject: [PATCH 3/6] QNetworkReply: Fix SSL configuration handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QT_CONFIG consistently and enclose sslConfigurationImplementation(), setSslConfigurationImplementation() and ignoreSslErrorsImplementation() within QT_CONFIG as well. This enables a build of Qt for Python with -no-feature-ssl. Change-Id: Ia699293ab73a5dc86d8dcf95aa5f6369334d36a2 Reviewed-by: MÃ¥rten Nordheim --- src/network/access/qnetworkreply.cpp | 5 +++-- src/network/access/qnetworkreply.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index aca9cb1c08..fb30bfd4f1 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -687,7 +687,7 @@ QVariant QNetworkReply::attribute(QNetworkRequest::Attribute code) const return d_func()->attributes.value(code); } -#ifndef QT_NO_SSL +#if QT_CONFIG(ssl) /*! Returns the SSL configuration and state associated with this reply, if SSL was used. It will contain the remote server's @@ -742,7 +742,6 @@ void QNetworkReply::ignoreSslErrors(const QList &errors) { ignoreSslErrorsImplementation(errors); } -#endif /*! \fn void QNetworkReply::sslConfigurationImplementation(QSslConfiguration &configuration) const @@ -786,6 +785,8 @@ void QNetworkReply::ignoreSslErrorsImplementation(const QList &) { } +#endif // QT_CONFIG(ssl) + /*! If this function is called, SSL errors related to network connection will be ignored, including certificate validation diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h index 63c2752caf..4a402daa91 100644 --- a/src/network/access/qnetworkreply.h +++ b/src/network/access/qnetworkreply.h @@ -143,7 +143,7 @@ public: // attributes QVariant attribute(QNetworkRequest::Attribute code) const; -#ifndef QT_NO_SSL +#if QT_CONFIG(ssl) QSslConfiguration sslConfiguration() const; void setSslConfiguration(const QSslConfiguration &configuration); void ignoreSslErrors(const QList &errors); @@ -157,7 +157,7 @@ Q_SIGNALS: void metaDataChanged(); void finished(); void error(QNetworkReply::NetworkError); -#ifndef QT_NO_SSL +#if QT_CONFIG(ssl) void encrypted(); void sslErrors(const QList &errors); void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator); @@ -182,9 +182,11 @@ protected: void setRawHeader(const QByteArray &headerName, const QByteArray &value); void setAttribute(QNetworkRequest::Attribute code, const QVariant &value); +#if QT_CONFIG(ssl) virtual void sslConfigurationImplementation(QSslConfiguration &) const; virtual void setSslConfigurationImplementation(const QSslConfiguration &); virtual void ignoreSslErrorsImplementation(const QList &); +#endif private: Q_DECLARE_PRIVATE(QNetworkReply) From 1d959c0de32f146904086737fc2c18f4ce85ebce Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 1 Nov 2019 16:30:47 +0100 Subject: [PATCH 4/6] Qt XML: Fix module in comment Change-Id: Ibb1c0b54c4add118328f9281e2dbbcf9c1c62312 Reviewed-by: Sona Kurazyan --- src/xml/qtxmlglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xml/qtxmlglobal.h b/src/xml/qtxmlglobal.h index ed5de8db87..1ce3008f4a 100644 --- a/src/xml/qtxmlglobal.h +++ b/src/xml/qtxmlglobal.h @@ -3,7 +3,7 @@ ** Copyright (C) 2016 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtCore module of the Qt Toolkit. +** This file is part of the QtXml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage From accc40f323b2eb284a9c2767a29659ebbb135b14 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 30 Oct 2019 14:45:47 +0100 Subject: [PATCH 5/6] Fix check for EGL on INTEGRITY This fixes a regression introduced in c00487d588f. Fixes: QTBUG-79285 Change-Id: I95f073d019d6e909f8de132ea9f27002043d5d52 Reviewed-by: Kimmo Ollila Reviewed-by: Timo Aarnipuro Reviewed-by: Tasuku Suzuki Reviewed-by: Joerg Bornemann --- src/gui/configure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/configure.json b/src/gui/configure.json index c2793bf236..19312d245d 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -1375,7 +1375,7 @@ }, "egl": { "label": "EGL", - "condition": "(features.opengl || features.openvg) && (features.angle || libs.egl) && (features.dlopen || !config.unix)", + "condition": "(features.opengl || features.openvg) && (features.angle || libs.egl) && (features.dlopen || !config.unix || config.integrity)", "output": [ "privateFeature", "feature" ] }, "egl_x11": { From 77455a9a8c678daf4a3035ce0c835f7bfeb617ee Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 4 Nov 2019 09:26:36 +0100 Subject: [PATCH 6/6] QProcess: explicitly mark QProcess::error() as deprecated The signal QProcess::error() was deprecated in Qt5.6 but not annotated with QT_DEPRECATED_X. Change-Id: I9dd11c9b8019a0554cb82d6acb6b7e0a01c78123 Reviewed-by: Kai Koehne --- src/corelib/io/qprocess.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h index 9fda5fba11..585508adf1 100644 --- a/src/corelib/io/qprocess.h +++ b/src/corelib/io/qprocess.h @@ -278,7 +278,8 @@ Q_SIGNALS: void finished(int exitCode); // ### Qt 6: merge the two signals with a default value #endif void finished(int exitCode, QProcess::ExitStatus exitStatus); -#if QT_DEPRECATED_SINCE(5,6) +#if QT_DEPRECATED_SINCE(5, 6) + QT_DEPRECATED_X("Use QProcess::errorOccurred(QProcess::ProcessError) instead") void error(QProcess::ProcessError error); #endif void errorOccurred(QProcess::ProcessError error);