summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QDebug: pretty-print QStrings and QStringRefsThiago Macieira2015-01-119-8/+182
| | | | | | | | | | | | | [ChangeLog][QtCore][QDebug] Printing of QStrings and QStringRefs whenever "noquote" is not active now prints the strings in a format that can be copied back to C++ code. All characters that aren't printable in US-ASCII are escaped (this includes printable Unicode characters outside of US-ASCII). Pretty-printing will not respect QTextFormat padding or field widths. Change-Id: I169a8a0508e24693f5652f0129defe7f709e5d08 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prettify the per-compiler setting of Makefile.win32Thiago Macieira2015-01-111-21/+13
| | | | | | | This just reindents and makes it easier to read what's going on. Change-Id: Id0afcdfb8f468b4553bba8c5a572a1d0115b0886 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove support for MSVC mkspecs that don't exist anymoreThiago Macieira2015-01-111-1/+1
| | | | | Change-Id: Ic5d393bfd36e48a193fcffff13b73b9578a9f7ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Support threaded OpenGL on linux again.Gunnar Sletta2015-01-102-0/+9
| | | | | | | Broken since 8758f532ae6209bcf9447e27edc4fd412c0f173d. Change-Id: Ifadf37252cc7c1ca68b0a82320b12833f97bf302 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix a couple of bugs in the QOpenGLWindow exampleJørgen Lind2015-01-103-12/+18
| | | | | | | Also make the fragment shader a bit simpler Change-Id: Ie50940da0a4f896504c9f5962cdb6c455983302f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Haiku: Make corelib compile on HaikuTobias Koenig2015-01-105-2/+13
| | | | | Change-Id: I66bc492390eedd723ab7866d3c7a38539d708727 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Android: Don't assume native window decoration in QDockWidgetKai Pastor2015-01-101-1/+1
| | | | | | | | | | | Android does not decorate a floating QDockWidget, leaving the user with no option to close or move such a widget. This changes activates Qt's own drawing of window decorations for this case (similar to Win CE). [ChangeLog][Android][QtWidgets] Enable QDockWidget window decorations. Change-Id: Id46a994a8be9b8f3e7b530af118315cd36b5fb0e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QWindowsVistaStyle: Draw PE_PanelItemViewItem for non-item view widgets.Friedemann Kleint2015-01-101-9/+10
| | | | | | Task-number: QTBUG-43157 Change-Id: I2a5f721cadc0dfffbb81902ef1d06ba34a729300 Reviewed-by: J-P Nurmi <jpnurmi@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-1019-68/+72
| | | | | | | | | | | | 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>
* QPen: mark copy/move/swap as nothrowMarc Mutz2015-01-102-7/+7
| | | | | Change-Id: Ib13d60256d96253934e0627d4c3015248e002e3f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qSwap specialization from Q_DECLARE_SHAREDMarc Mutz2015-01-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The way swapping is supposed to work is: 1. Each type supplies a swap() function or function template in its namespace. Any good STL implementation will find it there through ADL. As will the primary qSwap() template. 2. Each use of swap() in Qt, in particular in template code, should use qSwap() instead of std::swap() or the using+swap-trick, because qSwap() automatically enables ADL. It also has a sophisticated conditional noexcept specification that can be used in the custom swap() functions' own noexcept clause. This change also allows us to convert implicitly-shared classes' member-swap functions to noexcept one at a time, because the specialization will no longer be in conflict with the primary template regarding exception specifications. The primary's specification could, of course, be reused here, but it's complex and if the machinery around it is changed later on, it will not affect Q_DECLARE_SHARED classes. Change-Id: I3389a655a9fd8de370f363c8fcef60269a9f506c Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUnicodeTables: mark all functions as nothrowMarc Mutz2015-01-103-36/+36
| | | | | | | | | | | | 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>
* QModelIndex: plaster API with Q_DECL_NOTHROWMarc Mutz2015-01-101-13/+13
| | | | | | | | | | | | | | | | 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. The functions that actually call into the model (data(), flags(), sibling(), ...) can throw (bad_alloc, if nothing else). Consequently, they're not marked nothrow. They're the only ones. Change-Id: Id0413212b0f1c049a339480ee449a53c3ca9fea0 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>
* eglfs: Update screen destruction to follow the new approachLaszlo Agocs2015-01-093-2/+13
| | | | | | | | Call destroyScreen(), like other platform plugins do since 9b4fbe85d2e00c625c3d4abd975faf555000f685. Change-Id: Idbddb026d7a964f15c00acfacf70064405dc3f16 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* moc: Work around 'unused variable' MSVC warningKai Koehne2015-01-091-1/+2
| | | | | | | | | | | | MSVC prints warnings if all slots are actually static methods: moc_xxx.cpp:71: warning: C4189: '_t' : local variable is initialized but not referenced This can be easily avoided by using Q_UNUSED. Change-Id: Ice134a8a8d3e6aef1df1e7a89e9a2867281580fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* MSVC: Disable compiler warning 4996 for debug buildsKai Koehne2015-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | Move compiler warning 4996 from level 3 to 4. This is needed to avoid warnings about the use of C++ standard library functions like std::copy, which is used e.g. in qvector.h (since c6752c5aa19): 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' Because the warning has to be disabled before any standard C++ header is included one cannot just fix this locally in qvector.h. Change-Id: I929f1535656bca9f5beb7fd0d557178370c232c6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Get rid of QT_NO_QWARNING_MACROKai Koehne2015-01-092-3/+2
| | | | | | | Just use QT_NO_QDEBUG_MACRO, like we do already for qInfo. Change-Id: I4b2ef68427fbe6f253fe02a3ab161fa25186e834 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QtInfoMsgKai Koehne2015-01-0923-63/+462
| | | | | | | | | | | | | | Add an 'info' message type that can be used for messages that are neither warnings (QtWarningMsg), nor for debugging only (QtDebugMsg). This is useful mainly for applications that do not have to adhere to the 'do not print anything by default' paradigm that we have for the Qt libraries itself. [ChangeLog][QtCore][Logging] QtInfoMsg got added as a new QtMsgType. Use the new qInfo(), qCInfo() macros to log to it. Change-Id: I810995d63de46c41a9a99a34d37c0d417fa87a05 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* QStandardPaths: add AppConfigLocation.David Faure2015-01-0910-14/+78
| | | | | | | | | | | | | | | | | | | ConfigLocation was erroneously inconsistent, by adding the org name and app name on Windows (unintentionally) and not on Unix (while having subdirs in ~/.config is actually common practice for some XDG desktops) Therefore this adds AppConfigLocation, which always has the org name and app name (while GenericConfigLocation never does). [ChangeLog][QtCore][QStandardPaths] Added QStandardPaths::AppConfigLocation, for application-specific configuration directory. ConfigLocation was inconsistent. Task-number: QTBUG-38872 Task-number: QTBUG-38845 Change-Id: I80fb98f296436261f3996c9df87571c29b06ab35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStateMachine: replace a QHash key involving a QPointerMarc Mutz2015-01-092-4/+22
| | | | | | | | | | | | | | | | Using QPointers (or any type that makes a QPointer part of its identity) as a key in any associative container is wrong. They get externally set to nullptr, violating the associative container's class invariants, which could lead to data corruption, even though bucket-based hash implementations are less susceptible than binary trees. To fix, write a new class that acts much like the old QPair<QPointer<>,QByteArray>, but uses the QPointer only as a guard, not as part of its identity. To preseve identity, also saves the naked pointer originally passed and uses that for op== and qHash(). Change-Id: I4fa5a6bf86bad8fe7f5abe53d7c7f3ad3754d8d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStateMachine: fix some misleading codeMarc Mutz2015-01-091-3/+2
| | | | | | | | | | | | | | | | | | The old code creates a RestorableId from the passed (QObject*, QByteArray) and used it for lookup in a hash table (ok) and as a container for the (QObject*, QByteArray), satisfying later references to those parameters from the RestorableId instance instead of using the parameters directly. Now, RestorableId holds the QObject* in a QPointer, so the code might have wanted to detect the object being destroyed as part of the operation, BUT: a) the operation is a read-only one, and b) the code didn't check for nullness before dereferencing the QObject*. Fix by moving the creation of the RestorableId into the scope it's used and otherwise using the parameters directly. Change-Id: Iaf12f722fe6841ee1a55037fe33a6115aa699aca 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-094-0/+205
| | | | | | | | | | | | | | | | | | | 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>
* Don't specialize std::swap, just overload it in the global namespaceThiago Macieira2015-01-091-8/+3
| | | | | | | | | | | | | | This is the modern, correct way of providing a swap operation. See http://stackoverflow.com/a/8439357/134841 for more information. By changing this, we also fix Qt building with ICC and libc++. This patch also adds a noexcept() rule to match what the C++11 standard requires. Change-Id: I18f22fe7c92cf253e94168e1312346b4c183f536 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMutex/QReadWriteLock: mark bootstrap implementations nothrowMarc Mutz2015-01-092-28/+28
| | | | | | | | This is primarily to get a cleaner build of src/tools under -Wnoexcept. Change-Id: I0dea21e70aad56b25675fc59fac0327b55ee83e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix authenticated POST/PUT http requests with buffering disabledAllan Sandfeld Jensen2015-01-094-44/+2
| | | | | | | | | | | | | | If reset is disabled then POST and PUT requests can not be authenticated as the upload device can not be reset. There shouldn't be any reason that shouldn't be allowed if the QIODevice given supports resetting. The disableReset feature of QNonContiguousByteDevice is removed as it is not used anywhere else, and is redundant when reset can indicate success or failure. Task-number: QTBUG-43628 Change-Id: If941a98fd3f797872351c10bdca6aa6745dbefea Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Seal shared memory on POSIX IPCTobias Koenig2015-01-091-0/+7
| | | | | Change-Id: I5dc3807af904ad77db82d49b38b4c8e66d2d4de6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use O_CLOEXEC flag POSIX shared memory handleTobias Koenig2015-01-091-0/+14
| | | | | Change-Id: Ie554c5963112b88c058082085dbc9eed42a41861 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add POSIX IPC support to QSystemSemaphore and QSharedMemoryTobias Koenig2015-01-0914-344/+903
| | | | | | | | | This patch is a forward-port from 4.8 branch (d869e1ad4b0007757e97046609de2097cd9e9c5d). Change-Id: I6ae36a5417d1176fbecf775668f6033b1cb22a94 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a configure-time check for an IPC supportTobias Koenig2015-01-095-0/+136
| | | | | | | | | | | | | Adds a configure check for System V and POSIX IPC. System V takes precedence over POSIX IPC, and if both are not supported, QT_NO_SHAREDMEMORY and QT_NO_SYSTEMSEMAPHORE are defined. This patch is a forward-port from 4.8 branch (6ef4abaa9cd7d465cbae5cbf8cb4664bef387d10). Change-Id: I3ec20342f0f0266843479634109b67c6989dd296 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileSystemWatcher: Use FSEvents FSW on OS XGabriel de Dietrich2015-01-091-4/+4
| | | | | | | | | This removes one of the last references to 10.6. Change-Id: Ie23d9aba698714460e7478a421e85d4ad50d4ec9 Task-number: QTBUG-43505 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add OptimizedWrite & ProgressiveScanWrite options to QImageIOHandler and use ↵Andy Maloney2015-01-095-5/+104
| | | | | | | | | | | | | for JPEG writing Exposes two options from libjpeg: the optimize option and progressive scan option. These are both lossless operations, so they do not change the image's quality. Using these switches can result in smaller jpeg files. Task-number: QTBUG-20075 Change-Id: I8d0bd6a712b8a365265b7bd517e136b0755b90cb Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Support threaded OpenGL on XCB/EGL.Gunnar Sletta2015-01-091-0/+2
| | | | | | | Broken since 8758f532ae6209bcf9447e27edc4fd412c0f173d. Change-Id: I04cb9a36088ab6753c9519a911d065617f88fe08 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Avoid exposing dependencies from libinput supportLaszlo Agocs2015-01-092-22/+29
| | | | | | | | | | | Do not include other headers from the main qlibinputhandler_p.h that serves as the external interface to the generic plugin for example. This way the clients do not need to care about xkbcommon headers and such. Task-number: QTBUG-43498 Change-Id: I56335cb19200fee830bdf4b1d203904f741f7489 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Introduce Windows version 10.Friedemann Kleint2015-01-082-0/+6
| | | | | | | | Detect OS kernel version 10.0 as Windows 10. Task-number: QTBUG-43413 Change-Id: I39307cf8cc2e7cc209d6a88b8576db87086fa20e 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>
* QSizePolicy: prepare for constexpr'ifcationMarc Mutz2015-01-081-6/+2
| | | | | | | ...by bringing expandingDirections() into a (C++11) constexpr'able form. Change-Id: I1922329a6f579df2b3504c8ae048224f9b229d6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTest: update docs for toString()Marc Mutz2015-01-082-3/+27
| | | | | | | | | | | | Following c61f8df4047a616ffcb5e775fa8e5981b13e193f, we now prefer overloading toString() in the type's namespace over specializing the primary template. Let the docs reflect that and add an example. Also suggest to delegate the messy raw char pointer handling to the existing toString(QString)/toString(QBA) overloads. Change-Id: Id76181faba86aea52588611ea64ea9b95371a733 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>
* Make qSwap() noexcept, if possibleMarc Mutz2015-01-081-0/+12
| | | | | | | | | | | | | This greatly increases the value of qSwap(), since not only does it automatically do the parallel std+ADL lookup of swap(), but also now centralizes the rather messy code involved to create a correct noexcept specification. Other code now can simply use Q_DECL_NOEXCEPT_EXPT(noexcept(qSwap(lhs, rhs))). Change-Id: Ia35df4876b143e86c4150ac452a48c3775c3702b 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>
* Add support for printing the real thread ID with QT_MESSAGE_PATTERNThiago Macieira2015-01-082-4/+44
| | | | | | | | | | | | | | %{threadid} should have been %{qthreadptr} but we forgot to make the change for Qt 5.4. So do it now. [ChangeLog][QtCore][Logging framework] %{threadid} now prints the real thread ID. On Linux, OS X, iOS, FreeBSD and Windows, the value is unique system-wide. On other systems, it will print something that may be process-specific (the value of pthread_self(3)). To print the pointer to QThread::current(), use %{qthreadptr}. Change-Id: Ie383ff864a11966cf5d095b966a30ace65d34ee6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtWidgets: convert remaining users of QSize::transpose() to transposed()Marc Mutz2015-01-084-11/+11
| | | | | | | | | | | ...because transposed() is inline (and transpose() is not). This is such a simple transformation (basically, a register rename) that it should be inlined, even a the expense of another assignment. (the expense being in the source, not the executable code, of course). Change-Id: I4e5a574e899a84444de8042d305f34f5a6045a3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtWidgets: convert some users of QSize::transpose() to transposed()Marc Mutz2015-01-0810-40/+14
| | | | | | | | ...because transposed() is inline (and transpose() is not), and because it makes the code more readable and compact. Change-Id: I5661ee6251be638fb40c5c748aa50a89de6f7735 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>