summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add lancelot based benchmarkAllan Sandfeld Jensen2018-04-043-1/+343
| | | | | | | | | | | | | | | | Uses the scripts and tests we already have for lancelot as a painting benchmark. Change-Id: Idf8a55e2261162e619f6dbb567dc19f8dc96da4e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Benchmarks/QGraphicsView: re-enable graphicslayout/graphicslinearlayoutChristian Ehrlicher2018-04-045-22/+25
| | | | | | | | | | | | | | | | | | | | The two benchmarks graphicslayout and graphicslinearlayout were disabled for some time. Fixed the compile errors and readded them so there is at least no bitrotting. Task-number: QTBUG-27461 Change-Id: Ib0c878e97693c0ad3bf87e658d493da61f5174ee Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Benchmarks/QGraphicsItem: use testdata instead hard-coded valuesChristian Ehrlicher2018-03-271-1/+1
| | | | | | | | | | | | | | | | tst_QGraphicsItem::setPos() was provided with test data but it was not used. Change-Id: I8ed2a1ef9940024e4a0e666276f0953706869ef7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Benchmark: move widgets benchmarks still in gui subdirectory to widgetsChristian Ehrlicher2018-03-27201-20/+16
| | | | | | | | | | | | | | | | | | Move all widget-dependent benchmarks which were still in gui subdirectory to widgets Task-number: QTBUG-23129 Change-Id: I1359f1ea4036cacdfdbe08ff9ecdf1e2c75a005b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Benchmark/QImageReader: remove unused dependenciesChristian Ehrlicher2018-03-233-6/+0
|/ | | | | | | | QImagereader benchmark does neither depend on network nor widgets. Therefore those two dependencies can be removed here. Change-Id: Ic127b2668e22608774ce5878454f4a96ef591f6b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Make a benchmark out of tst_QObjectPerformance::emitToManyReceiversKari Oikarinen2018-03-071-0/+24
| | | | | | | | | | | The test has been flaky on top of QEMU. The test is clearly a sort of manually rolled benchmark, not a regular autotest. Remove the test and replace it with a benchmark in QObjectBenchmark. Task-number: QTBUG-66823 Task-number: QTBUG-66216 Change-Id: I7a48293023f32141eed6fea50fbb63af18933a8f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QObjectBenchmark: Don't try to set read-only propertiesKari Oikarinen2018-03-071-1/+2
| | | | | | | Avoid lots of warnings about not being able to set "modal". Change-Id: I396718f14a55203f9989c03e20efc647c64795a9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* psql: do not try to get table name when PQftable returns InvalidOidChristian Ehrlicher2018-02-221-0/+33
| | | | | | | | | | | When the table for a selected column can't be determined (e.g. because there is no table for it), PQftable returns InvalidOid. This was not covered and a query to determine the table name was executed every time which slowed down calls to QSqlQuery::value(QString). Task-number: QTBUG-65226 Change-Id: Idd8fbaaef7b01ca4151439f46cad2cce6f1c93e9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-193-0/+197
|\ | | | | | | | | | | | | Conflicts: src/plugins/sqldrivers/psql/qsql_psql.cpp Change-Id: I070b455078b41e75c46562fcea5676d6218cd00c
| * psql: Improve performance of record()v5.10.1Andy Shaw2018-02-083-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to save having to always run a query to get the tablename for a known oid then we cache the result on the driver side. The oid stays the same while the table exists, so only on dropping it would it change. Recreating the table causes it to get a new oid, so there is no risk of the old one being associated with the wrong table when this happens, if the driver is still open at that point. The benchmark added shows the improvement from the previous code, before the results for PostgreSQL was: RESULT : tst_QSqlRecord::benchmarkRecord():"0_QPSQL@localhost": 259 msecs per iteration (total: 259, iterations: 1) whereas now it is: RESULT : tst_QSqlRecord::benchmarkRecord():"0_QPSQL@localhost": 0.000014 msecs per iteration (total: 59, iterations: 4194304) Task-number: QTBUG-65226 Change-Id: Ic290cff719102743da84e2044cd23e540f20c96c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add drawTexture benchmarkAllan Sandfeld Jensen2018-02-063-0/+554
| | | | | | | | | | Change-Id: I086106adb49eca511d52c6b6b5cff5d72309f77c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Benchmarks: tst_tcpserver: Remove unnecessary qprocess includeOliver Wolff2018-02-051-1/+0
| | | | | | | | | | | | | | | | The include is not needed and breaks build that do not have process support. Change-Id: I3951c24c950dd556a3b26744d8994709e294d397 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-083-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Use dependencies instead of CONFIG+=orderedAllan Sandfeld Jensen2017-12-022-2/+2
| | | | | | | | | | | | | | | | Also drops a few instances where the dependency was purely runtime, especially for examples. Change-Id: I2a0476f79928143596bdb3b8f01193af90574ae8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-237-19/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-087-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-177-7/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * Ensure result of all QTest::qWaitFor are verifiedTor Arne Vestbø2017-10-056-7/+7
| | | | | | | | | | | | | | | | | | The qWaitFor functions themselves can not trigger a test failure, as that will not result in the test function exiting early, so every single call to qWaitFor needs to be wrapped in a QVERIFY. Change-Id: Id15a1549f31d06cdbf788e1d84ea431c28636ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-041-0/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | * Restore compatibility with pre-5.9 Keccak calculationThiago Macieira2017-09-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 12c5264d9add1826d543c36d893db77262195fc6 fixed the calculation of SHA-3 in QCryptographicHash: we were previously calculating Keccak. Unfortunately, turns out that replacing the algorithm wasn't the best idea: there are people who need to compare with the result obtained from a previous version of Qt and stored somewhere. This commit restores the enum values 7 through 10 to mean Keccak and moves SHA-3 to 12 through 15. The "Sha3_nnn" enums will switch between the two according to the QT_SHA3_KECCAK_COMPAT macro. [ChangeLog][Important Behavior Changes] This version of Qt restores compatibility with pre-5.9.0 calculation of QCryptographicHash algorithms that were labelled "Sha3_nnn": that is, applications compiled with old versions of Qt will continue using the Keccak algorithm. Applications recompiled with this version will use SHA-3, unless QT_SHA3_KECCAK_COMPAT is #define'd prior to #include <QCryptographicHash>. [ChangeLog][Binary Compatibility Note] This version of Qt changes the values assigned to enumerations QCryptographicHash::Sha3_nnn. Applications compiled with this version and using those enumerations will not work with Qt 5.9.0 and 5.9.1, unless QT_SHA3_KECCAK_COMPAT is defined. Task-number: QTBUG-62025 Discussed-at: http://lists.qt-project.org/pipermail/development/2017-September/030818.html Change-Id: I6e1fe42ae4b742a7b811fffd14e418fc04f096c3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-263-5/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-203-5/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| | * Use QT_LSTAT instead of lstat directlyJake Petroules2017-09-152-4/+6
| | | | | | | | | | | | | | | | | | | | | Not all platforms (such as VxWorks) have lstat. Change-Id: If42f0041f9a6d9bec0a355173c88f28f1819bd57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Exclude DBus performance test with -no-feature-processJake Petroules2017-09-151-1/+3
| | | | | | | | | | | | | | | | | | Change-Id: I3e650b21139bd59b1f8386f4abb39aadf85e412f Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Remove QMAKE_LIBS_NETWORK from QSqlQuery benchmarkJoerg Bornemann2017-08-281-1/+0
| | | | | | | | | | | | | | This was added in c6612de3 for WEC7 which we do not support anymore. Change-Id: I329374bb8375d629a6f7619236371c0fc953792d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-051-5/+2
|/ | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Deprecate QCoreApplication::flush()Gatis Paeglis2017-04-225-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as it has outlived its original purpose: Qt3 implementation on X11: void QApplication::flush() { flushX(); } void QApplication::flushX() { if (appDpy) XFlush( appDpy ); } Qt4 implementation on X11: Did nothing when QApplication::flush() was called (the flush() overrides in {unix,glib} event dispatchers with empty bodies). In Qt5 this function somehow has been repurposed (inconsistently) to do what QCoreApplication::sendPostedEvents already does: QAbstractEventDispatcher::flush() = 0; => QCocoaEventDispatcher::flush() {} => QEventDispatcherCoreFoundation::flush() {} => QIOSEventDispatcher (does not override ::flush()) => QEventDispatcherGlib::flush() {} => QPAEventDispatcherGlib (does not override ::flush()) => QEventDispatcherUNIX::flush() {} => QUnixEventDispatcherQPA (when QT_NO_GLIB=true) ::flush() { if (qApp) qApp->sendPostedEvents(); }) ==> QAndroidEventDispatcher (does not override ::flush()) => QEventDispatcherWin32::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWin32::flush(); } => QWindowsGuiEventDispatcher (does not override ::flush()) => QWindowsDirect2DEventDispatcher (does not override ::flush()) => QEventDispatcherWinRT::flush() {} => QOffscreenEventDispatcher::flush() { if (qApp) qApp->sendPostedEvents(); QEventDispatcherWinRT::flush(); } => QWinRTEventDispatcher (qminimaleglintegration.cpp) (does not override ::flush()) => QWinRTEventDispatcher (qwinrteventdispatcher.h) (does not override ::flush()) Whatever this function was doing on macOS in Qt3 and Qt4 also has been dropped in Qt5. It appears that the other event dispatchers in Qt5 that have overrides for flush() have simply copy-pasted this logic. Clearly the documentation of QCoreApplication::flush() is outdated and has nothing to do with the actual implementation in Qt5. This function is rarely used in Qt5 sources. It should be safe to remove the calls to QCoreApplication::flush() from Qt source code, as this function has been doing nothing on most platforms anyways. Repurposing it even broke handling of posted events (see QTBUG-48717). [ChangeLog][QtCore][Event loop] QCoreApplication::flush() is now deprecated. Use QCoreApplication::processEvents() and QCoreApplication::sendPostedEvents() instead. Task-number: QTBUG-33489 Task-number: QTBUG-48717 Change-Id: Icc7347ff203024b7153ea74be6bf527dd07ce821 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* tests: Unify license to GPL-EXCEPTKai Koehne2017-04-032-16/+11
| | | | | | Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Properly use the "process" featureUlf Hermann2017-02-272-7/+1
| | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Improve QIODevice::peek() performance on buffered devicesAlex Trotsenko2017-02-091-0/+32
| | | | | | | | | | | | | | Since 5.7, QIODevice::peek() implementation is based on transaction mechanism. While technically it's correct, seeking backward on a buffered random-access device clears the internal buffer that affects the performance of reading. To solve the problem, this patch implements peek mode directly inside the reading procedure. Task-number: QTBUG-56032 Change-Id: Ic5269f76e44c491a0309e13aba87fa7cf7b9259f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtGui/painting benchmark test: Fix Clang warning about uninitialized valueFriedemann Kleint2017-01-311-3/+3
| | | | | | | | | benchmarktests.h:323:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized] benchmarktests.h:371:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized] benchmarktests.h:417:18: warning: field 'm_as_pixmap' is uninitialized when used here [-Wuninitialized] Change-Id: Ica496e3baa19e0701c64222ce8ab92ec94178db7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QDateTime::fromString(): improve performance by 33%David Faure2017-01-031-2/+3
| | | | | | | | | | | | | | | | getMaximum() and getMinimum(), called during parsing, create new QDateTime instances, which on Linux end up calling mktime(). Making these static (for the common case of LocalTime spec) improves performance dramatically, when parsing several date/times. tests/benchmarks/corelib/tools/qdatetime/ (after fixing it to actually parse a valid date/time) says: RESULT : tst_QDateTime::fromString(): - 36,742,060 instruction reads per iteration (total: 36,742,060, iterations: 1) + 24,230,060 instruction reads per iteration (total: 24,230,060, iterations: 1) Change-Id: I0c3931285475bf19a5be8cba1486ed07cbf5e134 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change confusing Q_DEAD_CODE_FROM_QT4_FOO defineTor Arne Vestbø2016-10-143-5/+5
| | | | | | | | | | | | | | | | | | | Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash in QPainter benchmark testAllan Sandfeld Jensen2016-10-111-22/+67
| | | | | | | | | Adds missing image-formats so it doesn't segfault. Also changes the exclusion of rare formats to lists of included ones Change-Id: I1d00562cf8e96baa03121a0b996764224911e06a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Modularize configure.json/.priLars Knoll2016-09-153-0/+4
| | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-195-8/+8
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* employ QMAKE_USE: LIBS += $$QMAKE_LIBS_FOOOswald Buddenhagen2016-08-191-2/+1
| | | | | | | | this migrates the cases where the build system already made (some) use of variables (possibly) set by configure. Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-163-0/+75
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-103-0/+75
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * Improve performance of QColor::name, now more than 4 times fasterDavid Faure2016-08-053-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: HexRgb: 0.00230 ms per iteration, HexArgb: 0.00290 ms per iteration After: HexRgb: 0.00051 ms per iteration, HexArgb: 0.00061 ms per iteration This showed up as a relevant optimization when profiling KIconLoader which uses QColor::name() as part of the key -- thanks to Mark Gaiser for the investigation and first suggestion of a solution. I have also seen customer code writing a replacement for QColor::name() because it was too slow to be used as a hash key. Change-Id: I009ccdd712ea0d869d466e2c9894e0cea58f0e68 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Add a benchmark for QReadWriteLockOlivier Goffart2016-08-103-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Results on current dev branch [955b2bdfc0cb1d707f8914be230e5e00c548b6ab]: thread count: 4 ********* Start testing of tst_QReadWriteLock ********* Config: Using QtTest library 5.8.0, Qt 5.8.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 6.1.1 20160707) PASS : tst_QReadWriteLock::initTestCase() PASS : tst_QReadWriteLock::uncontended(nothing) RESULT : tst_QReadWriteLock::uncontended():"nothing": 1,113,292.1 CPU ticks per iteration (total: 11,132,922, iterations: 10) PASS : tst_QReadWriteLock::uncontended(QMutex) RESULT : tst_QReadWriteLock::uncontended():"QMutex": 35,490,310.7 CPU ticks per iteration (total: 354,903,108, iterations: 10) PASS : tst_QReadWriteLock::uncontended(QReadWriteLock, read) RESULT : tst_QReadWriteLock::uncontended():"QReadWriteLock, read": 40,513,695.0 CPU ticks per iteration (total: 405,136,950, iterations: 10) PASS : tst_QReadWriteLock::uncontended(QReadWriteLock, write) RESULT : tst_QReadWriteLock::uncontended():"QReadWriteLock, write": 43,179,327.2 CPU ticks per iteration (total: 431,793,272, iterations: 10) PASS : tst_QReadWriteLock::uncontended(std::mutex) RESULT : tst_QReadWriteLock::uncontended():"std::mutex": 37,733,243.0 CPU ticks per iteration (total: 377,332,430, iterations: 10) PASS : tst_QReadWriteLock::uncontended(std::shared_timed_mutex, read) RESULT : tst_QReadWriteLock::uncontended():"std::shared_timed_mutex, read": 71,517,438.7 CPU ticks per iteration (total: 715,174,388, iterations: 10) PASS : tst_QReadWriteLock::uncontended(std::shared_timed_mutex, write) RESULT : tst_QReadWriteLock::uncontended():"std::shared_timed_mutex, write": 69,967,867.5 CPU ticks per iteration (total: 699,678,676, iterations: 10) PASS : tst_QReadWriteLock::readOnly(nothing) RESULT : tst_QReadWriteLock::readOnly():"nothing": 479,393,335.3 CPU ticks per iteration (total: 4,793,933,354, iterations: 10) PASS : tst_QReadWriteLock::readOnly(QMutex) RESULT : tst_QReadWriteLock::readOnly():"QMutex": 823,493,383.2 CPU ticks per iteration (total: 8,234,933,832, iterations: 10) PASS : tst_QReadWriteLock::readOnly(QReadWriteLock) RESULT : tst_QReadWriteLock::readOnly():"QReadWriteLock": 559,816,053.6 CPU ticks per iteration (total: 5,598,160,536, iterations: 10) PASS : tst_QReadWriteLock::readOnly(std::mutex) RESULT : tst_QReadWriteLock::readOnly():"std::mutex": 961,903,416.3 CPU ticks per iteration (total: 9,619,034,164, iterations: 10) PASS : tst_QReadWriteLock::readOnly(std::shared_timed_mutex) RESULT : tst_QReadWriteLock::readOnly():"std::shared_timed_mutex": 1,786,254,363.5 CPU ticks per iteration (total: 17,862,543,636, iterations: 10) PASS : tst_QReadWriteLock::cleanupTestCase() Totals: 14 passed, 0 failed, 0 skipped, 0 blacklisted, 44507ms ********* Finished testing of tst_QReadWriteLock ********* Change-Id: I42189f7a356dcb36378e9d54111b7fbe89e62402 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Revert "Emit updateBlock signal in QTextDocumentLayout"Eskil Abrahamsen Blomfeldt2016-07-275-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 13040043b2f2274de74c296ede7dd3e6ffb67dcb. It introduced a bad regression, noticeable for longer documents, as it would cause the documentChanged(0, length) to trigger a layout of the entire document. The bug report for the commit (or the commit itself) does not contain a test case, but it is regardless the wrong approach. Note that QQuickTextEdit already listens to the contentsChange signal and invalidates the changed parts of the document as a reaction to this, so it should already work as expected. [ChangeLog][Qt Gui][Text] Fixed performance hit from showing large QTextDocuments in a QTextEdit or QTextBrowser. (Regression introduced in Qt 5.3.0) Task-number: QTBUG-51411 Change-Id: I6e7fbf8f62a1d68779eef5da3781de14d9fdcad8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QMetaType: Add a benchmark covering creation of QVariant from an enumRobin Burchell2016-07-221-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This proved to be quite slow in the past due to QReadWriteLock's implementation being suboptimal (prior to its improvement in 343e5d066a6b5583688e16baec20f20e6d9a24e0). This codepath is exercised quite extensively by QML with enum registrations. Change-Id: I94d1e13933bf005604dc4494e2cb5bc25ef3d387 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Improve performance of Qt::mightBeRichText by using QStringRefRobin Burchell2016-07-113-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noted this taking around 1% of QtQuick Text creation with a few simple bindings which is quite considerable, so hopefully improvements here will add up gradually. Also add a benchmark measuring changes: Test | From | To | Details +--------------------------------------+----------------+----------------+-----------------------+ mightBeRichText:br-invalidspace | 14466.00 instr | 10563.00 instr | -26.98% FASTER! :) mightBeRichText:br-nospace | 18581.00 instr | 14635.00 instr | -21.24% FASTER! :) mightBeRichText:br-space | 18470.00 instr | 14377.00 instr | -22.16% FASTER! :) mightBeRichText:documentation-header | 16336.00 instr | 12992.00 instr | -20.47% FASTER! :) mightBeRichText:empty | 2618.00 instr | 2618.00 instr | more or less the same mightBeRichText:invalid closing tag | 11102.00 instr | 7159.00 instr | -35.52% FASTER! :) mightBeRichText:no tags | 12503.00 instr | 8581.00 instr | -31.37% FASTER! :) mightBeRichText:simple | 17316.00 instr | 14074.00 instr | -18.72% FASTER! :) mightBeRichText:simple2 | 14394.00 instr | 10745.00 instr | -25.35% FASTER! :) +--------------------------------------+----------------+----------------+-----------------------+ Overall result | -201.81% :) Change-Id: I1817a69959d176b381bcbf27b72bb751885c3e9b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Replace qAllocMore with a pair of more useful functionsThiago Macieira2016-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first is "exact", not "more": qCalculateBlockSize. It ensures that there's no overflow in multiplying, adding the header size or when converting back to an int. The second is the replacement for qAllocMore: it calculates the block size like the first, but increases the block size to accommodate future appends. The number of elements that fit in the block is also returned. Task-number: QTBUG-41230 Change-Id: I52dd43c12685407bb9a6ffff13f5da09f816e667 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-121-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01