summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersJani Heikkinen2015-02-11158-1240/+1152
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devLaszlo Agocs2015-02-103-2/+6
|\
| * Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-103-2/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| | * Fix QLineF Detailed DescriptionSamuel Gaist2015-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently angle() is used in place of angleTo() to describe the difference with intersect. This patch fixes that. Task-number: QTBUG-44309 Change-Id: Idfc521932247f76fe15fd980ff8e87e52feec1f1 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * QPair: work around std::move not being constexpr in C++11Marc Mutz2015-02-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a static_cast instead. This is not 100% equivalent, since it's missing remove_reference<>, which we don't want to depend on and whose emulation in qtypetraits.h is missing rvalue support. That will be fixed in dev. Change-Id: Ib03754c81c904932943d3a5415b54ff107f4719d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix QSharedPointer::create and QEnableSharedFromThisThiago Macieira2015-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | We forgot to initialize the tracker if create() was used. Task-number: QTBUG-43696 Change-Id: Ic5d393bfd36e48a193fcffff13b740931ff2204b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QtCore: Use QDebugStateSaver in (almost) all QDebug operator<<Kai Koehne2015-02-099-21/+36
|/ / | | | | | | | | | | | | | | | | Unify the behavior of the different operator<< by always using QDebugStateSaver (appending an optional space at exit), and making sure that the space(), nospace() setting isn't 'leaked'. Change-Id: I38e4f82fa6f7419d8b5edfc4dc37495af497e8ac Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-041-2/+0
| | | | | | | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Use Q_ENUM and Q_FLAG for types in QtCoreOlivier Goffart2015-02-042-4/+5
| | | | | | | | | | | | Change-Id: I33590a9c4c6d87c5bbba1d201e32c6bf1bd3e00b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Centralize use of __attribute__((noinline))Marc Mutz2015-01-292-11/+3
| | | | | | | | | | | | | | | | | | | | There are currently only two users, but I have patches in the pipeline which mark some other function noinline, so proavtively centralize the ifdef'ery involved. Change-Id: I1f02351fdc903d4e026089e12b8a976ed6a8d603 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QString: optimize multiArg()Marc Mutz2015-01-291-18/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function used a QMap<int,int> to map the %n's to the index in the args array. By way of construction, the key was sorted in ascending order while the values, initially all -1, were later reassigned to be 0...map.size()-1, ie. std::iota(). The only information this data structure stores is therefore the sorted %n's. For that, a sorted vector is a vastly superior data structure. Go one step further and use QVarLengthArray to avoid allocating any memory for the common case of just a few placeholders. As an artifact of the underlying refactoring, the management of that data structure has been moved to a separate class, ArgMapper. Runtime for the following test from tst_qstring: QString str("%1 %2 %3 %4 %5 %6 %7 %8 %9 foo %10 %11 bar"); // not timed str = str.arg("one", "2", "3", "4", "5", "6", "7", "8", "9"); str = str.arg("ahoy", "there"); went down from 2.2us to 1.5us. Change-Id: Ic552615fbac646b78ba05eb4e3215e63d202fd94 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QString: reduce template bloatMarc Mutz2015-01-291-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the number of (non-regex) splitString instantiations from six to two by: - Passing separators by (const QChar*, int) and using qFindString() instead of indexOf() - Passing QString as QStringRef when the output is QVector<QStringRef>. Doing so also allows to drop the MidMethod template parameter since QString::midRef() is no longer being used. (Somewhat disappointing) effects on Linux GCC 4.9 stripped release builds: text -500B data +-0B relocs +-0 Change-Id: Id89e2814d5f7da5170181d863167517943c2e0cd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove support for QT_QLOCALE_USES_FCVT.Erik Verbruggen2015-01-282-78/+0
| | | | | | | | | | | | | | We expect floating-point math to be IEEE754 compliant. Change-Id: I2b257177f2ef5fce38ac4d8fd76f746dc7b9fc15 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add conversion functions for C++11 u16string and u32stringAllan Sandfeld Jensen2015-01-242-4/+70
| | | | | | | | | | | | | | | | | | | | | | The patch adds convenience functions for working on C++11's new char width specific unicode strings u16string and u32string. [ChangeLog][QtCore][QString] Added methods for convenient conversion to and from std::u16string and std::u32string. Change-Id: I67c082e4755c592d61daaaaa70c8867ef0b23dcb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | src/corelib/tools/tools.pri: add missing qtools_p.hMarc Mutz2015-01-241-0/+1
| | | | | | | | | | Change-Id: If7af29fdaefddc1e3f08148610ba2720f5927b67 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: add some more Q_DECL_NOTHROWMarc Mutz2015-01-214-10/+10
| | | | | | | | | | | | | | | | | | | | | | QtCore now builds with no -Wnoexcept warnings (that doesn't mean there aren't tons of functions that should be marked noexcept, just that all conditionally noexcept functions aren't noexcept(false) just because of a forgotten noexcept elsewhere). Change-Id: I10dacb6b9c9d41d3595fe2f306356d62d3d91c76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-217-25/+33
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Doc: Fix typosSze Howe Koh2015-01-192-2/+2
| | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * QFreeList: fix undefined behaviorMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed integer overflow is undefined behavior ([expr]/4), but unsigned arithmetic doesn't overflow, so isn't ([basic.fundamental]/4, footnote there). So, use unsigned arithmetic for the loop-around serial number generation in incrementserial(). While we're at it, also use it for the masking operation in the same function. Found by UBSan. Change-Id: I500fae9d80fd3f6e39d06e79a53d271b82ea8df8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QByteArrayMatcher: fix undefined shiftMarc Mutz2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The REHASH macro is used in qFindByteArray() with a char argument. Applying the shift operator promotes (a) to int. The check in REHASH, however, checks for the shift being permissible for _unsigned_ ints. Since hashHaystack is a uint, too, rectify by casting (a) to uint prior to shifting. Found by UBSan: src/corelib/tools/qbytearraymatcher.cpp:314:72: runtime error: left shift of 34 by 30 places cannot be represented in type 'int' Change-Id: Id09c037d570ca70b49f87ad22bed31bbb7dcc7fb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Doc: define target voor function qsnprintf()Nico Vertriest2015-01-161-0/+1
| | | | | | | | | | | | Task-number: QTBUG-43537 Change-Id: I76c511891a1a07eca77da399d23097e76047f824 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Update doc saying QDateTime::setTime with invalid time sets to midnightThiago Macieira2015-01-151-3/+10
| | | | | | | | | | | | | | | | | | QDateTimePrivate::setDateTime has a comment saying this is intentional, so document it. Task-number: QTBUG-43704 Change-Id: Ic5d393bfd36e48a193fcffff13b965409eaf7be9 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * fix error when cross-compiling with --system-zlibAshish Kulkarni2015-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is broken since 1f461ac45bfa8887261510a95fb33a346d68eaba, where Z_PREFIX was defined to namespace the bundled zlib symbols. The bundled zlib is used by bootstrap.pro when cross-compiling which uses the namespaced symbols. This breaks linking of rcc when --system-zlib is used, as it will try to link to compress2 instead of z_compress2. To fix this, the aliases are pulled in via zconf.h and the bundled zlib is prepended to the INCLUDEPATH (i.e. before the system zlib). Change-Id: Iec76cbdead40f888e2ac6a887ec8f3b7bc7db501 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Doc: Fixed date format doc bug in QDateTime/Qt namespaceOrgad Shaneh2015-01-061-12/+12
| | | | | | | | | | | | | | | | | | | | MM stands for month, SS is invalid mostly cherry picked from Qt4 commit 670f460fab6a386407c07281cf6417ccf6430970. Task-number: QTBUG-12236 Change-Id: I7af4be655d2d10f1befa1366abb48225c60d31dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix change-of-sign warnings with ICCThiago Macieira2015-01-061-3/+3
| | | | | | | | | | | | | | | | | | | | qlocale_p.h(427): error #68: integer conversion resulted in a change of sign We hadn't enabled Q_COMPILER_CONSTEXPR for ICC. Change-Id: Ie7e3070b9f8f2cf512d2745001312865e698596b Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * [QDateTime] ISO Time zone designators can be [+-]HHIsrael Lins2014-12-301-5/+4
| | | | | | | | | | | | | | | | | | Added support on QDateTime::fromString to read correctly dates on ISO format with Time zone designators at format [+-]HH Change-Id: Ied5c3b7950aee3d0879af0e05398081395c18df5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Add qHash() overload for QSetMarc Mutz2015-01-182-0/+20
| | | | | | | | | | | | | | | | | | ...using qHashRangeCommutative(). Also add a test. [ChangeLog][QtCore][QSet] Can now be used as the key in QSet, QHash. Change-Id: Ie7c81d257a3b324fc03d394fa7c9fcf0c6fb062a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QHash: only fetch qt_qhash_seed when detaching from a null QHashMarc Mutz2015-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code fetched QHashData::seed from qt_qhash_seed on every detach. That is both unnecessary and wrong. It is uneccessary, because if the detached-from QHashData isn't shared_null, the seed has already been populated from qt_qhash_seed. It thus suffices to fetch the seed from qt_qhash_seed only when we detach from shared_null. It is wrong, because if qt_qhash_seed was changed between the detach from shared_null and a following detach, d->seed is now different from this->seed, but detach_helper simply clones the buckets 1:1 from this to d, leaving d in a corrupt state. By doing this change, we make QHash robust against on-the-fly changes to qt_qhash_seed (e.g. for testing, or added security). It also opens up the option to have API for changing the seed of a given QHash instance after it has been created (detach, set new seed, rehash). Change-Id: Ib251fc9a6204b42036e97a2fc66f644b379ab841 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't call static members with objectThiago Macieira2015-01-161-3/+3
| | | | | | | | | | | | | | This makes it clear that we're not modifying d. Change-Id: Ic5d393bfd36e48a193fcffff13b968c6d08e69f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add QTimeZone::{systemTimeZone,utc}Thiago Macieira2015-01-163-5/+28
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QTimeZone] Added methods systemTimeZone() and utc() that return QTimeZone objects for the system time zone and for UTC, respectively. Change-Id: Ic5d393bfd36e48a193fcffff13b96821bb8514b9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove Q_STATIC_GLOBALxxx_OPERATOR macrosThiago Macieira2015-01-111-2/+1
| | | | | | | | | | | | | | | | | | | | These macros existed for working around an RVCT compiler bug, but since we stopped trying to work around it, the macros are no longer necessary. Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Haiku: Make corelib compile on HaikuTobias Koenig2015-01-101-1/+1
| | | | | | | | | | Change-Id: I66bc492390eedd723ab7866d3c7a38539d708727 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QHash: clean up class definitionMarc Mutz2015-01-102-26/+26
| | | | | | | | | | | | | | ...by removing redundant '<Key, T>' and 'inline'. Change-Id: I9d81950c6384927633de07de511712f7274a1283 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: mark some operations nothrowMarc Mutz2015-01-1013-49/+52
| | | | | | | | | | | | | | | | | | | | | | | | This shotgun-surgery approach is motivated by trying to get a clean(er) build for -Wnoexcept on GCC, so it is expected that for any class touched here, there will be more operations that can be marked nothrow. But they don't show up in conditional noexcept clauses, yet, so they are deferred to some later commit. Change-Id: I0eb10d75a26c361fb22cf785399e83b434bdf233 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUnicodeTables: mark all functions as nothrowMarc Mutz2015-01-102-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level functions are correctly marked noexcept. In that, it is like constexpr. Change-Id: I4bca178444d1fd7caf3a92f996b1536eebdb5014 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRingBuffer: retrieve pointer to data more carefullyAlex Trotsenko2015-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | An empty ring buffer always has a pre-cached byte array in its container. In this case size() indicates that no data is available, but readPointer() tries to resolve this byte array. To avoid an illegal pointer as a result, return Q_NULLPTR instead. Change-Id: Icc5f08f071a8f02a14c112b6e1adbe5373bd9466 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Docs: e.g. -> for example in qhash.cppMarc Mutz2015-01-091-2/+2
| | | | | | | | | | Change-Id: Ifee0117ddadfaa774fdd575467b03ca5b0baf433 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | QVersionNumber: use qHashRange()Marc Mutz2015-01-091-7/+1
| | | | | | | | | | | | | | Change-Id: Ia7cfb8030cded33f4246206392b46d1013067ef3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Keith Gardner <kreios4004@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add qHashRange and qHashRangeCommutativeMarc Mutz2015-01-092-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qHashRange() takes an (input iterator) range and hashes each element, combining the hash values using the hash combiner from Boost/N1837 with the magic number 0x9e3779b9, as described here: http://stackoverflow.com/questions/4948780/magic-number-in-boosthash-combine qHashRangeCommutative() does the same but with a cummutative combiner (unsigned addition) to create hash values that are order-independent, e.g. for hashed containers. The obvious combiner, XOR, is a bad one because it eliminates duplicate elements. Signed addition cannot be used, since signed overflow leads to undefined behavior. [ChangeLog][QtCore] Added qHashRange() and qHashRangeCommutative() functions to aid implementing qHash() overloads for custom types. Change-Id: I3c2bbc9ce4bd0455262a70e0cf248486525e534f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Unexport QVersionNumberMarc Mutz2015-01-081-7/+7
| | | | | | | | | | | | | | | | | | | | And only export those functions which are actually out-of-line. This prevents exporting all the inline methods of QVersionNumber, so we can more freely tune the implementation after its release. Change-Id: Ie0c5e3f95fea9ec9b3dd481058db6c9f5ef2653c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QPair: mark relational operators and qMakePair() conditionally noexceptMarc Mutz2015-01-081-0/+7
| | | | | | | | | | | | | | | | The member functions are a bit more complicated, since they require <type_traits> support, so they're left for another commit. Change-Id: Icb792468e35c63eb1ae97f62ed023266fb86b89b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QPair: add member-swapMarc Mutz2015-01-082-0/+37
| | | | | | | | | | | | | | std::pair has it, too. Change-Id: I2526b09455db5502ad38a81f3d401098d54614a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QMargins: plaster API with Q_DECL_NOTHROWMarc Mutz2015-01-081-104/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly straight-forward, but some things are worth noting: 1. Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level classes are correctly marked noexcept. In that, it is like constexpr. 2. In accordance with the rules governing noexcept specifications for the standard library itself, the operator/-family of functions are not marked as noexcept, since they have preconditions and thus a narrow contract. Narrow-contract functions should not be noexcept. All other functions have wide contracts (ie. no preconditions). Change-Id: I2cb1f951a92dcb25eac4d9afc5b7780311e39492 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRect: plaster API with Q_DECL_NOTHROWMarc Mutz2015-01-082-317/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly straight-forward, but some things are worth noting: 1. Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level classes are correctly marked noexcept. In that, it is like constexpr. 2. In accordance with the rules governing noexcept specifications for the standard library itself, the get*()-family of functions are not marked as noexcept, since they have preconditions and thus a narrow contract. Narrow-contract functions should not be noexcept. All other functions have wide contracts (ie. no preconditions). Change-Id: I82e5d34a0293d73ddc98ee231e17e26463ab6686 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSize: plaster API with Q_DECL_NOTHROWMarc Mutz2015-01-082-128/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly straight-forward, but some things are worth noting: 1. Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level classes are correctly marked noexcept. In that, it is like constexpr. 2. In accordance with the rules governing noexcept specifications for the standard library itself, the operator/-family of functions are not marked as noexcept, since they have preconditions and thus a narrow contract. Narrow-contract functions should not be noexcept. All other functions have wide contracts (ie. no preconditions). Change-Id: I9fc94218a2728c272483f9c2826c265f5b11c9b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move a few QStringList methods up to QList<QString>Thiago Macieira2015-01-073-39/+82
| | | | | | | | | | | | | | | | This should be completely source-compatible, aside from the indirect header order change. Change-Id: I4cf8800ea1bfeb3023c7319991ab8ae281c925e8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Disable the warning about deprecation inside qalgorithms.hThiago Macieira2015-01-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | Since some of the algorithms use other ones, we should not warn about those. The warnings are supposed to happen only in user code. Warnings obtained with GCC 5. The Clang change is just to be on the safe side. Change-Id: If295899f6ff6534de7b19741d33efc0b5c4c912c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Remove workarounds for RVCT compiler bugsThiago Macieira2015-01-064-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not try to remove support for RVCT. There has been no report of it working or failing to work, so the status continues to be unknown. In particular, the inline assembly code in atomic_armv[56].h remains in place. This commit only removes workarounds for compiler bugs or bogus warnings, assuming that anyone using this compiler has updated since Qt last tried to use it for Symbian in 2011. Note also how anonymous unions are now part of the language in C++11. Change-Id: Idc4fab092beb31239eb08b7e139bce2602adae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-293-17/+14
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79