summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QDateTime - Store Qt::TimeSpec, remove Daylight StatusJohn Layt2013-09-142-102/+116
| | | | | | | | | | | | | | Change storing the spec from QDateTimePrivate::Spec to Qt::TimeSpec. Remove the storage and use of the Daylight Status as it is almost never set or used, and would be inaccurate if the tz were to change. It will be replaced later with proper daylight transition support. This simplifies the code and makes the msecs storage change easier. Change-Id: I78a70905025d7eddf1c2dc6001f6b490e5a2b3b8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Switch to using msecs based functionsJohn Layt2013-09-142-185/+29
| | | | | | | | | | | | | | | | | | | | | | A number of QDateTime functions directly use or modify the data stored in the private, but future changes to store msecs and status make this maintenance more complicated. Where possible simplify this code to use the standard msecs functions, standard constructors, or public api instead. This greatly simplifies the functions and the following msecs storage code changes. This is an intermim step towards storing the time in msecs. Some functions will be slower as a result of this change, optimization will take place after all the msecs changes are completed. Note this also removes a test that used valid QDates outside the range of msecs, this change in behavior will be documented in the final mscs change. Change-Id: I6ef710f24babc7024091010064082e9be0b5bbfe Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* ICC 13.0 supports atomicsThiago Macieira2013-09-141-0/+1
| | | | | | | See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler Change-Id: I45ba6aa640f82df4d06fd4412264892bfd58ffc3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Base64: Implement the "base64url" encoding and the stripping of '='Thiago Macieira2013-09-144-14/+116
| | | | | | | | | The "base64url" encoding is defined in RFC 4648, which is the newest version of Base64. There are also a few situations where the ending '=' is not desired. Change-Id: I9bb9fa55817b57d125189e4e795d6fde97caea6d Reviewed-by: Richard J. Moore <rich@kde.org>
* Whitespace: re-indent the {to,from}Base64 functionsThiago Macieira2013-09-141-44/+52
| | | | | | | | The code must have been copied from somewhere, a sample implementation. Change-Id: Ieb6ac5d69824fe8a3f38710a22beb79ac986e182 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-144-7/+7
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-134-7/+7
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| | * Fix the internal QDir sortingGiuseppe D'Angelo2013-09-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two items are equal according to the current sorting criterion, the sorting predicate uses the address of the items to break the tie. The problem is that the items themselves are being moved during the sort; therefore, this will break the Strict Weak Ordering that std::sort requires. For instance, suppose to be sorting case-insensitively the following array: ("b", "a", "A") Simulating a swapped-based sorting can lead to: Array before Evaluated predicate Array after ("b", "a", "A") "a" < "A" (1) ("b", "a", "A") ^ ^ ("b", "a", "A") "b" < "A" (2) ("A", "a", "b") ^ ^ ("A", "a", "b") "A" < "a" (3) (XXXXXXXXXXXXX) ^ ^ (1) True, because of the array ordering (they're equal otherwise) (2) False: swap them (3) True, because of the array ordering (they're equal otherwise) (1) and (3) say that "a" < "A" and "A" < "a", SWO gets violated, leading to undefined behavior. This problem was causing QFileSystemModel autotests failures (cf. [1]) after switching to STL algorithms instead of using qSort. The array to be ordered in that case is ("a", "c", "C"), cf. tst_QFileSystemModel::caseSensitivity. (STL algorithms are much smarter than good ol' quicksort in qSort; if we're ordering on an array which fits in a cache line, they turn to the much faster (~1 robe) insertion sort. Violating SWO with a quick sort usually just gets to a non-sorted container; insertion sort is implementable in ways that rely on SWO, otherwise they will overflow the iterator; cf. Cormen/Leiserson/Rivest and the other literature on the topic.) This commit reverts commit fa5f3a44 (in Qt 4). [1] http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_01749/linux-g++_shadow-build_Ubuntu_11.10_x86/log.txt.gz Change-Id: I5d8ac0d0907675c501717969abee2816b41eca18 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Fix a typo in documentationJędrzej Nowacki2013-09-101-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-33408 Change-Id: I84729139ff40ac62b29031eb161761a8205259cc Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| | * Correct type mismatches sentence in signals and slots documentation.Mitch Curtis2013-09-101-1/+3
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-15994 Change-Id: I19581ae33313de44bcb6e5eb2c06fc9e507ad101 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Doc: Fix copy+paste errors for QAbstractItemModelSze Howe Koh2013-09-081-3/+3
| | | | | | | | | | | | | | | Change-Id: Ia462544cc86870d9870ae1be3b4f9135c9efe45c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | QTime - Add public api for get/set msecs since start of dayJohn Layt2013-09-132-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new public api to get and set the number of msecs since the start of the day. Modify QDateTime to use the new msecs api. [ChangeLog][QtCore][QTime] Added new methods fromMSecsSinceStartOfDay() to create a new QTime from an msecs value, and msecsSinceStartOfDay() to return the QTime as the number of msecs since the start of the day. Change-Id: I285b725b883f1f5524fda87ca81bd64ed99fe6f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Add a static QFileInfo::exists(fileName) functionhjk2013-09-133-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids dynamic construction of the private class. According to the benchmark we go from 4,550 to 3,900 instruction reads per iteration. (without change 32629676 the baseline is 5,600) Change-Id: I5df925e30dbd49bdde87173e481820574ce5abe1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add a note on symlink behavior of QFile::existshjk2013-09-131-0/+3
| | | | | | | | | | | | | | | | | | Change-Id: I41ede0536f1b7093a7cde3d74a5e221df413aeea Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Optimize QBitArray::count(bool)Thiago Macieira2013-09-131-17/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since 76e0223619da02911d02813961ef631a5e02d826, qPopulationCount was extracted from QBitArray and moved elsewhere. That unfortunately meant that the 24-bit loads are completely useless, since qPopulationCount always operates on 32 bits. Instead, do a full loop on 32-bit and then do 16-bit and finally 8-bit (for which there are qPopulationCount overloads). Change-Id: If945609f075095257d12877c39434909ac190e54 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | MetaType: Fix operator{+,-}(int) with the type-erased const_iterators.Stephen Kelly2013-09-132-4/+32
| | | | | | | | | | | | | | | | Make sure we don't modify the lhs. Instead copy it and advance the copy. Change-Id: I3440e8e175bfc299f8f83b816faca54fa3f79e43 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove some unneeded constructors.Stephen Kelly2013-09-131-11/+3
| | | | | | | | | | Change-Id: I34f86960dc0cfaada509957bca5466b2765e8239 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix typo in note on symlink behavior of QFileInfo::existshjk2013-09-131-2/+2
| | | | | | | | | | Change-Id: Iacd957cd9cd04e9153efd826bb42d872f8963f75 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Remove Q_PACKED from structures that do not need to be packedThiago Macieira2013-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These structures do not need to be packed. With some compilers, Q_PACKED was defined to be empty, which means that the code was working fine without packing. Or there were some lingering problems on those platforms (MSVC) and we're now exposing them in all platforms. Actually, it shouldn't be a problem anywhere. QCharAttributes, quint24 and QFontEngineQPA::Glyph have only char/uchar members, so they're packed already (they have alignof == 1). The only platform where that wasn't true was ARM OABI, which we don't support anymore. QFontEngineQPA::Header seems to always come from a QByteArray, so it doesn't neeed to be packed either. However, just to be sure, I'm inserting a check for alignment. And QFontEngineQPA::Block isn't used anywhere. Change-Id: Iacfa25edf336ef2a03aeb6e40ae90937a21661ae Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Remove the empty definition of Q_PACKEDThiago Macieira2013-09-131-3/+0
| | | | | | | | | | | | | | | | | | | | Structs defined with Q_PACKED *need* to be packed in all platforms. Having an empty define means errors might go unnoticed for a long time. Change-Id: I9c388358fed27a8e018465f05375e4bbbee3484c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove Q_NO_PACKED_REFERENCEThiago Macieira2013-09-131-2/+0
| | | | | | | | | | | | | | | | Leftover. It's not used anywhere. Change-Id: I023a390d84c9ed5dacd2699145f183e8a2317153 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove redundant checks in some tools classesJędrzej Nowacki2013-09-134-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simple optimisation allowed to us by the fact that all platforms we run on use two's complement for the signed integers. The trick works as long as one of the two signed integers is known beforehand to be non-negative: - by definition, for any signed integer i, i <= INT_MAX - by definition, for any unsigned integer u, u >= 0 - given a signed integer x >= 0, 0U <= uint(x) <= uint(INT_MAX) - therefore, given another signed integer y of whatever value, uint(x) < uint(y) ←→ x < y && y >= 0 The trick is an optimisation because the compiler doesn't know that one of the two sides is always non-negative. Otherwise, it would do the same optimisation. Change-Id: If256ec0df4e06335805af8010bb67ce5fd3e065a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add assert if a global static is used after deletion.Jędrzej Nowacki2013-09-131-2/+10
| | | | | | | | | | | | | | | | | | Q_GLOBAL_STATIC accessor is documented to return dangling pointer if called after destruction. Change-Id: Ieafd5619b20ad256d9d5ad007d939f1430ef681f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix new warnings under Clang 3.3Thiago Macieira2013-09-131-34/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probably added by a1898f4466518bf3e1b6e9154eec05ecf9d909e3. qmetatype.h:70:29: error: inline function 'qMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>' is not defined [-Werror,-Wundefined-inline] qmetatype.h:1363:30: note: used here const int toId = qMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>(); qmetatype.h:70:29: error: inline function 'qMetaTypeId<QtMetaTypePrivate::QAssociativeIterableImpl>' is not defined [-Werror,-Wundefined-inline] qmetatype.h:1386:30: note: used here const int toId = qMetaTypeId<QtMetaTypePrivate::QAssociativeIterableImpl>(); Change-Id: I9afe1a3d50ab23eb701797e28b259966dc95a147 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Make QCollator more flexible to use in different platformsAleix Pol2013-09-138-214/+838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we've known that we want QCollator as public API. It hasn't been possible yet due to the strong dependency that QCollator used to have on ICU. This patch adds collation support for the platforms where ICU is not the best option by using native collation API. Namely Windows and Mac OS X. Additionally a fallback POSIX back-end is added, so that we can make sure it will work on any posix-compliant platform. Change-Id: Ia1734acbf5f596698a81f2af927cc15636e4c908 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Refactor QCollator to be able to use it in different platformsAleix Pol2013-09-132-256/+144
| | | | | | | | | | | | | | | | | | Propose the API to be changed so that we can implement QCollator in the different platforms where Qt is available. Change-Id: I7b3e933d7e3d1aa26c1b78d21ef75b71c692827f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make the QCollator class publicLars Knoll2013-09-134-19/+26
| | | | | | | | | | | | | | | | The class missed the feature freeze for Qt 5.0, but has been ready for quite a while. So make it public in time for Qt 5.2. Change-Id: I9ac3f579ff5e371925fad40684762fff7ee4abd8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove qCopy from QCoreApplicationGiuseppe D'Angelo2013-09-121-1/+3
| | | | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I3ae7f8331440241d524844eb387d956c64ab62e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add a convenient way to get a type-erased smart pointer from a QVariant.Stephen Kelly2013-09-113-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | Any known smart pointer in a QVariant can be handled in this way. The metatype system can be informed of new smart pointer types using an existing macro which is now documented. This is very similar to the existing infrastructure for containers. Change-Id: Iac4f9fabbc5a0626c04e1185d51d720b8b54603d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove qSort from QVariantAnimationGiuseppe D'Angelo2013-09-111-1/+1
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ife76c249eb950e976c626acebbe00372ffc70df9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove qSort usages from statemachinesGiuseppe D'Angelo2013-09-111-2/+4
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I6edaafa75348a4e8795c3e29eeea9c45c178b621 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove qCopy from QLinkedList / QVectorGiuseppe D'Angelo2013-09-112-4/+6
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I5f7c2a6b3588a07113061c018e2870f476bea5a7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | New QStringRef methods.Jędrzej Nowacki2013-09-112-1/+76
| | | | | | | | | | | | | | New functions left, right, mid were missing in the api. Change-Id: I3590a84431555d009d5012b204c111385bdceed3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl: ensure that setPath("//path") doesn't lead to scheme://pathDavid Faure2013-09-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | which would interpret 'path' as a hostname. The check is in the public setPath so that the internal one can still support parsing URLs such as ftp://ftp.example.com//path. [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now normalizes the path given in setPath, removing ./ and ../ and duplicate slashes. Change-Id: I05ccd8a1d813de45e460384239c059418a8e6a08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-104-6/+13
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-074-6/+13
| |\| | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Compile in strict-iterator mode under MSVCThiago Macieira2013-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC doesn't like operator->() returning a pointer to non-aggregate. So we must make sure that the expanded code does not try to call it by doing: abegin->~T(); Instead, we make an implicit call to operator T*() with that static_cast<T* >. If abegin is a non-strict iterator, it's already a T*, so the static_cast is a no-op. qvector.h(645) : error C2839: invalid return type 'int *' for overloaded 'operator ->' Change-Id: I06f983bab7677cb60ef3913cdce349e26896bfb6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Remove the size limit of QByteArray information.Leonard Lee2013-09-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information is explaining implementation details rather than on how to use it effectively. The size limit of QByteArray may vary depending on available memory. Task-number: QTBUG-33037 Change-Id: I361316422ade3624a0c2864d93f87caeb654f4d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QMetaMethod::invoke: compare the QMetaType id of the return typesOlivier Goffart2013-08-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt5, the QMetaObject do not contains the string name of the builtin types, but only the QMetaType id. QMetaMethod::typeName convert back from the id to the string. But if the type is aliased, the string of the main type is returned. This was the case for example for qint64 which is transformed to "qlonglong". This causes a regression in QMetaType::invoke when trying to invoke a method which return an aliased type, since the string comparison would fail. Fix the problem by also comparing the metatype id. Changelog: QMetaMethod::invoke: Fix return of aliased meta type Task-number: QTBUG-33222 Change-Id: Iec7b99dcbf7b23eb818de74f413e4451ce510ac4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| | * Windows: Fix compilation with MinGW-64, gcc 4.8.1Friedemann Kleint2013-08-291-1/+5
| | | | | | | | | | | | | | | | | | | | | A definition for FILE_ID_128 was added. Change-Id: Ifdfe5da1b15a90afdf5cf09d92838a04b1cf5c19 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | QCommandLineParser: improve implementationDavid Faure2013-09-102-20/+21
| | | | | | | | | | | | | | | | | | | | | Based on feedback from Thiago. Change-Id: I9a3ce0b90b5d1d680c66351d421874effbd426f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QCommandLineParser: improve documentationDavid Faure2013-09-104-70/+171
| | | | | | | | | | | | | | | | | | | | | Based on feedback from Thiago Change-Id: I8912447197e636732e5b8ac37e77d18b54e9b43d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QCommandLineOption: improve runtime warningsDavid Faure2013-09-101-5/+5
| | | | | | | | | | | | | | | Change-Id: I48a278acf3a8eb0cfa829deb65cf65dfd8ec23af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix escape handling in qWinCmdArgsDavid Faure2013-09-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -DKEY="VALUE" was correctly turned into -DKEY=VALUE, but -DKEY=\"VALUE\" was turned into -DKEY=\VALUE" due to the erroneous check ('quote' is still 0 when encountering the first '\' character). This fixes QCoreApplication::arguments() as used by moc.exe after porting to QCommandLineParser. Further investigation shows that double-quotes and single-quotes are handled differently. The tests now ensure that this parser respects what Windows sends in argv, and in particular that QTBUG-15379 doesn't regress, as well as fixing QTBUG-30628. Task-number: QTBUG-15379, QTBUG-30628 Change-Id: I95062c9a6022632b321b2f6fae3089f07be7b5c6 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add missing interpolator for unsigned int.Jan Arve Saether2013-09-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that there are also some missing interpolators for char, short, long long etc, but those are most likely less common than unsigned int. Task-number: QTBUG-33268 Change-Id: I469cc4f38eaa48171307b737b15efea2cd98fe5e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Deprecate QFontDatabase::supportsThreadedFontRendering()Konstantin Ritt2013-09-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | As of 5.0, this always return true. Change-Id: If225c7219e283da97e870f0d66a87b21c3cacfc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Add detection for C++11 explicit conversion operators.Marcel Krems2013-09-091-0/+5
| | | | | | | | | | | | | | | Change-Id: Ib33049b538f072079c0f840bc10adf0899217199 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Normalise and deduplicate paths for XDG_DATA_DIRSMartin Klapetek2013-09-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the trailing slashes from the path and then removes dirs set twice in XDG_DATA_DIRS (always removes those from the right side). There's no use for duplicit dirs in XDG_DATA_DIRS because if whatever is being looked up is not found in the duplicated dir the first time, it won't be there the second time. Currently it causes troubles for example in mime types, where it returns duplicated mime types as the same dir is searched multiple times. For obtaining the original value of XDG_DATA_DIRS, one can use qgetenv("XDG_DATA_DIRS"). Change-Id: Ic4f8ef6c6fe096555948e318899207e9d4ca8289 Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
* | | Remove qCopy usages from QListGiuseppe D'Angelo2013-09-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ib667321884b2f06de6f440f2b8e329361f926ce1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Metatype: Remove the need for runtime-registration of 3rd party containers.Stephen Kelly2013-09-093-100/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace that need with a macro so that registration of the container helper conversions is done at the time of registration of the container (usually when it is put into a QVariant). Change-Id: I823fb3fdbce306ebc9f146675ac43724cec678d5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>