summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QInputMethodEvent::Attribute: add ctor that doesn't take a QVariantMarc Mutz2016-02-204-10/+19
| | | | | | | | | | | Many callers passed QVariant() as the last ctor argument. Micro-optimize by providing an overload that default- constructs the variant in-place. Change-Id: I9aab40c6e5a025c9a502c706e4cc7b10879ac418 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Move __cpp_constexpr check inside Q_COMPILER_CONSTEXPR checkJames McDonnell2016-02-201-10/+12
| | | | | | | | | | | | Q_COMPILER_CONSTEXPR can be undefined (or not defined at all) to indicate that constexpr should not be used regardless of the compiler's ability to support it. This is done for QNX because some C library floating point functions used in the Dinkumware C++ library aren't constexpr functions; i.e., the library doesn't have proper constexpr support even though the compiler does. Change-Id: I16918bbceac1e20b67c6ddbda28df3d9758bab83 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLatin1String: add at()/op[]/mid()/right()/left()Marc Mutz2016-02-194-4/+116
| | | | | | | | | | | | | | | | QLatin1String can be used as a string-view-like type. When attempting to do so in uic, mid() and at() were found to be missing. Added the others for completeness. Use the new functions in uic, for which they were originally conceived. [ChangeLog][QtCore][QLatin1String] Added at(), operator[](), mid(), right(), left(). Change-Id: I4cfe3e9ed1157dedee754b2012d9678fe72b161e Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* uic: optimize string handling in WriteInitialization::acceptWidget()Marc Mutz2016-02-191-20/+22
| | | | | | | | | | | | | | | | | | | | | Instead of building QStringLists out of statically-known US-ASCII strings, use C arrays of QLatin1String instead. QLatin1String is constexpr, so these tables, while causing relocations, do not require runtime initialization. Using QStringBuilder, these QLatin1Strings are almost a drop-in replacement for the QStrings used before. Effects on optimized GCC 5.3 Linux AMD64 builds: $ size bin/uic-* text data bss dec hex filename 567104 31776 56 598936 92398 bin/uic-00-before 565829 31944 24 597797 91f25 bin/uic-01-after Change-Id: I469c62b0e8966731d7ac2fa092f4b4cd8ddb79f1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.7' into devSimon Hausmann2016-02-1967-1153/+2051
|\ | | | | | | Change-Id: I7bee7df50af3d607a349b68103cd2c67791281fb
| * Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.Friedemann Kleint2016-02-181-18/+19
| | | | | | | | | | | | | | | | | | Fix warnings in file qwindowswindow.cpp. Remaining part of a refactoring done in the 5.6 branch. Task-number: QTBUG-50804 Change-Id: I4d7b423e0802ac39109c30c0de615664d3ee9216 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * xcodeSDKInfo: return the correct path based on the specified SDK.Jake Petroules2016-02-181-1/+1
| | | | | | | | | | | | | | | | This fixes a regression introduced in 9daeb6fe9d35b10ed739ea0a0566533524ffd532. Change-Id: I3100b307bb65c90bdc023be4993afaea666e409d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix typos in qOverload documentationPeter Kümmel2016-02-171-7/+7
| | | | | | | | | | | | Change-Id: I92f99623f659543934c52961307b0b53c8520948 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QDirModel: replace an inefficient QList with QVectorMarc Mutz2016-02-171-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SavedPersistent is larger than a void*, so holding it in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by marking it movable and holding it in a QVector instead. Take advantage of rvalue-enabled QVector::push_back(); optimize element construction by using aggregate initialization. Change-Id: I4fd88879aa13e6536d59d164b3c33fbc2fead77f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Merge "Merge dev into 5.7" into refs/staging/5.7Oswald Buddenhagen2016-02-1780-455/+1095
| |\
| | * Merge dev into 5.7Oswald Buddenhagen2016-02-1780-455/+1095
| | |\ | | | | | | | | | | | | Change-Id: I5c60b4d9fd8355ddd49a01e21861f36afbbf889b
| * | | bearer plugins: fix uses of inefficient QListsMarc Mutz2016-02-172-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These types are larger than a void*, so holding them in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by marking them movable, and holding in a QVector instead. Change-Id: I78774fc78d787241aaadc4f819b6d229e6200f46 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | QtPrintSupport: convert some index-based into C++11 range-for loopsMarc Mutz2016-02-175-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also reserve a QList in QPrinter::supportedPaperSources(). Change-Id: I94d24b81d7adcad2b28d36efdbef5a8726412f1a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | QSslSocket (OpenSSL): replace QList<QPair> by QVector<Struct>Marc Mutz2016-02-172-25/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QList<QPair<int,int>> is one of the most dangerous ones, because it fundamentally changes memory layout, and therefore performance and invariants, when going from 32-bit platforms (array list) to 64-bit (vector-like). Port to QVector instead, which has a consistent design across all platforms. Also port from QPair to a simple struct { code, depth }, because member names such as 'first' and 'second' have no semantic value and make code using them very hard to understand. Change-Id: I86c95d78dbb2e82ec222d6eae8ba11568e3ff0af Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | QSslSocket (OpenSSL): use QMutexLockerMarc Mutz2016-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of naked QMutex::(un)lock(). Change-Id: I9927e60286231bfc254d99cc88c39301b31df336 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | QtSql: eradicate remaining Q_FOREACH loopsMarc Mutz2016-02-173-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I86afe7104d506b840130517ae8066588fab2d745 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * | | QOCIDriver: optimize string handling in tables()Marc Mutz2016-02-171-31/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of a QStringList, use a const char 2D array to hold the system user names. Don't remove the current user from that list, skip it duing processing. - Extract Method make_where_clause, optimize it and cache its result. Instead of creating a QStringList and join()ing it at the end (sometimes twice), append to the result QString directly. Reserve the max size of the result string, which is statically known. - Keep the query select statements in QLatin1String. They are only used in QStringBuilder expressions. Change-Id: I0593d2812da671a541d49a6136f3ff3d784c63d5 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | mimetypes: Declare some types as sharedMarc Mutz2016-02-173-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's private API, so we can. As a consequence, had to add nothrow member-swap and, in QMimeGlobPattern, remove the user-defined empty destructor to un-inhibit the (nothrow) move special member functions. Change-Id: If5bb72db3c823c7b0e372f9bec99c7242d11839b Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | Remove QMimeMagicRule's pimplMarc Mutz2016-02-172-151/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It didn't make the class implicitly shared, but required an additional heap allocation on construction and copy, as it used 'only' QScopedPointer. As it's private API the pimpl is also not needed for BC reasons. So inline the data members, and some trivial accessors. As a by-product of removing the copy special member functions, we gain nothrow move special member functions. Interestingly, the memory layout of a QList<QMimeMagicRule> (replacing which is the topic of a future patch) doesn't change due to this change, because the type that formerly fit QList very well now is too large. But copying the type outside QList now no longer allocates memory. Saves more than 2.5KiB in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Ie3588cb5693227da6f1bfa196db924e075a750b3 Reviewed-by: David Faure <david.faure@kdab.com>
| * | | QShortcutMap: re-use an existing bool variableMarc Mutz2016-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of re-evaluating its expression. More readable. Change-Id: I18c6ab3bbc4c5a14328f9910fab991f6cad5549d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | | QDaemonThread: replace a function pointer with a lambdaMarc Mutz2016-02-171-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Saves around 0.5KiB in text size on optimized GCC 5.3 Linux AMD 64 builds. Change-Id: Iaf2664e670a96136031bac67e4012d4f7324eb47 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | QDialogButtonBox: replace a QList copy + pop_front() with mid(1)Marc Mutz2016-02-171-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code and is also more efficient, because it copies less data. Change-Id: I9ad0c372fb4fa6f5818d9d6cb7b7cf35935f8565 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | | Say hello to Android ServicesBogDan Vatra2016-02-1720-760/+1533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset enables running a QCoreApplication from within an Android Service. The Android Application running can now have a QtActivity or a QtService, but having both in the same process is not supported. This patch was based on Cory Slep's patch [ChangeLog][Android] Qt can now be used to easily create Android Services. Task-number: QTBUG-37221 Change-Id: I0fd693daaa85b991940ffe9cc41c483022677199 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * | | Disable XCTest support in QtTestLibTor Arne Vestbø2016-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In recent Xcode versions it doesn't work as expected, and caused build failures in downstream modules, so we disable it until the cause can be investigated further. Change-Id: Ie54c7256a10d73610ec7e481b9d665b75e396365 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | | Revert "Fix shared library framework builds of Qt with a platform suffix."Tor Arne Vestbø2016-02-172-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c4ecb81d6d64a190f7d24222d8cf35d953e73c1e. Hard-coding the library suffix into the linker flags was wrong. The library suffix is handled at runtime with DYLD_IMAGE_SUFFIX, set as part of the Xcode scheme or during debugging in .lldbinit. Change-Id: I11907b2755f7f187fb6fa18202813fde9ada4354 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | | QStandardItemModel: Reset the flags on clear()Stephen Kelly2016-02-173-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass modeltest after clear(). Otherwise it fails because more flags than Qt::ItemIsDropEnabled get returned for the QModelIndex(). Change-Id: I8f11515cc7dc9383f528f785312ffb77b3c2699d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | QDate: mark getDate() as const.Anton Kudryavtsev2016-02-172-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method does not modify the object. Can't change the API, so overload and mark the old function for removal in Qt 6. Change-Id: I4aee2bc19209646adc21388375aedd20a09129d0 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Add attribute Qt::AA_DontUseNativeDialogs.Friedemann Kleint2016-02-175-9/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | The attribute can be set to suppress native dialogs for example for testing purposes. Task-number: QTBUG-51074 Change-Id: I35611e07e00b7a060f22b49d6ab6f3b8627f8aca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * | QDateTimeParser: de-duplicate calls and cache resultsAnton Kudryavtsev2016-02-161-19/+26
| | | | | | | | | | | | | | | | | | Change-Id: I2e95456146b6ce646e244e962082f2967bcaed42 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Improve sql allocated cache reuseEric Lemanissier2016-02-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This change avoids unnecessary allocation of QSqlCachedResult cache. Change-Id: Ief592ab05b50f5e328490c504af088ec74d1938f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * | Add QStyleHints::setTabFocusBehavior() for testing purposesJ-P Nurmi2016-02-162-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we've been dependent on the focus behavior setting in OS X system preferences. This change allows us to start testing both behaviors on any platform. Change-Id: I9ce004f8b9479f8e722a387b795de16edb166a07 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * | Reduce allocations in QSQLiteDriver::open()'s connection options parsingMarc Mutz2016-02-151-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use splitRef() instead of split(), avoiding small temporary QStrings. - Don't remove all spaces before splitting, trim strings at the QStringRef level later, where needed. This will reject nonsense strings like QSQL_ LITE _BUSY_ TI MEOUT= 1 2 3 that were previously (wrongly) accepted. - Use C++11 range-for loop. Change-Id: I875c4cf47b7a283ba55783f70c903bb9947e1cd7 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * | Remove LGPLv2 as a license option in configureLars Knoll2016-02-152-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead show LGPLv3 and GPLv2 as valid options for the open source edition. Change-Id: Id7a203226428031ec873cbaf106dca14a854f155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | qmake: remove some empty user-defined dtorsMarc Mutz2016-02-152-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | They prevent move special member functions from being synthesized by the compiler. Change-Id: I90c4a6e286734ef3906ee833826bd3bfbdad3874 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Fix crash when using .NoActionBar theme.BogDan Vatra2016-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | m_activity.getActionBar() returns null when a .NoActionBar theme is declared in AndroidManifest.xml file Change-Id: I671891d03913209c3f9f34a6f4dd8894c20de5c2 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * | Cache results of multiple render target supportSean Harmer2016-02-141-2/+3
| | | | | | | | | | | | | | | Change-Id: I9e706690d4d2ddaae6c84b0e24de7698704e862d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Provide optimised version of QOpenGLFramebufferObject::blitFramebufferSean Harmer2016-02-142-3/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling shows that the call to glGetIntegerv() in this function that queries for the currently bound framebuffer is very expensive. It's the top hit on the CPU when profiling a Qt3D application using a Scene3D Qt Quick 2 item. The reason it is so expensive is that this call forces the OpenGL driver to propagate the OpenGL state through all of the queued commands in order to answer the query. It may also induce a pipeline stall depending upon the driver implementation. As this function gets called on the hot path every frame whenever using a Scene3D item and may also be called in plain Qt Quick when using ShaderEffect items; the layer property of QQuickItem; or when updating the Qt Quick glyph cache texture on Core profile contexts, it is very much worthy of optimization. This commit adds an overload of the blitFramebuffer() call that allows the caller to provide a policy that can either: * keep the existing behavior of restoring the previous framebuffer binding, * restore the default framebuffer, or * don't restore anything and let the caller be responsible for it. This will allow consumers such as Qt Quick and Qt 3D to use the optimised code path. The existing overloads of blitFramebuffer() retain the current behavior by calling with the policy to restore the previous framebuffer binding. Upon making this change, the cost of blitFramebuffer() is massively reduced. A follow up commit will optimize this further. Change-Id: I417abb7da916ae5088f6817e4eff8ea02c8c5803 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Factor out usage of a private symbol by the iOS platform plugin.Jake Petroules2016-02-193-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a link error due to symbol visibility when the iOS platform plugin is built as a shared library. Change-Id: I0b454c5c5033c6b598cede11ce5e3a85e5704c4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Remove unsued codeLars Knoll2016-02-181-130/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This section did set some canBuild* variables based on compiler checks. Apart from canBuildQtConcurrent, the variables never got used. In the QtConcurrent case, the answer will anyway always be yes, since we require a c++11 compliant compiler nowadays. Change-Id: I660b40e96a657f6fa4d32f6b680adf44e70509c9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Add a missing CFBundleIdentifier to library template.Jake Petroules2016-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This amends ade8e0fc9b216190328b6fd3375796e82e34c323, which missed this file. Task-number: QTBUG-32896 Change-Id: I39ef0969c0224349eda4ed82cae3e3b7753fe29f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Blacklist tzTest in openSUSE 42.1Tony Sarajärvi2016-02-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The test was already blacklisted in openSUSE 13.1 and was found not to work in 42.1 either. Task-number: QTBUG-51172 Change-Id: I9f8f7b2251a230596a25183dee04ed37824f8ad7 Reviewed-by: Akseli Salovaara <akseli.salovaara@theqtcompany.com>
* | | Blacklist tst_QStorageInfo::storageListTony Sarajärvi2016-02-171-0/+2
| |/ |/| | | | | | | | | | | | | | | A bad test that assumes hard disk being partitioned in a specific way Task-number: QTBUG-51174 Change-Id: Ic4d56fbd041444e00bd656372e9190ba07ff2704 Reviewed-by: Akseli Salovaara <akseli.salovaara@theqtcompany.com>
* | Better grouping of configure testsLars Knoll2016-02-161-111/+102
| | | | | | | | | | | | | | | | These tests are not required to build qmake, so move them together with the other tests. Change-Id: I191e7552e819e8d68a27da3ac1b5258d57145155 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Remove leftover from Symbian timesLars Knoll2016-02-161-6/+0
| | | | | | | | | | | | Change-Id: I8b61f327c038fa51935c9990adb8493f5477643f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Microoptimize QObject::activate.Milian Wolff2016-02-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes temporary variables that are not used in all cases. This reduces the instruction count per iteration for the corresponding benchmark by 1 or 2. Before: ********* Start testing of QObjectBenchmark ********* Config: Using QtTest library 5.7.0, Qt 5.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.0) PASS : QObjectBenchmark::initTestCase() PASS : QObjectBenchmark::signal_slot_benchmark(simple function) RESULT : QObjectBenchmark::signal_slot_benchmark():"simple function": 21.0065466 instructions per iteration (total: 210,065,466, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(single signal/slot) RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/slot": 405.0829559 instructions per iteration (total: 4,050,829,559, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(multi signal/slot) RESULT : QObjectBenchmark::signal_slot_benchmark():"multi signal/slot": 405.0812465 instructions per iteration (total: 4,050,812,465, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(unconnected signal) RESULT : QObjectBenchmark::signal_slot_benchmark():"unconnected signal": 104.0147348 instructions per iteration (total: 1,040,147,349, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(single signal/ptr) RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/ptr": 369.1021099 instructions per iteration (total: 3,691,021,100, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(functor) RESULT : QObjectBenchmark::signal_slot_benchmark():"functor": 370.0982862 instructions per iteration (total: 3,700,982,862, iterations: 10000000) PASS : QObjectBenchmark::cleanupTestCase() Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 6036ms ********* Finished testing of QObjectBenchmark ********* After: ********* Start testing of QObjectBenchmark ********* Config: Using QtTest library 5.7.0, Qt 5.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.0) PASS : QObjectBenchmark::initTestCase() PASS : QObjectBenchmark::signal_slot_benchmark(simple function) RESULT : QObjectBenchmark::signal_slot_benchmark():"simple function": 21.0061664 instructions per iteration (total: 210,061,664, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(single signal/slot) RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/slot": 403.0829161 instructions per iteration (total: 4,030,829,162, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(multi signal/slot) RESULT : QObjectBenchmark::signal_slot_benchmark():"multi signal/slot": 403.0836305 instructions per iteration (total: 4,030,836,305, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(unconnected signal) RESULT : QObjectBenchmark::signal_slot_benchmark():"unconnected signal": 104.0150038 instructions per iteration (total: 1,040,150,039, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(single signal/ptr) RESULT : QObjectBenchmark::signal_slot_benchmark():"single signal/ptr": 368.0981987 instructions per iteration (total: 3,680,981,988, iterations: 10000000) PASS : QObjectBenchmark::signal_slot_benchmark(functor) RESULT : QObjectBenchmark::signal_slot_benchmark():"functor": 369.1179429 instructions per iteration (total: 3,691,179,429, iterations: 10000000) PASS : QObjectBenchmark::cleanupTestCase() Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 5975ms ********* Finished testing of QObjectBenchmark ********* Change-Id: Iba3bffbca5b58109816c8b1a7dea0796b18c8785 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Share code between const and non-const QMetaObject::cast variants.Milian Wolff2016-02-161-8/+2
| | | | | | | | | | | | Change-Id: I7aad8e5060bb17ebc04fdb137dad3b6d167895a8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtConcurrentRun: add unittest for polling for isFinished()David Faure2016-02-151-0/+29
| | | | | | | | | | | | | | | | | | | | I had intermittent failures with this kind of code in my unittests, not sure why yet. This test seems to pass reliably, apart from helgrind saying it triggers the known race in QFuture::isFinished, for which Marc is working on a fix. Change-Id: I4aabe77566dc1af859a016ffe8a4cce19ddf25c8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QIcon::fromTheme(): add support for absolute paths.David Faure2016-02-152-0/+7
| | | | | | | | | | | | | | | | | | This allows methods that return an icon name, to sometimes also return an icon full path (e.g. because the icon was dynamically generated and stored into a local cache on disk) Change-Id: Ib01c3955f4b64236463846241d9814b2d0686634 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | tst_QTemporaryFile: test value of openMode() after open().David Faure2016-02-151-2/+3
| | | | | | | | | | | | | | | | I had a doubt about what it would be, turns out it's ReadWrite. Turns out it's documented, too :-) Change-Id: I87c2ffc81aa240ffa88c495fe250b022d7fb3c21 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QHttpNetworkConnectionPrivate: de-duplicate calls in if-else chainsAnton Kudryavtsev2016-02-151-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and loops. Every QNetworkConfiguration::bearerType() call produces lock/unlock of mutex. Fix: cache result. Every QHttpNetworkRequest::contentLength() call contains internal loop. Fix: cache result. Also cache results of QNonContiguousByteDevice::size() and QHostAddress::protocol(). Change-Id: I01124648b1972f480905433d9b3551c2246e1bde Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>