summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-03-18 11:45:07 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-03-18 15:43:52 +0100
commit08b9539b7a2c2341f2bc3599e98c06fbe8310db7 (patch)
tree607c7c51b79cf941cd8c7fd97bc398bc229bf695
parentd4f044533111fcfb34fe3a785eeb7af7fdbefbdd (diff)
parent18b69ae8a4cf8e2e536bfe9e81bd8d929eacf115 (diff)
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
-rw-r--r--src/corelib/text/UNICODE_LICENSE.txt19
-rw-r--r--src/corelib/thread/qthreadpool.cpp19
-rw-r--r--src/widgets/dialogs/qwizard.h2
-rw-r--r--src/widgets/kernel/qapplication.cpp2
-rw-r--r--src/widgets/styles/qstyle.cpp2
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp1
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp3
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp2
8 files changed, 36 insertions, 14 deletions
diff --git a/src/corelib/text/UNICODE_LICENSE.txt b/src/corelib/text/UNICODE_LICENSE.txt
index 1c73202b74..567fda24dd 100644
--- a/src/corelib/text/UNICODE_LICENSE.txt
+++ b/src/corelib/text/UNICODE_LICENSE.txt
@@ -1,5 +1,20 @@
-Copyright © 1991-2018 Unicode, Inc. All rights reserved.
-Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
+UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
+
+See Terms of Use for definitions of Unicode Inc.'s
+Data Files and Software.
+
+NOTICE TO USER: Carefully read the following legal agreement.
+BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
+DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
+YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT.
+IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
+THE DATA FILES OR SOFTWARE.
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright © 1991-2019 Unicode, Inc. All rights reserved.
+Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index a9352c3894..44cdf071df 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -534,7 +534,7 @@ void QThreadPool::start(std::function<void()> functionToRun, int priority)
does nothing and returns \c false. Otherwise, \a runnable is run immediately
using one available thread and this function returns \c true.
- Note that the thread pool takes ownership of the \a runnable if
+ Note that on success the thread pool takes ownership of the \a runnable if
\l{QRunnable::autoDelete()}{runnable->autoDelete()} returns \c true,
and the \a runnable will be deleted automatically by the thread
pool after the \l{QRunnable::run()}{runnable->run()} returns. If
@@ -549,12 +549,7 @@ bool QThreadPool::tryStart(QRunnable *runnable)
return false;
Q_D(QThreadPool);
-
QMutexLocker locker(&d->mutex);
-
- if (d->allThreads.isEmpty() == false && d->activeThreadCount() >= d->maxThreadCount)
- return false;
-
return d->tryStart(runnable);
}
@@ -571,7 +566,17 @@ bool QThreadPool::tryStart(std::function<void()> functionToRun)
{
if (!functionToRun)
return false;
- return tryStart(QRunnable::create(std::move(functionToRun)));
+
+ Q_D(QThreadPool);
+ QMutexLocker locker(&d->mutex);
+ if (!d->allThreads.isEmpty() && d->activeThreadCount() >= d->maxThreadCount)
+ return false;
+
+ QRunnable *runnable = QRunnable::create(std::move(functionToRun));
+ if (d->tryStart(runnable))
+ return true;
+ delete runnable;
+ return false;
}
/*! \property QThreadPool::expiryTimeout
diff --git a/src/widgets/dialogs/qwizard.h b/src/widgets/dialogs/qwizard.h
index a40635c4a5..dc29c80f51 100644
--- a/src/widgets/dialogs/qwizard.h
+++ b/src/widgets/dialogs/qwizard.h
@@ -129,7 +129,7 @@ public:
QWizardPage *page(int id) const;
bool hasVisitedPage(int id) const;
#if QT_DEPRECATED_SINCE(5, 15)
- QList<int> visitedPages() const;
+ Q_DECL_DEPRECATED_X("Use visitedIds() instead") QList<int> visitedPages() const;
#endif
QList<int> visitedIds() const;
QList<int> pageIds() const;
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index f49461b2d0..a2c2dccbcc 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2695,8 +2695,6 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
QDesktopWidget has various functions for obtaining useful geometries upon
the desktop, such as QDesktopWidget::screenGeometry() and
QDesktopWidget::availableGeometry().
-
- On X11, it is also possible to draw on the desktop.
*/
QDesktopWidget *QApplication::desktop()
{
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 69167a1fe2..70af3e295a 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1011,7 +1011,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value SE_PushButtonFocusRect Area for the focus rect (usually
larger than the contents rect).
\value SE_PushButtonLayoutItem Area that counts for the parent layout.
- \value SE_PushButtonBevel Area used for the bevel of the button.
+ \value SE_PushButtonBevel [since 5.15] Area used for the bevel of the button.
\value SE_CheckBoxIndicator Area for the state indicator (e.g., check mark).
\value SE_CheckBoxContents Area for the label (text or pixmap).
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index a70b07e389..1a882733a3 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -1397,6 +1397,7 @@ void tst_QLocale::fpExceptions()
// check that double-to-string conversion doesn't throw floating point exceptions when they are
// enabled
#ifdef Q_OS_WIN
+ _clear87();
unsigned int oldbits = _control87(0, 0);
_control87( 0 | _EM_INEXACT, _MCW_EM );
#endif
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 430f9b7575..e26700071b 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -6518,6 +6518,9 @@ void tst_QNetworkReply::sslSessionSharing()
QNetworkRequest warmupRequest(urlString);
QFETCH(bool, sessionSharingEnabled);
warmupRequest.setAttribute(QNetworkRequest::User, sessionSharingEnabled); // so we can read it from the slot
+ // Make sure the socket is closed when the request is finished to guarantee that
+ // the _socket_ is not reused, but rather the ssl session
+ warmupRequest.setRawHeader("Connection", "close");
if (! sessionSharingEnabled) {
QSslConfiguration configuration(QSslConfiguration::defaultConfiguration());
configuration.setSslOption(QSsl::SslOptionDisableSessionSharing, true);
diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
index 85eec6e783..009c5b7240 100644
--- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -309,7 +309,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP()
QCOMPARE(socketDevice.peerAddress(), QtNetworkSettings::imapServerIp());
// Wait for the greeting
- QVERIFY(socketDevice.waitForRead());
+ QVERIFY2(socketDevice.waitForRead(), qPrintable("Socket error:" + socketDevice.errorString()));
// Read the greeting
qint64 available = socketDevice.bytesAvailable();