summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Fix QCollator::compare documentationLars Knoll2015-03-182-8/+8
| | | | | | | | | We don't guarantee -1, 0 and 1, but simply negative 0 or positive numbers. This is in line with e.g. QString::compare() Task-number: QTBUG-42860 Change-Id: I6009b2eb732ae3b4726cec06ec0eacc2c46a3c93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: Don't force unrolling of the tail loop if optimizing for sizeThiago Macieira2015-03-151-7/+7
| | | | | | | | | | | | | This is quite good if space isn't a constraint: the unrolling ensures faster execution and limits the number of iterations. But it's long. Both Clang and GCC set the predefined macro __OPTIMIZE_SIZE__ if -Os is in effect. ICC does not; MSVC is untested but there are no macros for this effect listed in its documentation. Change-Id: I1a800c709d3543699131ffff13c48919a9a79ec3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Track modifications of white space in QString::simplified().Friedemann Kleint2015-03-121-4/+6
| | | | | | | | | | The existing check fails to detect the case where white space characters other than the space character are replaced by space characters without the length actually changing and returns the original string. Task-number: QTBUG-44936 Change-Id: Ice6faa975f8b41f185c76f6d0d4ff81603e25eb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: ensure we always use the daylight status if knownThiago Macieira2015-03-111-19/+28
| | | | | | | | | Refactor the code so that the localMSecsToEpochMSecs function always gets the daylight status as input. The calculation can be very wrong if we forget to set it. Change-Id: I39e2a3fa6dc7c4a417f23288f10b303e450b8b98 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix regression in time zone handlingFrederik Gladhorn2015-03-111-0/+1
| | | | | | | | | | | | In QtScript we use the msecs since epoch conversion (JS date is based on the concept). After a8c74ddcf78604c9038ba2a2bea81e445e4b3c58 the date conversion test in qtscript started to fail. Instead of relying on the code working by chance, simply update the date when setting it with setMSecsSinceEpoch. Task-number: QTBUG-44885 Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify calculation of week numberLars Knoll2015-03-101-50/+17
| | | | | | | This also removes a dependency to 3rd party licensed code. Change-Id: Ia4818a5cf306501bdb7192265edc4bcba8e597d8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Doc: corrected doc QString::operator[]Nico Vertriest2015-03-091-2/+2
| | | | | | | Task-number: QTBUG-43337 Change-Id: I379dfe3f6909de5a63a67261834ea0edff875f9d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* QStringAlgorithms::simplified_helper: add missing check for detachedThiago Macieira2015-03-071-1/+1
| | | | | | | | Otherwise, we modify shared strings that happened to be rvalues. Task-number: QTBUG-44706 Change-Id: Ia0aac2f09e9245339951ffff13c85bfc912f03d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix race condition in QDateTime::timeZone() and other methodsThiago Macieira2015-03-073-35/+36
| | | | | | | | | | | | | | | | | | | | When timezone support for QDateTime was added, we decided it was a good idea to delay creating the QTimeZone object and checking that the time is valid in that timezone (including for local time) until the user requested that information. Unfortunately, QExplicitlySharedDataPointer returns a non-const T* in operator->(), which meant we were accidentally modifying the d pointer's contents in const methods, which in turn means those const methods were not thread-safe when operating on the same object. This commit changes the d pointer to QSharedDataPointer, which is safer in this regard and pointed out where the issues with constness were located. Since we can't lazily calculate QTimeZone anymore, we need to do it whenever the date, time or offset changes. Task-number: QTBUG-43703 Change-Id: Ic5d393bfd36e48a193fcffff13b9686ef4ef1454 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Silence bogus MSVC warning about variable not usedThiago Macieira2015-03-071-0/+1
| | | | | | | | | | | | The compiler is wrong: the variable was used in the previous line. However, the line had no effect for a type T that has a trivial destructor, so the optimizer must have discarded the line and the reference to the variable before the checker for used variables. qsharedpointer_impl.h(247) : warning C4189: 'that' : local variable is initialized but not referenced Change-Id: Ia0aac2f09e9245339951ffff13c8bde02bb46816 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Android: Fix compilation for x86Eskil Abrahamsen Blomfeldt2015-02-271-1/+3
| | | | | | | | | | | | Bionic on x86 does not have an implementation of ffs(), for some reason. The declaration is available in strings.h, but causes a linker error. The toolchain has a builtin version though, which can be used instead. Change-Id: Iaf4c27542c1aabe88713842303251db44ae6ba86 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* OSX: fix leaks due to missing NSAutoreleasePoolErik Verbruggen2015-02-261-0/+13
| | | | | | | env OBJC_DEBUG_MISSING_POOLS=YES qtcreator Change-Id: Ibbe5f42af5b94a439be3f0dd0f2b6e34bb1afd3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-244-3/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Timezones: Fix handling of offset-from-UTC QTimeZonesThiago Macieira2015-02-232-0/+11
| | | | | | | | | | | | | | | | | | | | Those QTimeZones failed to convert to other timezones because the data() virtual function was never overridden and reimplemented. That meant all QUtcTimeZonePrivate objects were *really* UTC, with no offset. Task-number: QTBUG-44600 Change-Id: Ia0aac2f09e9245339951ffff13c5294bb783c674 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QVector: fix use of invalid iterators in removeAll()Marc Mutz2015-02-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The c2m() function which converts a const_iterator into an iterator is a broken concept for an implicitly shared container such as QVector, because the act of calling begin() as the starting point already detaches and invalidates the c2m argument. This could be fixed in c2m, but the bug wasn't even in c2m, but in removeAll(), which called end() before c2m, so the c2m argument was already invalidated when entering c2m. The solution is to store the positions as indices instead of iterators before calling the first detaching function. Task-number: QTBUG-44592 Change-Id: I66cf4f1277e71148a4d5b5bbfb6a3369ad02db68 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Fix links in plural words.Florian Bruhin2015-02-161-2/+2
| | | | | | | | | | | | | | | | In some documents, "{QObject}s" was used which didn't show up as link. This is fixed by using "\l{QObject}s" instead. Change-Id: I90dbd543790842b242a11f3f94a32d4273ebb38d Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Merge dev into 5.5Oswald Buddenhagen2015-02-2321-289/+348
|\ \ | | | | | | | | | Change-Id: Id6dbbbfc542c214fe695c6795c6aaf23aedc1cd1
| * | QDateTime: cache the result of date.timeSpec() in QDebug op<<Marc Mutz2015-02-211-2/+3
| | | | | | | | | | | | | | | | | | | | | Saves a couple dozen bytes in text size on optimized AMD64 builds. Change-Id: Iefd9ca05a7b27f240836c1e1e00df569742fcd7f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | QDateTime: drop quotes in QDebug outputMarc Mutz2015-02-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | As requested in review of 1d2efe1f27bedcbaa157ef4e82b8eda33dda46ad. I didn't add a comma in front of the timeSpec() as the other fields aren't separated by commas, either. Change-Id: I54d74b7199ca7e46e28d2ceca22b02205e318c90 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Fix compilation on AndroidMichal Klocek2015-02-202-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 81a45e1f13fdf56129aed952a6e3479e16c14a2c replaced QSets with QLists in QTimeZone, but forgot to adapt the Android code. This commit fixes it. Change-Id: I8704a39c44a9dc74147a4bb99a6f5d1bea53afa1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | QDate/QTime: mark some functions constexprMarc Mutz2015-02-171-27/+27
| | | | | | | | | | | | | | | Change-Id: Icbac388337d561f61a9a53163c3ddfc748935a2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fixed license headersJani Heikkinen2015-02-178-8/+8
| | | | | | | | | | | | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | QPair: add noexcept to ctors and assignment operatorsMarc Mutz2015-02-171-3/+12
| | | | | | | | | | | | | | | Change-Id: Id201d1f1e7a087083ca6c13ab31c721e672ef566 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QList: share implementation of operator== with QVector where possibleMarc Mutz2015-02-171-0/+17
| | | | | | | | | | | | | | | | | | | | | Same change as was already applied for count() and contains(). Change-Id: Ibd62e4b36e03741993ba33e730c9449ef19bff5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QList: share the implementations of contains()/count() with QVector where ↵Marc Mutz2015-02-171-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | possible If QList data-layout-compatible with QVector and a C array, implement count() via std::count() and contains() via std::find() and use const_pointer instead of const_iterator as the iterators. This essentially makes the QVector and QList implementations identical to each other, at least for important cases such as QString. To switch between the different implementations, use tag dispatching instead of the previously used technique "use 'if' as if it were 'static if'", which imposes accidental requirements on the element types (something that esp. QVector is plagued with). Change-Id: I6caf74442a22059676b5bf115a6089768f3a0952 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QList: prepare for tag dispatching based on memory layoutMarc Mutz2015-02-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add one tag class for each of QList's three different memory layouts to QListData, and inherit QList<T>::MemoryLayout from exactly one of them. To simplify overloading, added tag classes that express the negation of the two extreme poles of memory layout (C-compatible and heap), too. The "missing" one could be added when needed, too. Change-Id: I45ea603731499fd3fdfb37d60a0a98fb22ac15ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDate: optimize QDate::toString()Marc Mutz2015-02-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a QString::arg() cascade, which creates tons of temporaries, use good 'ol sprintf(). Effects on Linux GCC 4.9 stripped release builds: text -216B data +-0B relocs +-0 Change-Id: I6ff551cb9f42e0c05a64f03a8e177fb527915481 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTime: optimize toOffsetString()Marc Mutz2015-02-171-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a QString::arg() cascade, which creates tons of temporaries, use good 'ol sprintf(). As a consequence, this function is now inlined into all four callers and the total executable size _still_ goes down: Effects on Linux GCC 4.9 stripped release builds: text -420B data +-0B relocs +-0 Change-Id: I10d6abd94b489db7c2f01dc5424f30a798602522 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTimePrivate: make bit manipulation code more readableMarc Mutz2015-02-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...by using var op= ... instead of var = var op ... No change in executable code size. Change-Id: I1c29ff6700f0f21be07768af8d002f0823c89fbd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | QDateTimePrivate: remove pointless comparisonsMarc Mutz2015-02-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For any 1-bit flag: bool(var & flag) <=> (var & flag) == flag but gcc didn't seem to get it: (Surprising) effects on Linux GCC 4.9 stripped release builds: text -4936B (!!) data +-0B relocs +-0 It seems this enables some dead code detection, but I must confess I don't quite understand how such a small change can have such a dramatic effect on the executable size, even after diffing the assembler output. Change-Id: Ia307fde0de16160ea51bbb3ed6c1ff203d4f9091 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTimePrivate: remove pointless copy ctorMarc Mutz2015-02-171-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler-generated one is just as fine, more maintainable, and doesn't inhibit moves (which probably doesn't matter here). No change in executable code size. Change-Id: Ideee493a5911808430d3e09e6eb07e91d7a19b12 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTime: replace out parameters with return-by-value in rfcDateImpl()Marc Mutz2015-02-171-66/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilers *really* don't like out parameters. (Impressive) effects on Linux GCC 4.9 stripped release builds: text -2512B data +-0B relocs +-0 Change-Id: I0fe370a438f7b82aaa9cc04ddd56e45a5969e7a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTime: optimize rfcDateImpl()Marc Mutz2015-02-171-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the captured texts once and use indexing into the QStringList instead of repeatedly calling QRegExp::cap(n). (Impressive) effects on Linux GCC 4.9 stripped release builds: text -2876B data +-0B relocs +-0 Change-Id: I3a02eab1a691f31c30654cd89a0c030414b40de0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTime: change an instance of out parameters to return-by-valueMarc Mutz2015-02-171-52/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilers don't like out parameters. Effects on Linux GCC 4.9 stripped release builds: text -528B data +-0B relocs +-0 Change-Id: I32ee1a6c4388900bacfc6eb20feb4b81d71cb1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QTimeZone: don't use QSet, use sorted QListMarc Mutz2015-02-177-95/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSet, as a node-based container, requires one memory allocation per element inserted. QList, as a contiguous-memory container (at least in the case of a QByteArray payload), requires one memory allocation per container. The higher lookup speed might still speak for using QSet, but there are only two uses of the sets: 1. Checking for existence (or lack thereof) of timezone names. For this, first generating a container full of data just to check for existence of one item of data is extremely wasteful. The QTZPrivate API should be extended to allow said lookup to be performed on the native data store instead. That leaves 2. Returning a sorted(!) list(!) from the public QTimeZone API. There is no reason why, during the construction of those sorted lists, the data should be held in a set. Instead, the well-known technique of first cramming everything into a result container, which is subsequently sorted and has its duplicates removed, can be used here. Saves more than 8K of text size on AMD64 stripped release builds. Change-Id: I71c2298e94e02d55b0c9fb6f7ebeaed79a1fe2db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix MSVC 2013/64bit warnings about conversion from 'size_t' to 'int'.Friedemann Kleint2015-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tools\qstring.cpp(243) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(287) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(292) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(305) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(312) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data Change-Id: I20b92b0783f4859e9da83364b4ec86dd8bbd1c4c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/dev' into 5.5Frederik Gladhorn2015-02-171-7/+7
|\| | | | | | | | | | | | | | | | | Needed due to license header patch. Change-Id: Id7e30490132a7c487687a0a376419e9f9b97ea41
| * | Use C++ <cmath> instead of <math.h>Allan Sandfeld Jensen2015-02-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Including math.h can pollute the default namespace, and break some compilers if cmath versions of the method are declared as using. Switching to C++ math functions also greatly simplifies handling of float qreal as C++ automatically chooses the right method. [ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any sources depending on that indirect inclusion may fail to build. Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Fix Intel compiler warning about change of signThiago Macieira2015-02-171-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The variable c is unsigned, so the second operand is unsigned, constraing the -1 to be unsigned too and causing a change of sign. Instead, cast the middle operations to int, as that's the return value anyway. error #68: integer conversion resulted in a change of sign Change-Id: I1a800c709d3543699131ffff13c2fd79f14f8b43 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QDateTime: micro-optimize QDebug op<<Marc Mutz2015-02-151-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of constructing a QString that describes the QDateTime instance, stream the constituents of the string into QDebug directly, using op<< for Q_ENUM, now that it's available. Adapt test to new format of enums. Effects on Linux GCC 4.9 stripped release builds: text -1068B data +-0B relocs +-0 Change-Id: I1a5ce28904edd7d0f6c8d982fd41c52e3536e036 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove support for some very old compilersAllan Sandfeld Jensen2015-02-151-11/+0
| | | | | | | | | | | | | | Remove code supporting gcc 4.0 and earlier, and MSVC 2005 and earlier. Change-Id: I3304e11bb38c101f113c124e8e533c5578badf34 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated BSD licensed file headersJani Heikkinen2015-02-151-1/+1
| | | | | | | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QDateTime: make qt_monthNumberFromShortName() staticMarc Mutz2015-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It wasn't Q_DECL_EXPORT'ed, and there is no other user in QtCore. Effects on Linux GCC 4.9 stripped release builds: text -344B data +-0B relocs +-0 Change-Id: Iea0577d58057a145f87a00ec33995d03bacd4f88 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QDateTime: use existing functions for short month name parsingMarc Mutz2015-02-141-35/+21
| | | | | | | | | | | | | | | | | | | | | | | | ...instead of rolling a new one on each use. Effects on Linux GCC 4.9 stripped release builds: text -156B data +-0B relocs +-0 Change-Id: I49e20ea859928d010990fc7a22545dbc1ef106ec Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QDateTimePrivate: enable read caching on m_status in setDateTime()Marc Mutz2015-02-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Help the compiler by building the new status flags in a local instead of a member variable. Enables value tracking for that piece of data across several non-inline function calls, leading to less redundant reads through this->. Effects on Linux GCC 4.9 stripped release builds: text -248B data +-0B relocs +-0 Change-Id: I2db21439464ad0fff8163a908de3b15df7c4ab6d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QDateTime: pass explicit length to QLatin1String ctorMarc Mutz2015-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, determining that constant at compile time is a bit too much work for GCC. Effects on Linux GCC 4.9 stripped release builds: text -276B data +-0B relocs +-0 Change-Id: I23144e64d57e3a2e1061e69b20f2b72575c273d8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QDateTime: avoid relocationsMarc Mutz2015-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The short month names all have length 3, so store them in a multi- dimensional const char array instead of as a pointer table. Effects on Linux GCC 4.9 stripped release builds: text -196B data -64B relocs -12 (est., somehow relinfo.pl reports nonsense on QtCore) Change-Id: If5f83e4f1eb5ba0b0f54b4144abec8b88fb8529f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-131-1/+1
| | | | | | | | | | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDateTime: prepare for constexpr'ificationMarc Mutz2015-02-121-2/+9
| | | | | | | | | | | | | | | | | | Make sure from{JulianDay,MSecsSinceStartOfDay}() are in a constexpr'able form by introducing new private ctors that allow formulating these functions as single expressions. Change-Id: Iee98edb74e63c32e98781b885bbb2c5ef5867fd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: assorted migrations to QString::asprintfMarc Mutz2015-02-122-7/+3
| | | | | | | | | | Change-Id: Ie99d3eeeced89dd8336717954fd5ca7117bb20b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>