summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qglobalstatic
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-121-1/+1
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate tests/auto/corelib/globalAlexandru Croitor2019-11-121-1/+7
| | | | | | | Change-Id: I89a82f0cafeda2f38217a24f1c495344910fba1a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-111-9/+9
|\ | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | cmake: build with exceptions disabled by defaultAlbert Astals Cid2019-06-051-0/+1
| | | | | | | | | | | | | | | | | | Only re-enable exceptions for the modules that do CONFIG+=exceptions in qmake Change-Id: I9f19078adbdc1b8fa3d4102fb51a099e7e35522e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+8
|/ | | | | | | | | | | | | | | Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* tests: Unify license to GPL-EXCEPTKai Koehne2017-04-031-31/+9
| | | | | | Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* macOS: Don't build auto-tests as application bundles unless explicitly requestedTor Arne Vestbø2016-10-231-1/+0
| | | | | | | | Consistent with other Unix platforms, and internally consistent between tests, as a lot of tests were already applying CONFIG -= app_bundle manually. Change-Id: Icd2b7e1c08015b26137af60ff82fddbc753f0ff4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Unify license header usage.Jani Heikkinen2016-03-291-3/+13
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
| | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-011-1/+0
| | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-171-2/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Disable thread-safe statics for MSVC 2015: they're brokenThiago Macieira2015-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | An object that throws in its constructor cannot be reentered. This violates both C++11 and C++98. It's also a regression from MSVC 2013. The unit test is renamed to indicate what it really does, as opposed to a misleading name that was probably a "thinko" on my part. Task-number: QTBUG-47224 Change-Id: Ib306f8f647014b399b87ffff13f132436d0578ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Fix tst_qglobalstatic on OS XSimon Hausmann2015-06-041-0/+21
|/ | | | | | | | | | OS X has an unreasonably low default for the maximum number of open file descriptors (256). The unit test creates about 200 threads and each thread in Qt creates at least two file descriptors (pipe), so the test cannot execute. Change-Id: I656367bca6d0a40fb1edb8c72914304db0f429ac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add CONFIG += testcase to test qglobalstatic.Friedemann Kleint2015-05-221-0/+1
| | | | | | | Otherwise, make check does nothing, always succeeding. Change-Id: I0fe04697e02ab0f33cd9aebb550777e200c70804 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-151-3/+3
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-4/+4
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fix Q_GLOBAL_STATIC support for exceptionsThiago Macieira2013-02-281-1/+23
| | | | | | | | | | | | | | | | | The problem was that the HolderBase destructor was getting called after the contained type's constructor threw an exception, as is required by RAII semantics (the base was fully initialized, so it had to be destroyed). That was required because we want to return a non-null pointer from operator() during destruction and return null after destruction, to keep compatibility with Qt 4. The solution is to only set the guard to Destroyed only if it is already at value Initialized. This way, if the HolderBase destructor is run as part of the stack unwinding, it knows that the construction did not complete. Change-Id: I9849b43ed7112bf9e70861b48a56a924c286617e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add a new Q_GLOBAL_STATIC implementationThiago Macieira2013-01-222-0/+226
Unlike the previous implementation, this implementation is locked: only one initialisation is ever run at the same time. It is exception-safe, meaning that a throwing constructor will restart the process. Also, start using the thread-safe behaviour that GCC has offered for a long time and C++11 requires. Change-Id: I20db44f57d258923df64c0051358fd0d9a5ccd51 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>