summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* De-duplicate QGraphicsItemPrivate vtableMarc Mutz2015-12-182-2/+8
| | | | | | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. Since QGraphicsItemPrivate is already exported, users of this class are unaffected by the change, and since it's private API, we don't need to avoid adding code to the out-of-line destructor until Qt 6. Also saves ~2.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Task-number: QTBUG-45582 Change-Id: Ibb404a43d5464e8e280ccebd5f95719852f5a986 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2015-12-188-26/+45
|\
| * Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-188-26/+45
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| | * QDockAreaLayout/QPlaceHolderItem: Store geometry excluding frame.Friedemann Kleint2015-12-152-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the geometry stored for floating dock widgets in QPlaceHolderItem::topLevelRect and QDockAreaLayoutInfo::saveState() included the window frame (frame position/content area size). This does not work in the case where a floating dock widget is deleted since the geometry is determined after reparenting the widget when the frame geometry is no longer available. Change the behavior to store the geometry excluding frame to avoid such problems and adapt QDockWidgetPrivate::setWindowState() accordingly. Task-number: QTBUG-49832 Task-number: QTBUG-45780 Change-Id: I84b5c80df6e1c9e738bbb1407b9047cc84719ce0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QFileSystemModel: report special files which are not symlinksGiuseppe D'Angelo2015-12-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since special files have file size == -1, they were always filtered out by QFileSystemModel, even when passing QDir::System as filtering option. Keep them instead. The testcase is more convoluted than it should be because QFSM is so broken that it returns valid indexes for invisible elements in the model (such as filtered out elements). Change-Id: I023a9813dbfeed7be99dded42c66b1191afdc17e Task-number: QTBUG-20968 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QWidgetBackingStore::markDirty(): Clamp dirty region to window size.Friedemann Kleint2015-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Graphics effects may exceed the window size, causing platform backing store operations to fail (see QWidgetPrivate::effectiveRectFor()). Task-number: QTBUG-49785 Change-Id: Iff16da599397d19acb86010fe7023f3ce15b6d6f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * QFileSystemModel: do not unwatch directories if removal failsGiuseppe D'Angelo2015-12-101-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... otherwise we would not detect subsequent file/directories added into the non-removed one. Change-Id: I43018dfb9a9c6c0399190800da3f0d572ec5d8d8 Task-number: QTBUG-49307 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Fix URL to "The Microsoft Windows User Experience".Friedemann Kleint2015-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-49799 Change-Id: Ie03ac06966ed97888c0a348a3f2195fd7cbd299a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * Fix QAction::menuRole() documentationMitch Curtis2015-12-091-1/+1
| | | | | | | | | | | | | | | Change-Id: I9299948ba99634ea92f8b5cd4405e814e86f6aa6 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * Fix QAction MenuRole documentationMitch Curtis2015-12-091-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib5e5353480b640f5bcc0e21682de168fadde78fc Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * Reduce flushes with repaint() when GL-based compositing is activeLaszlo Agocs2015-12-091-0/+20
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-49655 Change-Id: I7a5d08f681a7d87709aac745154730764040e922 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| | * doc: fix the shortcut for QListWidget::itemActivatedLiang Qi2015-12-091-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-49805 Change-Id: Ia7317e9c6ad5b5f6c17ff1e197ec690ebc20da3d Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * QFileDialog: Call reject() on Key_Escape even when itemview has focusGiuseppe D'Angelo2015-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace hide() call (present in itemViewKeyboardEvent since Qt 4.5) by reject(). Add signal spy to existing test function. QDialog doc states that reject() will always be called on Key_Escape. hide() is not enough: it makes exec() terminate and return the proper value, but the signals finished(int) and rejected() will not be sent. Task-number: QTBUG-7690 Change-Id: Ica4ae2843574478c5b9a7672f871f3ef3f16f3c9 Done-with: Jan Blumschein <jan@jan-blumschein.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | QFlickGestureRecognizer: hoist a constant subexpression out of a for loopMarc Mutz2015-12-181-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | It's a virtual function call, followed by another out-of-line function, so the compiler cannot hoist the expression out of the loop itself. But we can, so do it. Change-Id: Icffa6fa9a667d566b0829a18fea7128625e85920 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | QScrollerPrivate: fix some const-incorrectnessesMarc Mutz2015-12-173-8/+8
| | | | | | | | | | | | Change-Id: Iad7ea926b90efa54ef94c04ac78e38254d9b5c98 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsScene: replace QList::prepend()s with appends()Marc Mutz2015-12-171-3/+3
| | | | | | | | | | | | | | | | | | Use the new reverse_iterator support in QList to avoid building a QList with prepend()ing, using append() instead. Change-Id: Ia1f6d0ecc08a824f11d93a6fd4077b11b1b0f786 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QApplication: replace QList::prepend()s with appends()Marc Mutz2015-12-171-5/+5
| | | | | | | | | | | | | | | | | | Use the new reverse_iterator support in QList to avoid building a QList with prepend()ing, using append() instead. Change-Id: I6b9d9b1a9941cf2e6cc39ad2d9097fdc629c24bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QFlickGestureRecognizer: remove a useless checkMarc Mutz2015-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There's no point in checking isEmpty() to prevent a for loop from executing, esp. if the checking involves copying the container and calling an out-of-line function to get said copy. Just fall through the for loop. Change-Id: If6c689ff4bcd685bc645b4fb3f2c15ce5d5945af Reviewed-by: Sérgio Martins <iamsergio@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsAnchorLayout: replace three loops over QHash::keys() with ↵Marc Mutz2015-12-162-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | QHash::const_iterator loops Quite obviously faster (doesn't need to populate a QList first, just to iterate over it). Also saves 1.5KiB text on optimized GCC 4.9 Linux AMD64 builds. Change-Id: If4c7af80165a6027d39359bac22df30e7ca09815 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QGraphicsAnchorLayout: replace a Q_FOREACH with std::accumulateMarc Mutz2015-12-161-4/+2
| | | | | | | | | | | | | | | | Saves ~0.5KiB in text size on optimized Linux AMD64 GCC 4.9 builds. Change-Id: Iba2c02eed44f1ee3521bc49fe7afae9c2e916fdc Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsAnchorLayout: own includes go firstMarc Mutz2015-12-161-1/+2
| | | | | | | | | | | | | | ... to check that they compile stand-alone. Change-Id: I10f651125c17ea64c631f2bede4332ea71d50a10 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QFileDialogPrivate::restoreWidgetState(): use range-erase instead of while ↵Marc Mutz2015-12-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | pop_front() Depending on the number of popped arguments, repeated pop_front()s could turn quadratic even with QList. Change-Id: I1f29af4a61f0f8e13253807d2f208c7911e71378 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: replace some index-based for loops with C++11 range-forMarc Mutz2015-12-1622-170/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iteratoed over using range-for. In the cases of this patch, that cannot happen, because all containers are marked as const (either by this patch or before). Separate patches will deal with other situations. Apart from being more readable, range-for loops are also the most efficient for loop. This patch shaves almost 2K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I53810c7b25420b4fd449d20c90c07503c5e76a66 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: replace some Q_FOREACH loops with C++11 range-forMarc Mutz2015-12-166-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iterated over using range-for. In the cases of this patch, that cannot happen, because all containers are marked as const (either by this patch or before). Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves almost 3K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I7b1d41db4d9b5db8b515cb75686dc5135177da68 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QMessageBox: optimize textToCopy string constructionMarc Mutz2015-12-151-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Keep 'separator' a QLatin1String. - saves at least two memory allocations - necessitates carrying the \n previously prepended to it around explicitly 2. Start adding to 'textToCopy' with op+= - saves one allocation, costs one -> ±0 - preallocates more capacity than if we started with assignment 3. Collapse three unconditional op+= into one - more efficient usage of QStringBuilder 4. Don't collect button texts in a separate variable, but append to 'textToCopy' directly. - saves at least one memory allocation, probably more since the growth increments of 'textToCopy' should be larger (due to more content) than those of a new variable. Also replace index-based iteration over the buttons with C++11 range-for over a const QList. Avoids the detach that happened previously, due to use of op[] instead of at(), but frankly, I was just too lazy to separate this change. Change-Id: I27a46a6a163c16d773124f140e085325b17ce5d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | [docs] Fix assocated -> associatedMarc Mutz2015-12-153-6/+6
| | | | | | | | | | Change-Id: Ia828db7bb71b874b19a610439e156687f273290f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QTreeWidget: fix const-incorrectness in indexFromItem() parametersMarc Mutz2015-12-152-2/+14
| | | | | | | | | | | | | | | | | | The item to look up isn't modified, so take by pointer-to-const. Can't change the API, so overload and mark the old function for removal in Qt 6. Change-Id: I4671c6b079687ec9d81b1ac0e6745887ef7077cd Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | widgets: Pass non-trivially-copyable or large types by const-refSérgio Martins2015-12-1210-10/+20
| | | | | | | | | | Change-Id: I912c6a9ee7b27350ac3d1fe147b697338e76f53c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QStyleOption*V<N>: mark as Q_DECL_DEPRECATEDMarc Mutz2015-12-111-12/+12
| | | | | | | | | | Change-Id: If9c5ec8193e51b2a8b091f46916fc74d2d03f1df Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QLineEdit: fix the shortcut override events on a readonly line editGiuseppe D'Angelo2015-12-091-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QLineEdit is readonly there's a discrepancy between key press events and shortcut override events. For instance, presses Ctrl+C copies the text unless there's also a shortcut for the same key sequence. In this case, the shortcut override event is not handled, and no text is copied. Fix it by splitting the handling of shortcut override events between "read only" access (copy, select, etc.), which still makes sense on a read only line edit, and write access (paste, ...) which doesn't. [ChangeLog][Important Behavior Changes][QLineEdit] QLineEdit will now accept certain shortcut override events even if it is read only. Change-Id: Ie5b048259b99a1eff0581129e3ad97f27a88fe86 Task-number: QTBUG-21217 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | QAIV - allow users to control single step in ScrollPerPixel modeThorbjørn Lund Martsum2015-12-098-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that we scroll one pixel, but changing the behavior in 934f06220391eb0e0ebf66a2eb037f48adb4c43c to do that was not well received. People were relying on the undocumented behavior - and the new behavior was considered to be a regression. (Nobody called setSingleStep since Qt in many cases provide a reasonable singleStep - which implied that their programs scrolled with 1 pixel which was quite slow). Furthermore getting the old behavior (auto set of single step) was nearly impossible. However the revert (done in 0e69230d02813f0b7a050645fb7e443bd504ab6a) gets us back to QScrollbar::setSingleStep not working in pixel scroll mode (even without it being documented - but we should also have a working API rather than documenting that it is not working) The previous approach was directly prevented Qt from changing single step (on e.g resize) at all. This patch only prevents Qt from changing when a user explicitly has called the function QScrollBar::setSingleStep (in pixel scroll mode). That is we expect that calls to setSingleStep means that the user actually wants to set the singleStep and doesn't want Qt to control that value. Furthermore it is possible to switch back to the automatically adjusted singlestep with QScrollBar::setSingleStep(-1). [ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews when scrollMode is set to scrollPerPixel, it is now possible to change the single step. Qt will automatically adjust the single step until setSingleStep is called. When setSingleStep is called it will however respect the set and stop doing automatic changes of the value. Calling setSingleStep(-1) will switch mode back to automatic adjust. Task-number: QTBUG-7232 Change-Id: Ibfe0caa9751d3bcc11bfc6e0654a3d1ac35ac8ae Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Remove dead code from QWidgetLineControlGiuseppe D'Angelo2015-12-082-8/+0
| | | | | | | | | | | | | | | | | | | | The code for _q_clipboardChanged comes from some ancient time (Qt 3's QLineEdit::clipboardChanged, subsequently refactored in Qt 4 and Qt 5). The best part: it has always been a slot doing absolutely nothing. Get rid of it. Change-Id: Icc2c71920377d069529bb7ed7c40c15f46fbb455 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-083-20/+48
|\| | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * Remove additional copyright noticeRainer Keller2015-12-072-20/+0
| | | | | | | | | | | | Change-Id: I181579d755a79e2e0a26ff2de119d9642183a2ca Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Doc: added doc for missing stylesheet outline properties.Nico Vertriest2015-12-031-0/+48
| | | | | | | | | | | | Task-number: QTBUG-26673 Change-Id: Iaf13921515981c09a84822e66fd1ed21d73779f6 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | QtWidgets: mark some constructors explicitMarc Mutz2015-12-075-13/+13
| | | | | | | | | | | | | | Non-public API. Change-Id: I68628c51df815f26e8de7522629a611f805673bb Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QApplication: replace some sneaky code with a strategic gotoMarc Mutz2015-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of replacing the container iterated over, in the middle of the loop body(!), place a label in front of the loop and use goto to restart the entire loop. This allows to mark the variable 'list' const, which is a prerequesite for replacing the loop with a C++11 range-for one. But it also makes the code less cryptic. No-one expects the container to be re-seated in the middle of the loop. The compiler agrees: saves 144b of text size on optimized AMD64 GCC 4.9 Linux builds. Change-Id: I22d07672a1bbe9d7ffb083ae231eda760c29d350 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QAbstractItemView: replace a QPair with a dedicated structMarc Mutz2015-12-073-5/+13
| | | | | | | | | | | | | | | | | | | | In a QPair, the member names {first, second} have no semantic value. A simple struct, while not as featureful as QPair, can be given meaningful member names, {rect, index}, in this case. Change-Id: If1e289ecee82a1cb020ac3a854efd2ec1096493b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QMdiArea: replace a QList<int> with a QVectorMarc Mutz2015-12-041-1/+1
| | | | | | | | | | | | | | A QVector<int> uses 50% less space on 64-bit platforms. Change-Id: I6a2174b04b362188597bc42cad84b7ce2018ea78 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Clean up QGraphicsItemCache::purge()Marc Mutz2015-12-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code assigned an empty QPoint to elements contained by value in a QHash that was cleared out in the very next step. That makes no sense, because the operations in the loop cannot possibly cause a re-entrancy into QGraphicsItemCache, which would be the only explanation for modifying the state of a death-row object. While at it, replace the use of the highly inefficient (and no longer needed) QMutableHashIterator with C++11 range-for, taking care to iterate over a const reference to avoid detaches. Change-Id: Ie3eba0f954644a27932666bc9e97f1ca8f36a578 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Give names to enum used in templates.Rolland Dudemaine2015-12-041-1/+1
| | | | | | | | | | | | | | | | The GHS toolchain needs names for enumerations that are used for template instantiation. Change-Id: I4e184cd77074fd7ece89f21317536e6006ab257d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use default home directory from QDir for INTEGRITY.Rolland Dudemaine2015-12-041-1/+1
| | | | | | | | | | | | | | | | Using single-process mode of INTEGRITY, there is no notion of user, so no notion of home directory or tilde expansion. Change-Id: Ia128b8cd2c7392ba9cf201b74a5118b94d79b4c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QMdiArea: fix quadratic behaviorMarc Mutz2015-12-031-10/+8
| | | | | | | | | | | | | | | | | | | | | | Repeatedly calling QVector::erase(it) (via QMutableVectorIterator::remove()) results in quadratic runtime. Use std::stable_partition, which does exactly what the old code tried to do, except in linear time. Change-Id: I6e5911ee781071bbb84d72449c969e3b9907da51 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QMdiArea: fix unintended reallocationsMarc Mutz2015-12-031-1/+1
| | | | | | | | | | | | | | | | | | The capacity of 'result' is reserved, but QVector::clear() always deallocates. Fix by using resize(int) instead, which at least preserves capacity when it has been reserve()d. Change-Id: I198d532661f4f767588c4ce244c2454eb8823e54 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QMacStyle: fix quadratic behaviorMarc Mutz2015-12-031-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repeatedly calling QVector::erase(it) (via QMutableVectorIterator::remove()) results in quadratic runtime. Separate the removal of expired objects from the sending of the event to the remaining objects, so we can use QVector::removeAll() for the former, which does exactly what the old code tried to do, except in linear time. Use range-for for the sending-loop. This could cause detaches, but since we modify the container two lines before, and we don't copy it anymore, anywhere, detaches are impossible. Change-Id: I9aa6427e3646c8ad92b673fe42a86a0dfe79ee80 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2015-12-0317-139/+111
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-0217-139/+111
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| | * Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-011-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| | * Don't use QList<QPair>Lars Knoll2015-11-305-12/+12
| | | | | | | | | | | | | | | | | | | | | Change it to use a QVector instead. Change-Id: Ie1749f326ba1165db48c0eb8763eb738672c7afd Reviewed-by: Marc Mutz <marc.mutz@kdab.com>