summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* QPair: add constexpr liberallyMarc Mutz2014-08-091-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | On templates, adding constexpr makes a given instantiation constexpr if it can be. This turns qMakePair(0,0), say, into a compile-time constant. The effects on existing code are small, but exist: $ size lib/*{-baseline,-paircexp} | sort -nr 6516727 211192 2608 6730527 66b31f lib/libQt5Widgets.so.5.4.0-baseline 6516711 211192 2608 6730511 66b30f lib/libQt5Widgets.so.5.4.0-paircexp 5373720 44492 15976 5434188 52eb4c lib/libQt5Core.so.5.4.0-baseline 5373504 44492 15976 5433972 52ea74 lib/libQt5Core.so.5.4.0-paircexp 5107206 125072 6080 5238358 4fee56 lib/libQt5Gui.so.5.4.0-baseline 5107030 125072 6080 5238182 4feda6 lib/libQt5Gui.so.5.4.0-paircexp 1341290 30180 2600 1374070 14f776 lib/libQt5Network.so.5.4.0-baseline 1341210 30180 2600 1373990 14f726 lib/libQt5Network.so.5.4.0-paircexp # no other libraries benefit [ChangeLog][QtCore][QPair] Can now be used in C++11 constexpr contexts. Change-Id: I3872e6aa33a7d02a168516f4dfa7119efcac8c40 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QStringRef: add missing \since 5.4Marc Mutz2014-08-091-0/+4
| | | | | | | | | {,c}{begin,end}() were added post-5.3, in 1a6f490b, but weren't marked with \since 5.4. Add it. Change-Id: Ide743833144f784c7d09b125e7a22f9b184ed823 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Move the special QByteArrayList methods into QListThiago Macieira2014-08-094-267/+33
| | | | | | | | | | | | | | | | | | | | | | | and make QByteArrayList be a simple typedef. As a side-effect, the constructor taking a QByteArray is no longer available since I couldn't find a way to add it to QList<T> when T is QByteArray. My template-foo failed me. I tried: - QEnableIf<is_same<T, QByteArray>::value, QByteArray>::type => makes QList fail to compile for any T that isn't QByteArray - make the constructor a template member => it compiles if the parameter is a QByteArray, but not a const char[4] like the test was - inheriting constructors => runs into ICC and Clang bugs that I could not work around Besides, the constructor with std::initializer_list is a superior solution anyway. Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Long live QByteArrayList!Glen Mabey2014-08-093-0/+482
| | | | | | | | | | | Initial submission of a new class QByteArrayList with the purpose of aggregating and then joining QByteArray instances. [ChangeLog][QtCore] Added new QByteArrayList class. Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: I503af58f125d7f44fef10360177490c933e5840f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Long live QVersionNumber!Keith Gardner2014-08-093-2/+689
| | | | | | | | | | | | The class provides compare operators, stream operators, and hashing functions. This class aims to be compatible with (but not restricted to) the Semantic Versioning 2.0 standard (semver.org). [ChangeLog][QtCore] Added QVersionNumber class Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: I244c8ccc002909af03987a2df052734d1a8621a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add some missing STL typedefs and functions to QStringRef and QByteArrayThiago Macieira2014-08-084-0/+80
| | | | | | | | | These will be needed in some template code that is to come. Change-Id: I5b93f4320313f7b15a6404de2c98f85485735fda Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Add missing #include <qdatastream.h> or <qiodevice.h>Thiago Macieira2014-08-074-0/+4
| | | | | | | Lots of code depended on an indirect includes from qstringlist.h. Change-Id: I33d0dce33d64302d6c0e49180cc1249b90ab27c5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QCommandLineParser: support extremely concise option configuration in C++11Marc Mutz2014-08-064-2/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this commit to make the code in the test work: QCommandLineParser parser; parser.addOptions({ { "a", "The A option." }, { { "v", "verbose" }, "The verbose option." }, { { "i", "infile" }, "The input file.", "value" }, }); For this, QCommandLineParser needs a version of addOption that can take a list of options. That's what addOptions() is for. More importantly, the QCommandLineOption ctors mustn't be explicit. OTOH, any implicit conversion from QString or QStringList to QCommandLineOption is also undesirable. To solve this dilemma, add new QCommandLineOption ctors that just take one argument and are explicit, and make the existing ctors implicit. In order to avoid ambiguities, remove the default values of their resp. 2nd arguments. The new ctors are by intention not \since 5.4, as they are completely transparent to the user. Et voila, even better than getopt_long(3). [ChangeLog][QtCore][QCommandLineParser] Added addOptions() method. Change-Id: I5e779f3406cd0f6c8ec6ecbf6c8074af226de300 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QStringRef::splitJędrzej Nowacki2014-08-062-2/+38
| | | | | | | [ChangeLog][QtCore] Added the QStringRef::split() function Change-Id: I28709c9761785dea7be4e7d621ecf4e1ae007a72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the last remnants of iWMMXt in QtThiago Macieira2014-08-052-39/+7
| | | | | | | | This code hasn't been tested for at least 4 years. It's not maintained and probably doesn't work. Change-Id: I4b9a5179e34111b400914f91caa6b741b69771bb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: normalize the {to,from}WCharArray text about encodingsThiago Macieira2014-08-051-4/+4
| | | | | | | | | | Properly capitalize the names UTF-16 and UCS-4 and make sure we talk about UTF-16 and not UCS-2. UCS-2 is not the same and does not support surrogate pairs. Task-number: QTBUG-35287 Change-Id: If33270996bacc9ae5d04c87423fa1ee9ddaff230 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Add a few missing Neon constructsThiago Macieira2014-08-051-7/+6
| | | | | | | | | | | The #undef in qcompilerdetection.h was missing. And apparently we can detect Neon since Windows Mobile 6 too. Change-Id: I38a5f71b2704a29a706183e39f43db3a78a729db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QList: Fix MSVC 64bit warning about loss of data.Friedemann Kleint2014-08-051-1/+1
| | | | | | | | qlist.h(133) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data qlist.h(131) : while compiling class template member function 'QList<QString>::QList(std::initializer_list<T>)' Change-Id: I8a11e298cd10da199490fbd8b269405a9e1cf5f3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QList: add missing reserve() call in the initializer_list ctorMarc Mutz2014-08-031-1/+1
| | | | | Change-Id: Idc46a347009556d06db4bc1f7ce3e2613fb1a405 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QTimeZone: optimize QTimeZonePrivate::isValidId()Marc Mutz2014-07-311-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is used in the named timezone ctor and was using QByteArray::split(), followed by size checks and a linear scan for invalid chars per section. The use of split() resulted in a lot of memory allocations and, unsurprisingly, bad performance. The new code just performs one linear scan through the byte array, calculating section sizes on the fly. Benchmark results (with the test data in tst_QTimeZone::isValidId_data()) show typical speedups of ~10x for valid IDs: RESULT : tst_QTimeZone::isValidId_bench():"minimal middle": - 0.00036 msecs per iteration (total: 95, iterations: 262144) + 0.000035 msecs per iteration (total: 74, iterations: 2097152) Even in the sweet-spot case of the old code---a space character anywhere in the string, checked for before the split---the new code is anywhere between slightly faster and not much slower: RESULT : tst_QTimeZone::isValidId_bench():"invalid char ' ' front": - 0.000011 msecs per iteration (total: 94, iterations: 8388608) + 0.000010 msecs per iteration (total: 86, iterations: 8388608) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ' ' middle": - 0.000014 msecs per iteration (total: 62, iterations: 4194304) + 0.000016 msecs per iteration (total: 69, iterations: 4194304) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ' ' back": - 0.000018 msecs per iteration (total: 79, iterations: 4194304) + 0.000023 msecs per iteration (total: 98, iterations: 4194304) This is not surprising, as the space character was singled out for a fast-exit check before. For any other invalid character, the new version is anywhere from 15x to 35x faster: RESULT : tst_QTimeZone::isValidId_bench():"invalid char ? front": - 0.00034 msecs per iteration (total: 91, iterations: 262144) + 0.000010 msecs per iteration (total: 87, iterations: 8388608) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ? middle": - 0.00036 msecs per iteration (total: 96, iterations: 262144) + 0.000016 msecs per iteration (total: 68, iterations: 4194304) RESULT : tst_QTimeZone::isValidId_bench():"invalid char ? back": - 0.00035 msecs per iteration (total: 94, iterations: 262144) + 0.000021 msecs per iteration (total: 92, iterations: 4194304) If there was a deeper reason to single out the space character, that fast-exit path can easily be restored. This function is often used in conjunction with availableTimeZoneIds(), which currently vastly dominates the runtime of the function calling both, but I'll add another optimization for the common use-case of just checking for a time-zone's existence in a subsequent commit. Change-Id: Ife1d096fcd39464083ea464c23e49ad98fabf345 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add ascii_isspace to replace the locale-dependent isspace(3)Thiago Macieira2014-07-313-10/+37
| | | | | Change-Id: Icee42515179e6f3ddefe0692af69e90054449618 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QString::splitRef functions.Jędrzej Nowacki2014-07-312-0/+75
| | | | | | | | | | | | The functions can be used to optimize code that do not need to use the split results as QString directly. [ChangeLog][QtCore] QString can now split a string to a list of QStringRef. Change-Id: Ic2dc929e1fba82f9a060e37c51068a301cb5b866 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use an enum to check that the OS is saving the register stateThiago Macieira2014-07-311-1/+18
| | | | | | | | | | | | It's easier to read AVXState and AVX512State than 6 and 0xe6. Also add a note that where we should have checked whether the SSE state is being saved by the OS. However, we won't do it because it's just a waste of CPU cycles: any OS Qt 5 runs on will enable the proper state-saving. Change-Id: Id87b59fe1388a6cab983c9412341e36a86dd15c5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-301-1/+1
|\
| * Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
| | * Use the stateless UTF-8 encoder in QStringRef::toUtf8Thiago Macieira2014-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QString::toUtf8 already does it. I guess I forgot to update this part in d51130cc3a00df8147e2eb0799e06865c901c6e0. Change-Id: I83feafcb0383758f7e64d5142f57a7ae6a2ff351 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Fix QByteArray::to{Upper,Lower} when the array contains embedded nullsThiago Macieira2014-07-301-2/+4
|/ / | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QByteArray] Fixed a bug that would cause QByteArray to stop converting toUpper or toLower at the first embedded null character. Change-Id: Ia369037206617813d86a8f1489589243c82aa51b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Don't track the sharable bit upon detachJoão Abecasis2014-07-281-4/+0
| | | | | | | | | | | | | | | | | | | | "Unsharables", given they can't be shared, don't need to detach, so skip the check altogether and don't try to propagate the flag. It shouldn't be. Change-Id: Icc483401d5a57708b43d64bd3cebc66c6b934815 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Refactor QString::split functions.Jędrzej Nowacki2014-07-281-57/+73
| | | | | | | | | | | | | | | | Implementation of the functions were moved to templatized helper functions that will be shared with QString::splitRef in future. Change-Id: Ie25fab57f77f5ceb11ced26ab7e7f86739f4c78b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Ensure mutating operations are NOT performed on immutable dataJoão Abecasis2014-07-281-0/+16
| | | | | | | | | | | | | | | | | | | | | | "Static" and "raw" data are immutable and shouldn't be modified from within the QArrayData API. Adding the asserts here gives us a basic safety net. Change-Id: Ie2fec03fa1ef5a7f73c50e5badf8b8ab863728b4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove non-existing function.Thiago Macieira2014-07-251-1/+0
| | | | | | | | | | Change-Id: I1c201453d069dbc3d981e1ff3789570af09b662c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Use simd.prf for building MIPS DSP codeThiago Macieira2014-07-251-0/+1
| | | | | | | | | | | | | | | | No need to duplicate the extra compiler code. Change-Id: Ic5656d2f4500c19e0428a7eec1cbcef6c353e99b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Reduce QtCoreLib size by not repeating "UTC" string too often.Jędrzej Nowacki2014-07-255-10/+21
| | | | | | | | | | | | | | | | It is a minor reduction, in release build it is ~200 bytes Change-Id: I4f7972c95769f2e0ca1ddc935ff7a0a6b4379e2a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Re-implement QVector::countJoão Abecasis2014-07-251-7/+1
| | | | | | | | | | | | | | | | | | | | There is no need for a custom algorithm as we can use std::count Change-Id: Id1ab514c7cd8f52efe49b27712121415d7ca4455 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QRegularExpression: make optimize() constGiuseppe D'Angelo2014-07-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Although it may seem strange that such a method is const, optimizing doesn't affect the user-visible part of the object. Moreover, *not* having it const makes it asymmetrical with other methods (such as match()) which are const, and under certain conditions optimize as well. Change-Id: I0cd8d4a6909d00629fcc65c1c3a1f011f31db782 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Rewrite QRingBufferAlex Trotsenko2014-07-241-191/+88
| | | | | | | | | | | | | | | | | | QRingBuffer is a fully inlined class used in many I/O classes. So, it must be as fast and small as possible. To this end, a lot of unnecessary special cases were replaced by generic structures. Change-Id: Ic189ced3b200924da158ce511d69d324337d01b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Document that qHash(T) must be in T's namespace, due to ADLThiago Macieira2014-07-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Due to C++'s rule of Argument-Dependent Lookup, a call to an unqualified qHash(t) will look up qHash in T's namespace. So edit the docs saying that it must be "global qHash" to say that it should be in the type's namespace. Task-number: QTBUG-34912 Change-Id: I7a72800008ccb710b4bb814e42db7a95f385f53e Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Make QRingBuffer::append() not leave empty arrays in buffer listAlex Trotsenko2014-07-231-3/+7
| | | | | | | | | | Change-Id: I4c5af33488a70996299289ec2b953b7bf3b2c428 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QRingBuffer: purge unused part of the apiAlex Trotsenko2014-07-181-33/+0
| | | | | | | | | | | | | | Remove unused and untested class functions. Change-Id: I8eb963db0ae4be9b5cdde91f6747c4a1db4ea649 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Speedup qDebug() << QDate(...)Jędrzej Nowacki2014-07-141-1/+1
| | | | | | | | | | | | | | We really do not need to do string parsing there. Change-Id: Ie2277d9ff0d0445285b7108023941af111d9baca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Revert "QRegularExpression: lock a mutex only if there's actual work to do"Giuseppe D'Angelo2014-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | Blunder -- two threads may step into this method together, both see not studied, and both study (with one leaking its study data). This reverts commit 5fbd787cf9a72621d66604a4898f06ea4365226e. Change-Id: Ia746925abcad1e43adf4f6f1d495b018de022b07 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Make QExplicitlySharedDataPointer<T> copy-ctor from QESDP<X> more safeKevin Funk2014-07-092-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With "QExplicitlySharedDataPointer::QExplicitlySharedDataPointer( const QExplicitlySharedDataPointer<X> & other)" implicitly doing an static_cast<T *>(...) on other.data(), this could lead to dangerous use of this copy constructor. Example code: QExplicitlySharedDataPointer<Base> base(new Base); QExplicitlySharedDataPointer<Derived> derived(base); // that works! This patchs disables the use of the static_cast, and adds a new define called QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST to re-enable that code path. Note, that the other way-around (assigning 'derived' to 'base') still works as intended. Other side note: QtXmlPatterns is relying heavily on the hidden static_cast "feature". The other default Qt modules compile fine with the static_cast removed. [ChangeLog][Important Behavior Changes] QExplicitelySharedDataPointer's copy constructor which performs a static_cast from "X *" to "T *" (when constructing a QExplicitlySharedDataPointer<T> from a QExplicitlySharedDataPointer<X>) doesn't perform a static_cast from "X *" to "T *" any more. Instead, an implicit cast is now performed. This change will break compilation of code that relied on the downcast (i.e. cast towards a more derived type) of the templated type when copy costructing a QExplicitelySharedDataPointer object. Please refer to the class documentation for more information about this issue and a workaround to keep old code compiling. Change-Id: Id32aba6cda4e6d44728d7bc3a5c0c7a20f19adc6 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove QHashDummyNode and avoid undifined behaviorOlivier Goffart2014-07-081-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | A lot of code in QHash is doing casting to QHashNode while the pointer may be of type QHashDummyNode. This is a lot of undefined behavior. Remove QHashDummyNode and specialize QHashNode for QHashDummyValue instead. QHashDummyValue is the only type for which QTypeInfo::isDummy is true. Q_DUMMY and QTypeInfo::isDummy are internal API, so is QHashDummyNode, so we can remove them. Task-number: QTBUG-40029 Change-Id: I60c2ff0933075b9202bde89a9992746052f75133 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't look up a QChar's digit value more than necessaryThiago Macieira2014-07-071-5/+8
| | | | | | | | | | | | | | | | | | | | It isn't a particularly complex operation, but why waste CPU cycles? This is the kind of function that should be declared pure/const. Change-Id: I13f03ef0f87607f7649c66beeb37614a31ef2a10 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Mark all QChar static functions as [[gnu::const]]Thiago Macieira2014-07-073-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC documentation says that a const function is not allowed to read global memory. This needs to be clarified: it's not allowed to read RW global memory. It's fine to read read-only memory, as that is equivalent to just pure code. The QChar static out-of-line functions only lookup a property of the given Unicode character and always return the same value. The only exception is the decomposition() function, which returns a QString and is therefore not allowed to be marked const. Change-Id: Id36b2f84a1b8ff9db5acf1d4e59e8b3811068cff Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Tidy up and expand QSharedPointer documentation.Mitch Curtis2014-07-031-3/+24
| | | | | | | | | | | | | | | | Also adds the 5.4.0 changes file. Change-Id: I10967ca179b91229e7d1ee0fc666bbd8dbe54425 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-016-11/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Doc: Fix typo in QScopedValueRollbackKevin Funk2014-06-301-1/+1
| | | | | | | | | | Change-Id: I9835b284d6bba5f7632cae6b179c6c1b08265e5c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix QRingBuffer::readPointerAtPosition()Alex Trotsenko2014-06-241-1/+1
| | | | | | | | | | | | | | Fix condition to allow return a valid pointer when head != 0. Change-Id: I5215f7dfc44924016c2d9b67ab2d9935b5164d7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Fix compilation with the Intel compiler on certain systemsThiago Macieira2014-06-191-1/+3
| | | | | | | | | | | | | | | | We require the intrinsics from immintrin.h, so include it unconditioanlly with that compiler. Change-Id: I4a17676631f9d89e2d22e486f40c9b177ca06c1e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix case insensitive comparisons using QCollatorLars Knoll2014-06-122-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | In ICU the strength parameter decides whether a comparison is case sensitive or not. Fix mac comparison code. It can't have worked before. Added some basic automated testing for QCollator. Change-Id: I2646c464fd22ccd3a93c461fa3dba4bd1d4c7b4b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Fix documentation about QStringLiteralKai Koehne2014-06-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The fallback for QStringLiteral in case C++11 features are not enabled is QString::fromUtf8(), not QLatin1String(). Also, the result of a QStringLiteral expression _is_ a QString. Change-Id: Ib9c2f4c13fff237de3acb2e0f64027bacea6271c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QFreeList constexprThiago Macieira2014-06-301-2/+2
| | | | | | | | | | | | | | It's still not a literal type because the destructor is not constexpr Change-Id: If89bdfdd3f0ffe9bdd5a7953e872e520e92cfd66 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | qHash overload for Q{Explicitly,}SharedDataPointerKevin Funk2014-06-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interestingly, before that patch this compiled fine: typedef Q{Explicitly,}SharedDataPointer<QSharedData> Ptr; Ptr p(new QSharedData); auto hash = qHash(p); This was because both Q{Explicitly,}SharedDataPointer overload 'operator bool()' => qHash(int) was accepted. This, however, doesn't make sense. Someone should probably take care of applying the safe bool idiom to these classes as well. Change-Id: I8bb6b2aacaa6166da817a6f3847093fd20a05a67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add QEnableSharedFromThis classRoman Pasechnik2014-06-293-0/+103
| | | | | | | | | | | | | | | | | | It enables you to get a valid QSharedPointer instance to 'this', when all you have is 'this'. Task-number: QTBUG-7287 Change-Id: I3ed1c9c4d6b110fe02302312cc3c4a75e9d95a0c Reviewed-by: Richard J. Moore <rich@kde.org>