summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* QTimeZone - Add TZ File BackendJohn Layt2013-09-224-3/+1006
| | | | | | | | | | Add a backend for TZ Files. If available uses ICU for the display names and translations, otherwise the abbreviation is used. Change-Id: I58c777462810b1a76ea7bd95886836b70b8a3db5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add ICU supportJohn Layt2013-09-224-1/+561
| | | | | | | Add ICU backend for QTimeZone Change-Id: I92e53a848477e366591102064b093e936f0b49d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Define new class and apiJohn Layt2013-09-226-0/+3029
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the new QTimeZone class based on the Olsen Time Zone ID's. This is the base implementation and does not include the Platform backends which are implemented separately. This change does include a default UTC backed to be used if no Platform backend is available, i.e. if QT_NO_SYSTEMLOCALE is set and ICU is not configured. This backend also provides a default set of time zones in the standard "UTC+00:00" offset format that are guaranteed to always exist regardless of the Platform backend. This change includes conversion functions between the Olsen ID's and Windows ID's using a conversion table based on Unicode CLDR data. This is implemented for all platforms for scenarios such as a Linux program needing to communicate with a Windows Exchange Server using the Windows ID. The CLDR conversion table is included under the UNICODE license, see http://unicode.org/copyright.html for details. [ChangeLog][QtCore][QTimeZone] Added new QTimeZone class to support time tone calculations using the host platform time zone database and the Olsen time zone ID's. Change-Id: Ibb417d08cf2663a0979d2be855d2c6ad6ad01509 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some doc errors.Frederik Gladhorn2013-09-213-2/+3
| | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Mark most of the contents of QtAlgorithms as deprecated.Robin Burchell2013-09-212-93/+223
| | | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ic31c052e7f35c576250bf11826ca82e371142c82 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add Mac type conversion functions to QtCoreMorten Johan Sørvig2013-09-214-2/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New API: static QString QString::fromCFString(CFStringRef string); CFStringRef QString::toCFString() const; static QString QString::fromNSString(const NSString *string); NSString *QString::toNSString() const; static QUrl QUrl::fromCFURL(CFURLRef url); CFURLRef QUrl::toCFURL() const; static QUrl QUrl::fromNSURL(const NSURL *url); NSURL * QUrl::toNSURL() const; Add Q_OS_MAC-protected function declarations to header files, add implementation to _mm files. CF and NS types are forward-declared in the header files to avoid including the CoreFoundation and Foundation headers. This prevents accidental use of native types in application code. Add helper macros for forward- declaration to qglobal.h Add cf_returns_retained/ns_returns_autoreleased attributes to toCFString() and toNSURL(). These attributes assists the clang static analyzer. Add Q_DECL_ helper macros to qcompilerdetection.h. Add test functions (in _mac.mm files) to the QString and QUrl tests. Split out the test class declarations into a separate headers files. Change-Id: I60fd5e93f042316196284c3db0595835fe8c4ad4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-211-7/+4
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-09-161-7/+4
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
| | * Doc: Fix copy+paste errors in the QString class refSze Howe Koh2013-09-141-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | Also bring text closer to the style guide at http://qt-project.org/wiki/CppDocumentationStyle Change-Id: I30b1c36ac125a10c002efeb36978ced0d7a8f8bf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | | Remove qBinaryFind usages from bootstrapped filesGiuseppe D'Angelo2013-09-202-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I492b49553bc889892f5ca0c47aa13c75e11518e2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | QLinkedList: implement missing initializer_list ctorMarc Mutz2013-09-202-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Found by tst_QLinkedList once compiled in C++11 mode. Change-Id: Idbf79d775c5271437dbb99c1c8cc7a2e8a7f08bf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | QDateTime - Move some code aroundJohn Layt2013-09-201-231/+229
| | | | | | | | | | | | | | | | | | | | | | | | Move some of the static helper and private functions to better organize the code. No code actually changed. Change-Id: I6d5dd6bcb9fc5af56d2dbe9e53bc9f0a000c4fa4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Add api for isDaylightTime()John Layt2013-09-202-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new method to return if the current time is Daylight Time. [ChangeLog][QtCore][QDateTime] Added new method isDaylightTime() to return if the datetime is in Daylight Time or not. Change-Id: Icb93fd5dd0b2f7d83d2d4643eeb12922c1137e3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Change serialise formatJohn Layt2013-09-201-28/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the datetime serialisation from using QDateTimePrivate::Spec to using Qt::TimeSpec. Only public classes and enums are now used to serialise, making the format safer.. Clean up the code to make each version clearer, this duplicates some code but is easier to read and support. Change-Id: I3d8fc05f50f8e8acb9edbb992e5ce06063654b8e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Fix Daylight Transition for "missing" hourJohn Layt2013-09-202-31/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Daylight Time transtion goes from Standard Time to Daylight Time there is a "missing" hour, i.e. at 2am CET the clock goes forward to 3am. Currently QDateTime ignores this gap and considers the time to be valid and able to be manipulated. This change respects the transition, so any time set in the missing hour is considered invalid, and any date maths returns valid results. The validity in the current time zone needs to be checked every time isValid() is called in case the system time zone has changed since the last time it was checked. This is done by calling mktime to check the returned result matches the expected result. This could be very inefficient, but the returned offset value is cached each time so mktime is not required to be called again within each method call, effectively meaning mktime is called the same number of times by each method. Note that this means any new methods added must be careful to ensure either isValid() or refreshLocalTime() is called first by any method needing to use the UTC value. [ChangeLog][QtCore][QDateTime] The Standard Time to Daylight Time transition for Qt::LocalTime is now handled correctly. Any date set in the "missing" hour is now considered invalid. All date math results that fall into the missing hour will be automatically adjusted to a valid time in the following hour. Change-Id: Ia652c8511b45df15f4917acf12403ec01a7f08e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Change date/time storage to msecsJohn Layt2013-09-202-359/+558
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change from storing the date and time as QDate and QTime to a serialised msecs format. This format is a direct translation of the QDate and QTime values, it is not the actual msecs since the Unix epoch. This msecs format ensures we are always able to recreate the original QDate and QTime values, but should still simplify the code and improve performance. Because we no longer store the explicit date and time we need to store their isNull()/isValid() status separately. The changes in storage results in the same memory footprint as before. Note that this change does not optimize the code nor set out to fix the known bugs, it only seeks to maintain the current behavior, although some bugs are fixed implicitly. More bug fixes and optimizations will follow. [ChangeLog][Important Behavior Changes] The supported date range in QDateTime has been reduced to about +/- 292 million years, the range supported by the number of msecs since the Unix epoch of 1 Jan 1970 as stored in a qint64, and as able to be used in the setMSecsSinceEpoch() and toMSecsSinceEpoch() methods. Change-Id: I98804d8781909555d3313a3a7080eb8e70cb46ad Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QString: avoid a QLocale detach in vsprintfMarc Mutz2013-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't dig deeper to check where the additional reference came from, but tracing confirmed that the QSharedDataPointer<QLocalePrivate>::detach() call is gone with this change. Background: QString::vsprintf is used in the logging framework, and as such shouldn't waste any memory. It's currently anyway unusable from, say, signal handlers, but this is low-hanging fruit that shaves off one of the dozen or so memory allocations involved in a simple qFatal() call. Change-Id: I19fa2148f669dfc7b5f276221151e25a4348cbfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | WinRT: Compile fix for qelapsedtimer_win.cppOliver Wolff2013-09-201-0/+5
| | | | | | | | | | | | | | | | | | Change-Id: I1c9d6904eecd499ca8c2b744e8ac60696f40c20f Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Revert 15da0a5af20fe6771bcb94ef8d46edbd5c8fb64c.Mitch Curtis2013-09-191-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It apparently breaks users' applications. Task-number: QTBUG-33487 Change-Id: Iaeceb3a02b5c7b9ab839c14693aaffcdf9394bc6 Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: hjk <hjk121@nokiamail.com>
* | | QMap: don't dereference nullptr IIMarc Mutz2013-09-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | root(), leftNode() and rightNode() can be nullptr. These pieces of code happened to work because the first thing lowerBound() does is Node *n = this; // ... while (n) // ... But that is _after_ dereferencing nullptr, which is undefined behavior. So, check first, then deref. This is the completion of I9137bf6e21014cd68404a7e49a748910b1d768cf: all uses of root(), leftNode() and rightNode() have now been manually checked. Change-Id: I3fcb958af9362104f94d6eea9c62da2ae07f1d5e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QMap: don't dereference nullptrMarc Mutz2013-09-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | root(), leftNode() and rightNode() can be nullptr. These pieces of code happened to work because the first thing lowerBound() does is Node *n = this; // ... while (n) // ... But that is _after_ dereferencing nullptr, which is undefined behavior. So, check first, then deref. Change-Id: I9137bf6e21014cd68404a7e49a748910b1d768cf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Don't use Mac OS X QCollator backend on iOSTor Arne Vestbø2013-09-163-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have CoreServices on iOS, which hosts the UC* APIs. Change-Id: I95b1b173e57665c2fc2cdc1701f8ad57cdc0e567 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QDateTime: fix unused function warning on non-WindowsMarc Mutz2013-09-161-1/+1
|/ / | | | | | | | | Change-Id: I8fbf1f8b0ebfdf58cd72c724326227dc1610e746 Reviewed-by: John Layt <jlayt@kde.org>
* | qelapsedtimer for WinRTOliver Wolff2013-09-151-1/+7
| | | | | | | | | | Change-Id: Ic31fa667bdc746776d8e29564ea8a1ba6e7384f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Revert "Reimplement qBinaryFind in terms of std::lower_bound"Giuseppe D'Angelo2013-09-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After a bit of discussion, we should actually deprecate qBinaryFind too. This puts the old code back (to avoid behavior changes / source breaks). This reverts commit 23d7f6ee5dea3dd9f47f4ab538b25dc0ffe3df92. Task-number: QTBUG-33473 Change-Id: I7f7d25171e14061e51543c501c30a7b6b184a8fd Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Do 64-bit loops in QBitArray::count(bool)Thiago Macieira2013-09-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | On 64-bit platforms, with unaligned loads, this is defintely an improvement since we can run fewer instructions. On 32-bit platforms with unaligned loads, we'll do the exact same number of loads. On platforms without unaligned loads, it's no worse. Change-Id: Idd5dd5213975d77bbc3adf486adbf6f8ef071341 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Let the compiler do the unaligned loads in QBitArray::count(bool)Thiago Macieira2013-09-141-2/+21
| | | | | | | | | | | | | | | | | | | | | | For platforms where the CPU can do unaligned loads on its own, like x86, the compiler will generate actual loads. On other CPUs, it will do the byte-by-byte load like we were doing. The compiler cannot generate worse code than our hand-rolled load, so this change can only improve performance. Change-Id: I32a89e64aa64d8af504be6c5a10b04d7573cdb98 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | 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>
* | Base64: Implement the "base64url" encoding and the stripping of '='Thiago Macieira2013-09-142-14/+98
| | | | | | | | | | | | | | | | | | 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>
* | 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>
* | 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>
* | 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 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>
* | 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 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>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-102-3/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-072-3/+1
| |\| | | | | | | | | | 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>
* | | 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-101-29/+43
| | | | | | | | | | | | | | | | | | | | | 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>
* | | 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>
* | | QDateTime - Split QDateTimeParser into a separate fileJohn Layt2013-09-096-1923/+2045
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not strictly needed yet, but helps to reduce the size of QDateTime and make it easier to read a major re-write. Imposes separation of parser which will be needed if we make QLocale always use the system backends, after which only QDateTimeEdit widget will need the parser and it can be moved there. Change-Id: I6a5e9a3edf6fe8ff2340af6afecd8ba4bfde9dd4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | Remove qSort usages from QStringListGiuseppe D'Angelo2013-09-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I38d220142d4f5e580503cc10f804e0d16f418cc1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>