qt5-base 5.15.1
This commit is contained in:
@@ -73,6 +73,7 @@ def setup():
|
||||
-nomake tests \
|
||||
-nomake examples \
|
||||
-optimized-qmake \
|
||||
-no-strip \
|
||||
-reduce-relocations \
|
||||
-dbus-linked" % (qt5.prefix, bindirQt5, qt5.headerdir, qt5.archdatadir, qt5.docdir, qt5.plugindir, qt5.importdir, qt5.qmldir, qt5.datadir, qt5.testdir, qt5.translationdir, qt5.sysconfdir, qt5.examplesdir, qt5.libdir)
|
||||
else:
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
From 54aa63be9b74e8de72db9efbe6809ab1a97b29a7 Mon Sep 17 00:00:00 2001
|
||||
From: Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||
Date: Mon, 11 May 2020 21:14:01 +0900
|
||||
Subject: [PATCH] IBus: Use WAYLAND_DISPLAY on Wayland sessions to make up
|
||||
socket names
|
||||
|
||||
A recent change in IBus made it prefer the WAYLAND_DISPLAY envvar in
|
||||
order to compose its socket path for Wayland sessions. This is because
|
||||
DISPLAY is unreliable in those environment: It might not be there, there
|
||||
might be several displays pointing to the same Xwayland server (as it's
|
||||
the case in GNOME 3.36), or there might even be multiple Xwayland servers
|
||||
(eg. to enforce inter-app isolation with X11 apps).
|
||||
|
||||
Fixes: QTBUG-82910
|
||||
Pick-To: 5.15
|
||||
Change-Id: I4883b5d06863ba284883dd95281bed2ce7203e29
|
||||
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
||||
---
|
||||
.../ibus/qibusplatforminputcontext.cpp | 38 +++++++++++++++-------
|
||||
1 file changed, 27 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
|
||||
index 47ac54927bc..16c0ebfe213 100644
|
||||
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
|
||||
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
|
||||
@@ -712,19 +712,35 @@ void QIBusPlatformInputContextPrivate::createBusProxy()
|
||||
|
||||
QString QIBusPlatformInputContextPrivate::getSocketPath()
|
||||
{
|
||||
- QByteArray display(qgetenv("DISPLAY"));
|
||||
- QByteArray host = "unix";
|
||||
+ QByteArray display;
|
||||
QByteArray displayNumber = "0";
|
||||
+ bool isWayland = false;
|
||||
+
|
||||
+ if (qEnvironmentVariableIsSet("IBUS_ADDRESS_FILE")) {
|
||||
+ QByteArray path = qgetenv("IBUS_ADDRESS_FILE");
|
||||
+ return QString::fromLocal8Bit(path);
|
||||
+ } else if (qEnvironmentVariableIsSet("WAYLAND_DISPLAY")) {
|
||||
+ display = qgetenv("WAYLAND_DISPLAY");
|
||||
+ isWayland = true;
|
||||
+ } else {
|
||||
+ display = qgetenv("DISPLAY");
|
||||
+ }
|
||||
+ QByteArray host = "unix";
|
||||
+
|
||||
+ if (isWayland) {
|
||||
+ displayNumber = display;
|
||||
+ } else {
|
||||
+ int pos = display.indexOf(':');
|
||||
+ if (pos > 0)
|
||||
+ host = display.left(pos);
|
||||
+ ++pos;
|
||||
+ int pos2 = display.indexOf('.', pos);
|
||||
+ if (pos2 > 0)
|
||||
+ displayNumber = display.mid(pos, pos2 - pos);
|
||||
+ else
|
||||
+ displayNumber = display.mid(pos);
|
||||
+ }
|
||||
|
||||
- int pos = display.indexOf(':');
|
||||
- if (pos > 0)
|
||||
- host = display.left(pos);
|
||||
- ++pos;
|
||||
- int pos2 = display.indexOf('.', pos);
|
||||
- if (pos2 > 0)
|
||||
- displayNumber = display.mid(pos, pos2 - pos);
|
||||
- else
|
||||
- displayNumber = display.mid(pos);
|
||||
if (debug)
|
||||
qDebug() << "host=" << host << "displayNumber" << displayNumber;
|
||||
|
||||
--
|
||||
2.16.3
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
From add92a551cf601b5c9e074046326f95ccc38062e Mon Sep 17 00:00:00 2001
|
||||
From: Albert Astals Cid <aacid@kde.org>
|
||||
Date: Sat, 23 May 2020 01:35:18 +0200
|
||||
Subject: [PATCH] Do not fully initialize QIconLoader when setting the fallback
|
||||
theme
|
||||
|
||||
We need this because without this patch you get bugs both
|
||||
if you call QIcon::setFallbackThemeName before creating the QGuiApplication and
|
||||
if you call QIcon::setFallbackThemeName after creating QGuiApplication
|
||||
|
||||
Why do you get a bug if you call QIconLoader::setFallbackThemeName
|
||||
before creating the QGuiApplication:
|
||||
* QIcon::setFallbackThemeName calls QIconLoader::instance
|
||||
* QIconLoader::instance calls QIconLoader::ensureInitialized
|
||||
* QIconLoader::ensureInitialized calls systemThemeName
|
||||
* systemThemeName asks the current QPlatformTheme for its
|
||||
QPlatformTheme::SystemIconThemeName
|
||||
* But since we're calling this before creating the QGuiApplication
|
||||
there is no current QPlatformTheme yet, so systemThemeName
|
||||
is set to empty, which is obviously not what we want
|
||||
|
||||
Why do you get a bug if you call QIconLoader::setFallbackThemeName
|
||||
after creating the QGuiApplication:
|
||||
* QGuiApplicationPrivate::init calls
|
||||
QGuiApplicationPrivate::createPlatformIntegration
|
||||
* QGuiApplicationPrivate::createPlatformIntegration sets the
|
||||
current QPlatformTheme and at the end of the very same function
|
||||
uses QIcon::fromTheme
|
||||
* Since we haven't called QIconLoader::setFallbackThemeName yet
|
||||
there is at least one icon lookup that doesn't take
|
||||
the fallback theme we would like to have into account
|
||||
|
||||
This patch makes it so calling QIconLoader::setFallbackThemeName
|
||||
before creating the QGuiApplication works.
|
||||
|
||||
The only thing we want to do from QIcon::setFallbackThemeName is set
|
||||
the internal m_userFallbackTheme, it doesn't care about doing
|
||||
further initialization of QIconLoader, if it's done, great it's done,
|
||||
if it is not initialized yet, great it will be initialized later
|
||||
when someone actually tries to use the QIconloader.
|
||||
|
||||
So it's OK for ensureInitialized() to return early if there is no
|
||||
platform theme yet, because it will be called again later.
|
||||
|
||||
Pick-to: 5.12
|
||||
Pick-to: 5.15
|
||||
Fixes: QTBUG-74252
|
||||
Change-Id: I65268fc3d3d0bd282d76c76cf75e495bcc9d1a30
|
||||
Done-with: Albert Astals Cid <albert.astals.cid@kdab.com>
|
||||
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
||||
---
|
||||
src/gui/image/qicon.cpp | 3 +++
|
||||
src/gui/image/qiconloader.cpp | 15 ++++++++++++---
|
||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
|
||||
index 36f499711e9..91da21c477d 100644
|
||||
--- a/src/gui/image/qicon.cpp
|
||||
+++ b/src/gui/image/qicon.cpp
|
||||
@@ -1238,6 +1238,9 @@ QString QIcon::fallbackThemeName()
|
||||
themeSearchPath() containing an index.theme
|
||||
file describing its contents.
|
||||
|
||||
+ \note This should be done before creating \l QGuiApplication, to ensure
|
||||
+ correct initialization.
|
||||
+
|
||||
\sa fallbackThemeName(), themeSearchPaths(), themeName()
|
||||
*/
|
||||
void QIcon::setFallbackThemeName(const QString &name)
|
||||
diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp
|
||||
index 15ab1b3cd90..3fa3bb9c598 100644
|
||||
--- a/src/gui/image/qiconloader.cpp
|
||||
+++ b/src/gui/image/qiconloader.cpp
|
||||
@@ -112,10 +112,9 @@ extern QFactoryLoader *qt_iconEngineFactoryLoader(); // qicon.cpp
|
||||
void QIconLoader::ensureInitialized()
|
||||
{
|
||||
if (!m_initialized) {
|
||||
+ if (!QGuiApplicationPrivate::platformTheme())
|
||||
+ return; // it's too early: try again later (QTBUG-74252)
|
||||
m_initialized = true;
|
||||
-
|
||||
- Q_ASSERT(qApp);
|
||||
-
|
||||
m_systemTheme = systemThemeName();
|
||||
|
||||
if (m_systemTheme.isEmpty())
|
||||
@@ -125,6 +124,16 @@ void QIconLoader::ensureInitialized()
|
||||
}
|
||||
}
|
||||
|
||||
+/*!
|
||||
+ \internal
|
||||
+ Gets an instance.
|
||||
+
|
||||
+ \l QIcon::setFallbackThemeName() should be called before QGuiApplication is
|
||||
+ created, to avoid a race condition (QTBUG-74252). When this function is
|
||||
+ called from there, ensureInitialized() does not succeed because there
|
||||
+ is no QPlatformTheme yet, so systemThemeName() is empty, and we don't want
|
||||
+ m_systemTheme to get intialized to the fallback theme instead of the normal one.
|
||||
+*/
|
||||
QIconLoader *QIconLoader::instance()
|
||||
{
|
||||
iconLoaderInstance()->ensureInitialized();
|
||||
--
|
||||
2.16.3
|
||||
@@ -0,0 +1,39 @@
|
||||
From 777f2a1c1e7e1cd669cc152aaa5b99d68b8a1ccd Mon Sep 17 00:00:00 2001
|
||||
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
||||
Date: Wed, 10 Jun 2020 11:26:00 +0200
|
||||
Subject: Fix QToolButton menus showing on primary screens in multiscreen
|
||||
setups
|
||||
|
||||
Calculate an initial position based on the current size hint
|
||||
and pass it to QMenuPrivate::exec(), which does screen checks
|
||||
based on it.
|
||||
|
||||
Amends a78d66743171557d79b16c08be775e3ac15bb4ef.
|
||||
|
||||
Fixes: QTBUG-84462
|
||||
Task-number: QTBUG-78966
|
||||
Change-Id: Icae8d2bc0fb50c4c853cfebaa2b2250fc06542e3
|
||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
||||
(cherry picked from commit ad532ce118b7052be3b69999cef2eb610e66fa88)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
---
|
||||
src/widgets/widgets/qtoolbutton.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
|
||||
index 314c6ab40c..e380cb647b 100644
|
||||
--- a/src/widgets/widgets/qtoolbutton.cpp
|
||||
+++ b/src/widgets/widgets/qtoolbutton.cpp
|
||||
@@ -805,7 +805,8 @@ void QToolButtonPrivate::popupTimerDone()
|
||||
// QTBUG-78966, Delay positioning until after aboutToShow().
|
||||
auto positionFunction = [q, horizontal](const QSize &sizeHint) {
|
||||
return positionMenu(q, horizontal, sizeHint); };
|
||||
- actualMenu->d_func()->exec({}, nullptr, positionFunction);
|
||||
+ const auto initialPos = positionFunction(actualMenu->sizeHint());
|
||||
+ actualMenu->d_func()->exec(initialPos, nullptr, positionFunction);
|
||||
|
||||
if (!that)
|
||||
return;
|
||||
--
|
||||
cgit v1.2.1
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
From 9d2b474b5f6aa07ee731d28f9774d10dfaa49b32 Mon Sep 17 00:00:00 2001
|
||||
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||
Date: Tue, 2 Jun 2020 10:59:21 +0200
|
||||
Subject: Do not multithread if already in a global threadpool thread
|
||||
|
||||
This can lead to a deadlock if we block all the worker threads, waiting
|
||||
for the worker threads to finish.
|
||||
|
||||
Fixes: QTBUG-84619
|
||||
Change-Id: I92b7f96007897d86ece0c34223bab0df4ccbed9a
|
||||
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
|
||||
(cherry picked from commit 87d32424de2f471a520c1f3ba0c3035fbff7ee06)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
---
|
||||
src/corelib/thread/qthreadpool.cpp | 24 ++++++++++++++++++++++++
|
||||
src/corelib/thread/qthreadpool.h | 2 ++
|
||||
src/gui/image/qimage.cpp | 7 ++++---
|
||||
src/gui/image/qimage_conversions.cpp | 15 +++++++++------
|
||||
src/gui/painting/qimagescale.cpp | 5 +++--
|
||||
src/gui/painting/qimagescale_neon.cpp | 5 +++--
|
||||
src/gui/painting/qimagescale_sse4.cpp | 5 +++--
|
||||
7 files changed, 48 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
|
||||
index 1f99bad247..d2dcc32280 100644
|
||||
--- a/src/corelib/thread/qthreadpool.cpp
|
||||
+++ b/src/corelib/thread/qthreadpool.cpp
|
||||
@@ -52,6 +52,7 @@ Q_GLOBAL_STATIC(QThreadPool, theInstance)
|
||||
*/
|
||||
class QThreadPoolThread : public QThread
|
||||
{
|
||||
+ Q_OBJECT
|
||||
public:
|
||||
QThreadPoolThread(QThreadPoolPrivate *manager);
|
||||
void run() override;
|
||||
@@ -763,6 +764,28 @@ void QThreadPool::clear()
|
||||
d->clear();
|
||||
}
|
||||
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
+/*!
|
||||
+ \internal
|
||||
+
|
||||
+ Returns \c true if \a thread is a thread managed by this thread pool.
|
||||
+*/
|
||||
+#else
|
||||
+/*!
|
||||
+ \since 6.0
|
||||
+
|
||||
+ Returns \c true if \a thread is a thread managed by this thread pool.
|
||||
+*/
|
||||
+#endif
|
||||
+bool QThreadPool::contains(const QThread *thread) const
|
||||
+{
|
||||
+ Q_D(const QThreadPool);
|
||||
+ const QThreadPoolThread *poolThread = qobject_cast<const QThreadPoolThread *>(thread);
|
||||
+ if (!poolThread)
|
||||
+ return false;
|
||||
+ return d->allThreads.contains(const_cast<QThreadPoolThread *>(poolThread));
|
||||
+}
|
||||
+
|
||||
#if QT_DEPRECATED_SINCE(5, 9)
|
||||
/*!
|
||||
\since 5.5
|
||||
@@ -784,3 +807,4 @@ void QThreadPool::cancel(QRunnable *runnable)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qthreadpool.cpp"
|
||||
+#include "qthreadpool.moc"
|
||||
diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h
|
||||
index e3691ab010..004f76a240 100644
|
||||
--- a/src/corelib/thread/qthreadpool.h
|
||||
+++ b/src/corelib/thread/qthreadpool.h
|
||||
@@ -93,6 +93,8 @@ public:
|
||||
|
||||
void clear();
|
||||
|
||||
+ bool contains(const QThread *thread) const;
|
||||
+
|
||||
#if QT_DEPRECATED_SINCE(5, 9)
|
||||
QT_DEPRECATED_X("use tryTake(), but note the different deletion rules")
|
||||
void cancel(QRunnable *runnable);
|
||||
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
|
||||
index 499c527cfc..c443836c0a 100644
|
||||
--- a/src/gui/image/qimage.cpp
|
||||
+++ b/src/gui/image/qimage.cpp
|
||||
@@ -5042,15 +5042,16 @@ void QImage::applyColorTransform(const QColorTransform &transform)
|
||||
};
|
||||
}
|
||||
|
||||
-#if QT_CONFIG(thread)
|
||||
+#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
|
||||
int segments = sizeInBytes() / (1<<16);
|
||||
segments = std::min(segments, height());
|
||||
- if (segments > 1) {
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments > 1 && !threadPool->contains(QThread::currentThread())) {
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (height() - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
transformSegment(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
|
||||
index a3868a64c7..e804b3b788 100644
|
||||
--- a/src/gui/image/qimage_conversions.cpp
|
||||
+++ b/src/gui/image/qimage_conversions.cpp
|
||||
@@ -236,14 +236,15 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
|
||||
int segments = src->nbytes / (1<<16);
|
||||
segments = std::min(segments, src->height);
|
||||
|
||||
- if (segments <= 1)
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments <= 1 || threadPool->contains(QThread::currentThread()))
|
||||
return convertSegment(0, src->height);
|
||||
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (src->height - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
convertSegment(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
@@ -290,14 +291,15 @@ void convert_generic_to_rgb64(QImageData *dest, const QImageData *src, Qt::Image
|
||||
int segments = src->nbytes / (1<<16);
|
||||
segments = std::min(segments, src->height);
|
||||
|
||||
- if (segments <= 1)
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments <= 1 || threadPool->contains(QThread::currentThread()))
|
||||
return convertSegment(0, src->height);
|
||||
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (src->height - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
convertSegment(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
@@ -396,12 +398,13 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
|
||||
#ifdef QT_USE_THREAD_PARALLEL_IMAGE_CONVERSIONS
|
||||
int segments = data->nbytes / (1<<16);
|
||||
segments = std::min(segments, data->height);
|
||||
- if (segments > 1) {
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments > 1 && !threadPool->contains(QThread::currentThread())) {
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (data->height - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
convertSegment(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp
|
||||
index 2395c891ce..aac1e20f7b 100644
|
||||
--- a/src/gui/painting/qimagescale.cpp
|
||||
+++ b/src/gui/painting/qimagescale.cpp
|
||||
@@ -307,12 +307,13 @@ static inline void multithread_pixels_function(QImageScaleInfo *isi, int dh, con
|
||||
#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
|
||||
int segments = (qsizetype(isi->sh) * isi->sw) / (1<<16);
|
||||
segments = std::min(segments, dh);
|
||||
- if (segments > 1) {
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments > 1 && !threadPool->contains(QThread::currentThread())) {
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (dh - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
scaleSection(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
diff --git a/src/gui/painting/qimagescale_neon.cpp b/src/gui/painting/qimagescale_neon.cpp
|
||||
index 65fe3fac3c..046e56b419 100644
|
||||
--- a/src/gui/painting/qimagescale_neon.cpp
|
||||
+++ b/src/gui/painting/qimagescale_neon.cpp
|
||||
@@ -58,12 +58,13 @@ static inline void multithread_pixels_function(QImageScaleInfo *isi, int dh, con
|
||||
#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
|
||||
int segments = (qsizetype(isi->sh) * isi->sw) / (1<<16);
|
||||
segments = std::min(segments, dh);
|
||||
- if (segments > 1) {
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments > 1 && !threadPool->contains(QThread::currentThread())) {
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (dh - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
scaleSection(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
diff --git a/src/gui/painting/qimagescale_sse4.cpp b/src/gui/painting/qimagescale_sse4.cpp
|
||||
index 1760e72f65..70cfa08d95 100644
|
||||
--- a/src/gui/painting/qimagescale_sse4.cpp
|
||||
+++ b/src/gui/painting/qimagescale_sse4.cpp
|
||||
@@ -59,12 +59,13 @@ static inline void multithread_pixels_function(QImageScaleInfo *isi, int dh, con
|
||||
#if QT_CONFIG(thread) && !defined(Q_OS_WASM)
|
||||
int segments = (qsizetype(isi->sh) * isi->sw) / (1<<16);
|
||||
segments = std::min(segments, dh);
|
||||
- if (segments > 1) {
|
||||
+ QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
+ if (segments > 1 && !threadPool->contains(QThread::currentThread())) {
|
||||
QSemaphore semaphore;
|
||||
int y = 0;
|
||||
for (int i = 0; i < segments; ++i) {
|
||||
int yn = (dh - y) / (segments - i);
|
||||
- QThreadPool::globalInstance()->start([&, y, yn]() {
|
||||
+ threadPool->start([&, y, yn]() {
|
||||
scaleSection(y, y + yn);
|
||||
semaphore.release(1);
|
||||
});
|
||||
--
|
||||
cgit v1.2.1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<Summary>Cross platform application and UI framework</Summary>
|
||||
<Description>Cross platform application and UI development framework</Description>
|
||||
<License>'GPL3' 'LGPL3' 'FDL' 'custom'</License>
|
||||
<Archive sha1sum="9de814d3b9005bf984a78e4b564fbb9413e043c4" type="tarxz">http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/qtbase-everywhere-src-5.14.2.tar.xz</Archive>
|
||||
<Archive sha1sum="6c4ecf8e3161b6eb00d5f9b9f063a73d9f5e3a79" type="tarxz">http://download.qt.io/official_releases/qt/5.15/5.15.1/submodules/qtbase-everywhere-src-5.15.1.tar.xz</Archive>
|
||||
<AdditionalFiles>
|
||||
<!-- <AdditionalFile target="qt5-base-nouveau-freeze.patch">qt5-base-nouveau-freeze.patch</AdditionalFile> -->
|
||||
</AdditionalFiles>
|
||||
@@ -81,9 +81,10 @@
|
||||
<Patches>
|
||||
<!-- Pisilinux Patches -->
|
||||
<Patch>mkspecs2.patch</Patch>
|
||||
<!-- <Patch level="1">qtbug-80967.patch</Patch> -->
|
||||
<!-- <Patch level="1">qtbase-zlib-compression.patch</Patch> -->
|
||||
<!-- <Patch level="1">virtualbox-focus.patch</Patch> -->
|
||||
<!-- <Patch level="1">qt5-base-QTBUG-82910.patch</Patch> -->
|
||||
<!-- <Patch level="1">qtbug-74252.patch</Patch> -->
|
||||
<!-- <Patch level="1">qtbug-78966.patch</Patch> -->
|
||||
<!-- <Patch level="1">qtbug-84619.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -271,6 +272,13 @@
|
||||
</Package>-->
|
||||
|
||||
<History>
|
||||
<Update release="26">
|
||||
<Date>2020-09-09</Date>
|
||||
<Version>5.15.1</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="25">
|
||||
<Date>2020-04-04</Date>
|
||||
<Version>5.14.2</Version>
|
||||
|
||||
Reference in New Issue
Block a user