summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fix all clang parse errors in QtBase during PCH buildMartin Smith2018-11-052-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update eliminates ALL parsing errors when clang parses the Qt headers to build the precompiled header qdoc needs. These errors are often cases where an old use of Q_QDOC no longer works because clang sees the enclosed fake declarations as erroneous. In a few cases, clang reported errors because two dummy function declartations under the Q_CLANG_QDOC guard were indistinguishable, so one of them was removed, and the documentation was patched accordingly. Using the macro Q_DECLARE_INTERFACE(...) causes clang to report errors because the class parametewr is abstract. These uses of the macro are not needed, so they are removed with #ifndef Q_CLANG_QDOC. Some declarations of default GL types that had been provided for qdoc were no longer needed, so they are removed. Now there are some member function signatures in QDBusPendingReply and QDBusPendingCall that have very long template clauses and qualifiers in their signatures. These unwieldy signatures will be unnecessary in the documentation and will look bad there, but for now they are correct. The ultimate solution will be to add a metacommand to qdoc, something like \simplify-signature to tell qdoc to generate the documentation for these member functions without the long template caluses and qualifiers. Change-Id: I012cf17a544fbba2ebc71002f31bdc865119bb8e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* winrt: Use SwitchToThread instead of Sleep(0)Oliver Wolff2018-10-311-4/+0
| | | | | | | | | | | UWP also supports SwitchToThread. The usage of Sleep(0) was a leftover that was forgotten when porting to desktop Window's approach of handling threads. Change-Id: I5e3d6fb3eefe07407b910cc6a6b45781d320e151 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qreadwritelock: Fix Q_ASSERT typoMikhail Svetkin2018-10-171-2/+2
| | | | | | | Task-number: QTBUG-71156 Change-Id: Idc249b8b499106c3683a7fd641f27d22047386fe Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-25/+4
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* winrt: Explicitly set main thread in QCoreApplication's constructorOliver Wolff2018-10-082-2/+36
| | | | | | | | | | | | | | | For winrt we cannot rely on the fact, that QThread::current will be called from the correct thread for the first time. The application's main entry point creates a suspended thread and starts it right afterwards. At that moment, other functionality (QLoggingRegistry for example) might have called QThread::current, which set the wrong thread as the main thread. In order to avoid this situation, the main thread is explicitly set in QCoreApplication's constructor. Task-number: QTBUG-66418 Change-Id: I8b6347357a80eb395ae758bd3d420adef0826751 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-3/+5
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| * Clarify docs regarding the states of a QFutureWatcher with no future setAndy Shaw2018-09-241-3/+5
| | | | | | | | | | | | Task-number: QTBUG-55554 Change-Id: I49b475a95d8ee65864cfa6d1024cb17cfe648b43 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Fix erroneous use of errno with qErrnoWarningThiago Macieira2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | On Windows, the error code to be used with qErrnoWarning is not errno, but Windows's GetLastError(). Obviously, right? So don't pass errno to it, just let it get the error message straight from qt_error_string(), which will use GetLastError(). Change-Id: I44e7d800c68141bdaae0fffd155619c93e3f3dab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | No-thread: prevent double delete of QThreadPrivateMorten Johan Sørvig2018-09-251-0/+1
| | | | | | | | | | | | Change-Id: Ie34c06ad798be6bd91f5c356051daaa72800c20a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix to prefer ranged-for, as clang-tidy advisesFriedemann Kleint2018-09-021-4/+2
| | | | | | | | | | | | | | Change-Id: Id9bb21855ae832cdbbc456326226ec72b634672e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about else after jumpsFriedemann Kleint2018-09-021-22/+18
| | | | | | | | | | | | | | | | | | Replace by switch() where appropriate, remove else and unindent code or simplify the return value. Change-Id: Ie988b9068a9579ae5a899b3765e43aad480b564e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | qthreadstorage.h: Fix syncqt warning about include path for qscopedpointer.hFriedemann Kleint2018-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | Add QtCore, fixing: qthreadstorage.h includes qscopedpointer.h when it should include QtCore/qscopedpointer.h Amends 815153d4a453855bb528f0fa9cb7e5a77d589a11. Change-Id: I8424bc4d0b0d666dbd04d63530af4fbd27987628 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge QThread class definitionsMorten Johan Sørvig2018-08-173-31/+70
| | | | | | | | | | | | | | | | | | We can reuse the main QThread definition for the no-thread configuration and avoid having to keep them in sync. Add stub definitions for member functions where needed. Change-Id: I128db11684a6040d09c4a4ce114f1399cba523f8 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Modernize the "thread" featureUlf Hermann2018-08-1726-149/+105
| | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add QThreadStorage stub implementationMorten Johan Sørvig2018-08-171-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | Add implementation for the no-thread configuration: Assume access will only happen from one thread and use a QScopedPointer to hold the data. Unlike the real implementation this version will delete the stored data on destruction, as opposed to on QApplication destruction. Change-Id: I9d8e89e7da18f967f463e2db7b50549c962acc84 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Correctly initialize adopted threads in stub implementationMorten Johan Sørvig2018-08-171-0/+2
| | | | | | | | | | | | | | | | | | Set data->threadId, which makes the thread detection used by Qt::AutoConnection work: it will now actually select Qt::DirectConnection. Change-Id: I9369e47eb7ed3ec88dba25f2d41e92139958bcd7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | QThread: Centralize the creation of the event dispatcherThiago Macieira2018-07-144-15/+19
| | | | | | | | | | | | | | | | | | | | | | In some places we call startingUp(), in others we don't. It's probably ok for those that have just created an object of a given class, which knows whether the virtual call is necessary or not. But for the generic case, we do call it. Change-Id: If48c5c2e920c433298f1fffd153ee1cc75703204 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFutureInterface::reportFinished use nullptr instead of 0Albert Astals Cid2018-07-051-1/+1
| | | | | | | | | | | | | | | | So that users don't get a warning if using -Wzero-as-null-pointer-constant Change-Id: Ia15b5f380a2f6a93e05eec06646608e480cdf5d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-023-43/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Replace LGPL licenses in .qdoc files with FDLKai Koehne2018-06-282-42/+18
| | | | | | | | | | | | | | | | .qdoc files should only be licensed under FDL (for documentation) or BSD (if they only contain code). Change-Id: I2a8a5b2c7bd3f927b8f71506c3672bc4916aca1e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Make the stub implementation of QThread compile againUlf Hermann2018-06-223-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot inline methods of QThreadPrivate because QThreadData has to be declared before. The global QThreadData needs to be accessible to QThreadData::clearCurrentThreadData(), and QAdoptedThread::run() has to be moved inside the #ifndef QT_NO_THREAD block as run() doesn't exist in the stub and Q_DECL_OVERRIDE would be wrong. We also fix the QThreadData::current() method to take and use the same parameters as in the non-stub case. Change-Id: Id29ca44b11fa95ed2df7cc39243a07ce7d3c455e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Make the sleep methods available in QThread even if QT_NO_THREADUlf Hermann2018-06-223-2/+16
| | | | | | | | | | | | | | | | | | sleep, msleep, and usleep are not actually related to threading and serve a purpose also in a single threaded application. Change-Id: Iba2e343d48a9c09e60125bc1b589047e0241608a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-074-9/+511
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Doc: Add information about QThread own methods thread affinitySamuel Gaist2018-06-031-8/+11
| | | | | | | | | | | | | | | | | | | | This patch improves the documentation regarding the thread affinity of QThread's own methods. It's not always clear for people new to threading that a QThread object lives in the old thread were it was instantiated and that calling the methods of said objects will also happen there. Change-Id: I3599851ebc97a33602ca6499da254a08aec59b2b Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * Revert "Atomics: remove qatomic_msvc.h"Kai Koehne2018-06-013-1/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 90493e16b8dd9edc6176d0abc255422edbbb05c3. The change broke static builds with MSVC. [ChangeLog][Visual Studio] Reverted a change that caused static binaries compiled with Visual Studio 2015 to crash on start-up. Note that this does not apply to Visual Studio 2017 static binaries, even though the crash stack traces are very similar: with 2017, the problem is compiler regression and requires updating to version 15.8 for the fix. Task-number: QTBUG-68514 Change-Id: I67ea8e1ef442cecab83e7d8d74efc9617e02da35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix warning about tautological comparison in 32-bit modeThiago Macieira2018-06-011-1/+1
| | | | | | | | | | | | | | | | | | qwaitcondition_unix.cpp:209:14: error: comparison of constant 9223372036854775807 with expression of type 'unsigned long' is always false Task-number: QTBUG-68568 Change-Id: Icc2c231dc2c44abdb087fffd1533c70ae68060dd Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix include style in qreadwritelock_p.hJoerg Bornemann2018-04-251-1/+1
| | | | | | | | | | | | | | ...to make that file bootstrap-compatible. Change-Id: Ic7c3b64cb27f3fd81f0140b6ee899310fa04f4c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-101-3/+7
|\| | | | | | | Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
| * QSemaphore: Fix 64-bit Linux QSemaphores initialized to non-zeroThiago Macieira2018-04-061-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original design for the 64-bit futex had the token count replicated in the high part. But the constructor wasn't setting it. This is one of the issues I had noticed when investigating QTBUG-66875, but didn't need to address since the the fix I ended up applying in commit 081c001deb75fa38385d3ff8cbbdb4f788529133 made that unnecessary: the high part only had the number of waiters. Unfortunately, when commit f502270c0f06daba75c1da381bd1658d81aa7bba brought back the token count in the high part, I failed to correct that problem. As a consequence, every QSemaphore that was initialized in the constructor to a non-zero value would eventually deadlock. This commit fixes that oversight. Task-number: QTBUG-67481 Change-Id: I662b8f168c74440ab1a8fffd1522be6b85adb4d0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-311-13/+20
|\| | | | | | | Change-Id: I33b47095efdfe0ba698c6a88ca41ec911f432208
| * QSemaphore: attempt to fix again the 64-bit Linux semaphoreThiago Macieira2018-03-291-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time, the issue was that we could race a wait and a wake. A multi- token waiter would not notice that the number of tokens changed because it only performed a fetch-and-OR, then waited on the high part which did not change. That means the futex_wait() would succeed, when we wanted it to have failed. So we have to bring back a portion of what commit 081c001deb75fa38385d3ff8cbbdb4f788529133 removed: we need to keep both the token count and the waiter count in the high word. Task-number: QTBUG-67214 Change-Id: I04a43ee94975482f9e32fffd151e467a9e0030b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-301-1/+1
|\| | | | | | | Change-Id: If9cc79a7cc098104333821bc3b345f6890f01825
| * QFutureWatcher: Refer to convenience method resultAt in documentationKari Oikarinen2018-03-281-1/+1
| | | | | | | | | | | | | | | | | | The future does not actually have a result() member function that takes an int. The correct function is resultAt(). But that is also available directly in the QFutureWatcher, so refer to that instead of advising to get to the future. Change-Id: I53d267b4b48b1171bf611e11130b9dacabc059a4 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-216-57/+674
|\| | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * QSemaphore: add minor optimization for 64-bit Linux systemsThiago Macieira2018-03-191-0/+7
| | | | | | | | | | | | | | | | Since we won't use the high bit of the low 32-bit word at all, we don't need the AND with 0x7fffffff either. Just cast. Change-Id: I72f5230ad59948f784eafffd151aa5a7dee995db Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QSemaphore: fix deadlock when the woken up thread wakes up anotherThiago Macieira2018-03-191-43/+88
| | | | | | | | | | | | | | | | | | | | | | | | When the thread that got woken up by release() is supposed to release() to wake up another thread, we were deadlocking. This happened because we cleared the bit indicating that there was contention when the first release(). Instead of storing a single bit, we now store the number of threads waiting. Task-number: QTBUG-66875 Change-Id: I72f5230ad59948f784eafffd15193873502ecba4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove src/corelib/arch, merging with src/corelib/threadThiago Macieira2018-03-193-0/+574
| | | | | | | | | | | | | | There is no more architecture-specific code. Change-Id: Ie9d9215342d449c48a11fffd151d11411cd73fc7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Atomics: remove qatomic_msvc.hThiago Macieira2018-03-191-14/+2
| | | | | | | | | | | | | | | | | | No longer needed. The comment about missing constexpr support is incorrect: MSVC 2015 does have constexpr issues, but they don't affect our use of std::atomic. Change-Id: Ie9d9215342d449c48a11fffd151d11208137f00d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Atomic: silence MSVC warning in the generic fetchAndSubThiago Macieira2018-03-191-0/+3
| | | | | | | | | | | | | | | | | | MSVC atomics still use the generic version, instead of qatomic_cxx11.h. The implementation of fetchAndSub is implemented on top of fetchAndAdd, but produced a warning with unsigned types. Change-Id: I72f5230ad59948f784eafffd151aa53435b75298 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | implement non-member operator+ for iteratorsEric Lemanissier2018-03-061-0/+1
| | | | | | | | | | | | | | | | | | all of these iterator classes already have a member operator+, which allows iter+int. This commits addes non-member operator+, which allows int+iter, and forwards to the member QList and QArrayData iterators now satisfy RandomAccessIterator concept Change-Id: I25c1dd8cea299e735d5a5e288dbe23dc1d7a1933 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Port QWaitCondition to QDeadlineTimerThiago Macieira2018-03-036-24/+55
|/ | | | | | | | | | Since pthread_cond_timedwait takes absolute time instead of relative time like most POSIX API, there's a small gain in performance here: we avoid an extra system call to get the current time. Task-number: QTBUG-64266 Change-Id: I25d85d86649448d5b2b3fffd1451138568091f50 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: Remove qDebug silencer in qthread_unix.cppTor Arne Vestbø2018-02-191-13/+0
| | | | | | | | | | It was added by Sam back in 2007, and we've removed other instances of the same pattern since then. It doesn't make any sense today. Change-Id: I0f3cb299e312648fd9dc96c639dab4c77fcb48c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Share event dispatcher creation between QThreadPrivate and QCoreApplicationTor Arne Vestbø2018-02-151-1/+2
| | | | | | | | | A step towards having the application do its event dispatching though the thread data's dispatcher, like QEventLoop, instead of keeping two references to the same dispatcher, one in QCoreApplicationPrivate and one in QThreadData. Change-Id: I7b215e7e99869d25638ec67f0666f632a508cc0f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QThreadPrivate::createEventDispatcher do exactly what it saysTor Arne Vestbø2018-02-143-23/+27
| | | | | | | | | | | Leaving the logic of starting up the event dispatcher to the call site, unified both the case of a custom event dispatcher and the default event dispatcher. The data argument is left in due to the static nature of the function. Change-Id: Ia2020e39ccc67cd5a583d4e614dd978b2ec44dba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use explicit QThreadData::hasEventDispatcher() where possibleTor Arne Vestbø2018-02-142-2/+2
| | | | | Change-Id: Ibce1a82dabb4e1381486211dbfb14eee9572e0ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify how we set thread name for UNIX threadsTor Arne Vestbø2018-02-051-11/+8
| | | | | | | | Passing on the thread ID is confusing, as it's not really what the function does. The QNX code path can resolve the thread ID by itself. Change-Id: I5f0d54621058576cdcf3707d36a11762fe2383c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-0/+4
|\ | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * Undef interface in more places, fixing builds with libc++ on windowsMartin Storsjö2018-01-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After including windows.h, interface is a define that expands to "struct" (unless WIN32_LEAN_AND_MEAN is defined). This name is used as a normal identifier in multiple places within Qt. This has already been worked around in a number of places (in e.g. 3ba61d9baa569ea69e41a943981680c09c521ff7 and 786d23bb4966b6697ac04c43158e2312d898e133). After qrandom.h was included in <QtCore/QtCore>, this header implicitly includes <random>. In libc++ on windows, this header then transitively includes windows.h, exposing the clash with the name "interface" in even more locations than before. For cases within qtbase internals, it could also alternatively be handled by defining WIN32_LEAN_AND_MEAN while building QtDbus, but for occurrences in public headers, the undef trick needs to be used. Change-Id: I89754f38f55ae7f2145255a2c8a71b23492be6a1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>