diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-29 13:51:16 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-29 15:30:17 +0200 |
commit | 1cc571593a67f3e688a5cbb896f0be71ca5a2b30 (patch) | |
tree | c652360c9276cbf475244fd02313d64e3df11a96 /src/corelib/thread | |
parent | 829c59aa4acf94bd979f6a3162808be36802d79a (diff) | |
parent | cc74452d6d259d36ac47c536f11a5efb269e8e44 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a
were reverted because of reconstruction in 5.7.
defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5.
DirectWrite: Fix advances being scaled to 0
Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.
Conflicts:
configure
mkspecs/features/uikit/device_destinations.sh
mkspecs/features/uikit/xcodebuild.mk
src/corelib/global/qglobal.cpp
src/corelib/global/qnamespace.qdoc
src/plugins/platforms/cocoa/qcocoamenuitem.h
src/plugins/platforms/windows/qwindowsservices.cpp
src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
src/widgets/kernel/qapplication.cpp
tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qfutureinterface.cpp | 11 | ||||
-rw-r--r-- | src/corelib/thread/qmutex.cpp | 27 |
2 files changed, 7 insertions, 31 deletions
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp index 6690f28556..ce31fe9270 100644 --- a/src/corelib/thread/qfutureinterface.cpp +++ b/src/corelib/thread/qfutureinterface.cpp @@ -305,12 +305,11 @@ void QFutureInterfaceBase::waitForResult(int resultIndex) lock.relock(); - if (!(d->state & Running)) - return; - - const int waitIndex = (resultIndex == -1) ? INT_MAX : resultIndex; - while ((d->state & Running) && d->internal_isResultReadyAt(waitIndex) == false) - d->waitCondition.wait(&d->m_mutex); + if (d->state & Running) { + const int waitIndex = (resultIndex == -1) ? INT_MAX : resultIndex; + while ((d->state & Running) && d->internal_isResultReadyAt(waitIndex) == false) + d->waitCondition.wait(&d->m_mutex); + } d->m_exceptionStore.throwPossibleException(); } diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 6dfe1ddc89..366413e82e 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -635,34 +635,11 @@ const int FreeListConstants::Sizes[FreeListConstants::BlockCount] = { typedef QFreeList<QMutexPrivate, FreeListConstants> FreeList; // We cannot use Q_GLOBAL_STATIC because it uses QMutex -#if defined(Q_COMPILER_THREADSAFE_STATICS) +static FreeList freeList_; FreeList *freelist() { - static FreeList list; - return &list; + return &freeList_; } -#else -static QBasicAtomicPointer<FreeList> freeListPtr; - -FreeList *freelist() -{ - FreeList *local = freeListPtr.loadAcquire(); - if (!local) { - local = new FreeList; - if (!freeListPtr.testAndSetRelease(0, local)) { - delete local; - local = freeListPtr.loadAcquire(); - } - } - return local; -} - -static void qFreeListDeleter() -{ - delete freeListPtr.load(); -} -Q_DESTRUCTOR_FUNCTION(qFreeListDeleter) -#endif } QMutexPrivate *QMutexPrivate::allocate() |