summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QHostInfo: optimize container usageAnton Kudryavtsev2016-03-131-24/+38
| | | | | | | | | | | | | | | Replace Java-style iterators with STL-style iterators. Java-style iterators have overhead. Use std::stable_partition with erase() instead of using remove() in a loop, with quadratic complexity. Introduce local template homebrew any_of (analog of std::any_of from C++11) to simplify current code. Also it's needed for following changes in this class. Change-Id: I2b11889ccc7630597c72aa20cdb266ae6ca2471a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtGui: de-duplicate calls and cache resultsAnton Kudryavtsev2016-03-137-18/+24
| | | | | | | Change-Id: Iaf232c31d6780b49dc6a3d0faafb9717f3c36e65 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Don't quote newlines in multi-line shader linker errors.Volker Krause2016-03-131-2/+2
| | | | | Change-Id: I055758b73a9992786b6c4542396dc82fda1444b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QMimeTypeParser: plaster error paths with Q_UNLIKELYMarc Mutz2016-03-132-7/+7
| | | | | | | | | | | | ... when more than a return would be executed, to prompt the compiler to move it out of the way of the normal execution path. Unexpectedly costs ~200b in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I0ebfb56af7c2262f64271a1b0ec46533e6000bc9 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QHttpNetworkConnection: fix spelling in qWarning()Marc Mutz2016-03-121-1/+1
| | | | | Change-Id: I87dcdc1b81e90d4bac180731fd78d0fea38191b6 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* QOpenWFDDevice: fix BrE spelling and grammar in qDebug() outputMarc Mutz2016-03-121-1/+1
| | | | | | | | | | Also print the failing type. Sanity Bot complained about the spelling and Friedemann about the grammar and missing type information in the output. Change-Id: I7f38c56e569312e082e7b6baf9d556f5e7e40f80 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-1248-141/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Fix documentation of QFlags::setFlagOlivier Goffart2016-03-111-1/+1
| | | | | | | The function is not const Change-Id: Ibe6f774058efd5ed5de021ff024d023b3cfc7e04 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* QItemSelectionModel: refactoring of internal functionsAnton Kudryavtsev2016-03-111-16/+12
| | | | | | | | | | | | Introduce template helper function qSelectionIndexes(). Template argument is container. Now we have the same code for QVector and QList. Also it's needed for a follow-up change in this file: add method QModelIndex QItemSelection::index(). Change-Id: I7f86a9b96e5feac9873cf0df7a1cbca74f9191ec Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Optimized implementation of QReadWriteLockOlivier Goffart2016-03-115-192/+401
| | | | | | | | | | | | | | | | | | | | | | QReadWriteLock is supposed to be a better alternative to QMutex when there are only a few writers but potentially lots of reads. However, in practice the previous implementation was much slower, unless you really do a lot of work with the lock for read and you have lots of contention. Indeed, the previous implementation was locking a QMutex both for lock, and unlock (making it already at least twice as slow as QMutex). This new implementation brings QReadWriteLock back to the same level as QMutex: - No memory allocations in the uncontended case (almost no overhead allowing to create many of them in classes) - Lock-free if there is no contention Should support up to 2^31 concurrent readers on 64 bit platforms, and 2^28 on 32 bit platforms Change-Id: Ifa2fc999075cbb971088f4ee8e6fde78ce262da3 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* ibus: remove some unneeded member init'ingMarc Mutz2016-03-111-17/+1
| | | | | | | | | I was surprised this compiled at all, since I thought QT_NO_CAST_FROM_ASCII was in effect in Qt, but apparently it isn't. Change-Id: Id77743a2ca1b7f865960dc78d169584741f18d43 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtCore: use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-1115-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Saves ~750b in text size on optimized GCC 5.3 AMD64 builds. Change-Id: I8bf3e46cd5a6b2cae0ceb3e355a50f61925c63d3 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* QIBusEngineDesc: initialize all members when deserializing from older versionsMarc Mutz2016-03-101-17/+21
| | | | | | | | | De-duplicated code using, as suggested in previous review, strategic gotos. Change-Id: I4550dd8eff99789a41d8bb0b015bc4f51e3969fe Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* ibus: mark some types as movableMarc Mutz2016-03-102-26/+5
| | | | | | | | | | | | | | | These types are held in QVariant, and QIBusAttribute is also held in QVector. Now that they are no longer polymorphic, they can be marked as movable. Remove user-defined dtors to unlock the implicit move special member functions, which I enforce in my local tree for all Q_MOVABLE_TYPEs. Add std::move() when appending QIBusAttribute. QVector has rvalue-push_back(). Change-Id: Ibb359939d5c11b5ef1f8ceced9a051cdde452dd5 Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* ibus: de-virtualize QIBusSerializable hierarchyMarc Mutz2016-03-103-106/+114
| | | | | | | | | | | | | | These types don't inherit to be reused, they inherit to reuse. Consequently, change the inheritance to private, remove the virtual ~QIBusSerializable and rewrite the streaming operators as member functions. Remove the now-unused QIBusSerializable streaming operators and meta-type registration. Change-Id: Icf7a89174592ba62b39f73f0f016c8296cab5993 Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Deobfuscate SFNT tag creation on WindowsEskil Abrahamsen Blomfeldt2016-03-101-10/+7
| | | | | | | | | | The fact that we override the big endian MAKE_TAG macro (from qfontengine_p.h) with a little endian version on Windows caused some confusion and was a bug waiting to happen. This patch renames it instead to avoid future confusion. Change-Id: I6224a4bfbd80eafc849ecd82e7fe5f83ee1953af Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add device mkspec for NVIDIA Jetson TK1 development boards.Volker Krause2016-03-092-0/+71
| | | | | | | | | Despite the very similar name and hardware, the software stack is completely different compared to the Jetson TK1 Pro we already have a mkspec for. Change-Id: I45353ece195035e961ff47df55d6361569aabb04 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* CoreLib: replace Java-style iteratorsAnton Kudryavtsev2016-03-092-9/+6
| | | | | | | | | ... with STL-style iterators or with algorithms. Java-style iterators have overhead. Change-Id: Ibeace7357c205a39dff3ca3fc0c835a026a15cac Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* iOS: Disable usage of crc32 intrinsics.Erik Verbruggen2016-03-081-0/+7
| | | | | | | | | | | | | | To quote http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160222/151168.html : > AArch64: fix Cyclone CPU features list. > It turns out we don't have CRC after all. Who knew? So clang did define __ARM_FEATURE_CRC32, while the CPU didn't support the crc32 instructions, resulting in EXC_BAD_INSTRUCTION. Change-Id: I4b0123ac5e7fd04696c05bfe7dacce205cffac8f Task-number: QTBUG-51168 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* ARMv8: fix crc intrinsic usage.Erik Verbruggen2016-03-081-1/+1
| | | | | | | | | | | | ARMv8 defines the crc32 instructions as optional features. Even though the target might be ARMv8, the compiler might have been told that the target CPU doesn't support it, in which case __ARM_FEATURE_CRC32 is not defined. Subsequently, the arm_acle.h header might only define the intrinsics when __ARM_FEATURE_CRC32 is defined. Change-Id: I85efcf9efdd2e152e3f3e72310122eebf543ca3b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* configure: Remove Windows CE.Friedemann Kleint2016-03-081-172/+5
| | | | | | | | The platform has been removed in Qt 5.7. Task-number: QTBUG-51673 Change-Id: Id0b26e94bd8a673a35bfa5e02a5ba1c30891764a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Make API-16 the default oneBogDan Vatra2016-03-081-1/+1
| | | | | Change-Id: I5874117b897c6a1c144b8e2c5d40312a47fe2713 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6.0' into 5.7v5.7.0-alpha1Oswald Buddenhagen2016-03-0714-29/+631
|\ | | | | | | Change-Id: Idcda6d52266f557ce4a819b6669f6797473a48a2
| * DirectFB: Fix build in C++98 modev5.6.0Thiago Macieira2016-03-032-5/+5
| | | | | | | | | | | | | | | | | | | | Many DirectFB types have constructors in C++, so we can't initialize them with = {...}, like we would be able to if they had been regular POD types. Change-Id: Ic747cc2ab45e4dc6bb70ffff143840e5780ac2bc Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
| * fix non-git non-prefix shadow buildsOswald Buddenhagen2016-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | turns out we need forwarding .pris in this case: without them, QT_MODULE_INCLUDE_BASE points into the build dir, so we fail to find the pre-generated headers. an alternative would be writing primary module .pris which already take that into account, but that would just add even more arcane code paths. Task-number: QTBUG-51521 Change-Id: I59f2a0d3f2095c9dfa0a8d1cabfc007a30bd2d23 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Add changelog for 5.6.0Frederik Gladhorn2016-03-011-0/+519
| | | | | | | | | | | | | | | | Change-Id: Ib3177028cf1cbd124ebf1449d5e00039f38b1a92 Reviewed-by: Tuukka Turunen <tuukka.turunen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Fix syncqt.pl not respecting #pragma qt_no_master_include in files with ↵Simon Hausmann2016-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | Windows line endings We need to do the same chop trick that we do further down the file. Change-Id: If4f832f375a11473e66adfcfa76a3b4504b3d406 Task-number: QTBUG-51324 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix crash when a standard bus isn't availableThiago Macieira2016-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Commit 1f6fa1f37a14742ddf53c753ce52d9dc048cd1dc added a way of suspending delivery of messages to standard buses when they connect and resuming delivery when the main loop starts. As a side-effect, we caused an attempt to do dispatching even after the connection failed. The D-Bus library doesn't like that. Task-number: QTBUG-51299 Change-Id: I0c94a5c2846b48c8aea7ffff143564f7fcede890 Reviewed-by: David Faure <david.faure@kdab.com>
| * Doc: Simple CSS style: Convert font-sizes from px to ptTopi Reinio2016-02-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike other rendering backends, QTextBrowser treats px unit in stylesheets as physical pixels when printing, resulting in too small to read font sizes. Work around this by converting font-size px units to pt. Change-Id: I70c71d8bda0996f793bf1c4558775384fe6ec297 Task-number: QTBUG-51083 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
| * Fix builds without session management.v5.6.0-rc1Andreas Hartmetz2016-02-181-0/+4
| | | | | | | | | | | | | | My previous change broke it. Change-Id: I3c3a9a65775032a95eebf3526c1bbf2c50773230 Reviewed-by: Samuli Piippo <samuli.piippo@theqtcompany.com>
| * Add option to disable "session management by closing windows".Andreas Hartmetz2016-02-157-12/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That feature is a poor man's session management for applications that do not implement any specific session management features. It badly interferes with proper session management support, so applications must be able to disable it. This enables fixing applications with QGuiApplication::quitOnLastWindowClosed() true - the default - dying too early, before they are enumerated for the list of applications to restart on session restore, thus preventing them from being restored. See https://bugs.kde.org/show_bug.cgi?id=354724 [ChangeLog][QtGui] Qt asking to close windows on session exit as a fallback session management mechanism has been made optional. Disabling it fixes session management for applications that implement full session management. See QGuiApplication::isFallbackSessionManagementEnabled(). Task-number: QTBUG-49667 Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | Add QWheelEvent::inverted()Morten Johan Sørvig2016-03-0611-22/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some consumers of wheel events need to know if the scrolling direction is inverted in order to provide consistent behavior. For example, the scrolling direction of a horizontal slider should not change when the user toggles the "natural scrolling" setting on OS X. In this case the inverted bit will change state and the slider can compensate. This change adds a bit to QWheelEvent and sets it on OS X. Task-number: QTBUG-35972 Change-Id: I221435dea45d436d570b113bd0e24ee6f6832211 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | tst_qglobal.cpp: fix compilation with an actual C++14 compilerMarc Mutz2016-03-051-2/+2
| | | | | | | | | | Change-Id: I66819f3708f0489006f997f43f1051b81f7b647e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | xcb: support more visual formatsLouai Al-Khanji2016-03-041-0/+14
| | | | | | | | | | Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbBackingStore: Minor code cleanupLouai Al-Khanji2016-03-041-8/+2
| | | | | | | | | | | | Change-Id: I5086e2031201b939b49603f17c373e414a91c32a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Do not create OpenGL-enabled platform windows for raster windowsLouai Al-Khanji2016-03-041-1/+1
| | | | | | | | | | | | Change-Id: I07d12441db6c7f289363417e21fec65bfcf08b78 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Drop hand-rolled ASCII conversion from QAbstractConcatenable::convertFromAscii()Marc Mutz2016-03-041-15/+1
| | | | | | | | | | | | | | | | | | | | QUtf8::convertToUnicode() contains a SIMD-enabled ASCII fast-path already which is likely faster than what the compiler will emit for the old code here. Change-Id: I6afae9689424eb53a9f7c01359cc4f57ffcead26 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | iOS: rely on built-in compiler macros to check for CPU featuresErik Verbruggen2016-03-041-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | iOS cannot do runtime feature detection, and querying the CPU is only allowed in kernel mode (or beyond), so we have to decide the features at compile time, in which case we might as well use the fallback code path that uses the built in __ARM_* macros to point out which features are supported, instead of hard-coding the features for iOS. Change-Id: Ie507c0d8e962a7bdab16508c8b8122645276512e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | QFontEngine: use RAII for font_, face_ membersMarc Mutz2016-03-045-50/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap the pairs of (void *ptr, void (*dtor)(void*)) in essentially a std::unique_ptr. This simplifies code and provides the correct implicit destruction, so we can drop the explicit glyph-cache clear()ing in ~QFontEngine(), leaving that job to ~QLinkedList. A subsequent change will turn the QLinkedList into a C array, the clearing of which would otherwise cause excessive code bloat. Since we can't use std::unique_ptr, yet, provide a hand-rolled replacement for now, marking it for replacement with unique_ptr once we can use it. Make that a local type instead of providing a Qt-wide unique_ptr so we don't accidentally lock ourselves into a half-baked std clone we can't get rid of anymore. To prepare unique_ptr use with the same type-erased deleter (function pointer) as now, replace a nullptr destroy_function with a no-op function, so ~unique_ptr doesn't crash when we port to it later. Because QFreetypeFace contains the same construct and shares payloads with QFontEngine, use the Holder there, too. Even saves 150b in text size on optimized GCC 5.3 AMD64 builds. Change-Id: I5ca11a3e6e1ff9e06199124403d96e1b280f3eb2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtNetwork: use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-047-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Saves ~850b in text size on optimized GCC 5.3 AMD64 builds. Change-Id: Ib1a087795a03b2a6b432e2c499968df779aaea37 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | QtGui: use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-0421-47/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "..."; with qWarning("..."); In QTransform shared warning strings. Saves 3KiB in text size on optimized GCC 5.3 AMD64 builds. Change-Id: I142a8020eaab043d78465178192f2c8c6d1cc4f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Optimized fetchUntransformed RGB888Allan Sandfeld Jensen2016-03-044-0/+30
| | | | | | | | | | | | | | | | Reuses the optimized routines from qimage to make painting RGB888 images faster on SSSE3 and NEON. Change-Id: I99116b318322ba4cb0ddc2cb90bcf17a0350ef99 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QHttpNetworkConnection: fix expensive iteration over QMultiMap::values()Marc Mutz2016-03-041-3/+2
| | | | | | | | | | | | | | | | Just iterate over the container instead, saving one iteration and the creation of a temporary QList. Change-Id: I564e3e83cb247a12c413fc5a9dc17299ae089e30 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbNativeIntegration: Add query for compositing enabledGabriel de Dietrich2016-03-042-2/+8
| | | | | | | | | | | | | | Task-number: QTBUG-41195 Change-Id: I4f37c82f6757283ed58b38c7fd47849fb4810bce Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | QtNetwork: optimize container usageAnton Kudryavtsev2016-03-037-43/+61
| | | | | | | | | | | | | | | | | | Don't perform lookup twice. Just cache iterator or position. Change-Id: I454fd292614dee62167ff248fc3ddec0f79435b0 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QBearerEngine: break out repeated loops as methods.Anton Kudryavtsev2016-03-031-45/+25
| | | | | | | | | | | | | | | | | | | | Three hashes are handled similarly; so extract the loops over them as methods hasUsedConfiguration() and cleanUpConfigurations() to avoid duplicate loop code. Change-Id: I1040724c4fc98caa48913fac339c03e60b04bae2 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QtGui: mark some more types as movable/primitiveMarc Mutz2016-03-0314-0/+24
| | | | | | | | | | | | | | | | | | | | | | These are already held in QVectors. Public API types need to wait until Qt 6, for BC reasons. Even though Q_RELOCATABLE_TYPE deals with most of them, we lack a way to mark a type as primitive, but still isStatic - for QList. Change-Id: I91392b01ae6f94cc847007636e12d4e64c43b2bc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | QHostAddress: enable (N)RVO in toString() for gccAnton Kudryavtsev2016-03-031-10/+3
| | | | | | | | | | | | Change-Id: I5f8d72742cc4199bfa73df6037b851c58632ff86 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* | xcb: Be smarter about how we flushLouai Al-Khanji2016-03-031-59/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | For the remote X case the backing store previously always reuploaded image data for every expose event. Instead of doing that create a remote X pixmap and only flush repainted regions. For regular expose just copy from the pixmap. Additionally, atomically update the window by setting a clip mask and flushing the entire region at once instead of doing it rect by rect. Change-Id: I26bb1834b159e309c7ad93287dd297769f7e2633 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QLocalServer, QLocalSocket: simpler use of startsWith()Anton Kudryavtsev2016-03-032-2/+2
| | | | | | | | | | | | | | | | | | It has a variant accepting QL1S directly, so no need to go via a QString. Change-Id: Ia8f1198ef2af7027bc9f7c2e1dad3a5f78a12eb4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>