summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QListView: use erase and std::remove_if with QVectorAnton Kudryavtsev2016-01-112-9/+13
| | | | | | | ... instead of using erase in a loop, with quadratic complexity. Change-Id: I9686d117e092f5d74c6e74a462adf503a7b7ae79 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QDirModel: replace a QStack with a std::stackMarc Mutz2016-01-081-3/+6
| | | | | | | | | | | | | | | | | | | | | std::stack, based on std::vector, tends to be more efficient that QStack, based on QVector, but, crucially, it is an actual stack, so doesn't allow, say, iteration or insertion in the middle, which QStack does allow. Since a lot of places where QStack is used use at least some of those non-stack features, protect this instance which doesn't, yet, from becoming another such site. Since the use of std::stack with the default std::deque increases text size by almost 1K, and a vector makes a perfectly good stack, use std::vector as the backing container (which std::stack, being a container adapter, allows easily). Saves ~0.5KiB in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I51c8fb1dc4e9907ae00ed1cee8f320304321b322 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-0813-31/+103
|\ | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * QDesktopWidget::screenNumber(QPoint): fix handling of virtual desktopsBłażej Szczygieł2016-01-061-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | On X11, QXcbVirtualDesktop represents an X11 screen while QScreen represents an X11 output. In the case that there are multiple screens (possibly with multiple outputs), calculate the screen number correctly: Find the screen index on the primary virtual desktop first to avoid obtaining a screen index which doesn't belong to the primary virtual desktop when screen geometry is similar. Change-Id: I4cbb29b7aa7cd2125759ffbbbe3db4e934feaeae Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QDesktopWidget::screenNumber(QWidget*): check virtual sibling screensBłażej Szczygieł2016-01-061-17/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Find the root widget only when more than one virtual desktop exists and find the screen index using virtual siblings from this root widget. Use intersecting rects instead of middle point to obtain the screen. This can help to get the screen index when the middle point is outside the screen geometry, but part of the window is still on the screen. If the widget is completely outside the screen geometry, -1 is returned. This commit amends: a6b2a4642f07cd6e52b447e1e441b257990a8d03 Change-Id: I80247fc1956a82c487ee6f728d1576bf48b28748 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QFontDialog: optimize allocation of QFontDialogOptionsMarc Mutz2016-01-061-1/+2
| | | | | | | | | | | | | | | | Use QSharedPointer::create(), to fuse control block and payload into a single memory allocation. Change-Id: I8d87c73566c3be960e957ec0b5419a77da2fc8c9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Unbreak ubsan developer-buildMarc Mutz2016-01-067-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 5.3's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QFileDialogPrivate is a polymorphic non-exported class, so this failed at link-time. Ditto for the other cases. Fix by autotest-exporting the classs. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU, and the ctor, just because it's the correct thing to do. Change-Id: I2b7dba776282a2809c80eb2bc36440d7d698f926 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QMacPanGestureRecognizer - stop timer on 'reset'Timur Pocheptsov2016-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | _panTimer has a target - for example, widget. 'reset' should stop this timer. The problem (quite subtle and difficult to reproduce) found in tst_QTouchEvent: widgets created/destoryed by different tests but we still can have a timer waiting for event dispatcher to 'processEvents', firing with now-invalid dangling pointer - 'target'. Change-Id: Iccaf3368a8ee6a0a2f60e9dcdf5d40fb7392ca21 Task-number: QTBUG-49844 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Fix incorrect screen number reported by QDesktopWidgetBłażej Szczygieł2015-12-302-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Screens connected to separate graphics cards are detected as separate screens which don't have offset. This patch fixes obtaining the screen number by QWidget: it uses the screen assigned to the root widget. The patch also assigns a proper QScreen to each QDesktopWidget screen(). It also fixes closing a popup menu by clicking on another screen. Task-number: QTBUG-48545 Change-Id: I3d76261c0c067293d39949c4428b2d8dfd085dc7 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QHeaderView: Reset cached section sizes on font and style changeGabriel de Dietrich2015-12-211-3/+5
| | | | | | | | | | | | | | | | Change-Id: I7ce88b7e43249499343a9aae6acb806dd9c41f31 Task-number: QTBUG-33855 Task-number: QTBUG-37153 Task-number: QTBUG-50010 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QHeaderView and others: Fix font lookup nameGabriel de Dietrich2015-12-212-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It should the the actual class name, without any suffix. This also allows us to use the painter font when rendering CE_HeaderLabel and, as a consequence, change QHeaderView's font through the usual methods. Change-Id: I0b13ee349f5fa505be66a9c884c26885f5fc468f Task-number: QTBUG-33855 Task-number: QTBUG-37153 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Optimize QListViewPrivate::draggablePaintPairs()Marc Mutz2016-01-061-2/+3
| | | | | | | | | | | | | | | | | | Instead of converting a QVector to a QList to a QSet just to be able to look up some indexes, take the original QVector, sort it, and use std::binary_search(). Change-Id: If56e9371972b9aaebb033a8a499be306163266e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QLineEdit: de-inline effective*TextMargin()Marc Mutz2016-01-042-21/+22
| | | | | | | | | | | | | | | | Saves 327b in text size, but done mainly because such functions shouldn't be inline in the first place. Change-Id: Ieea97f13620e4411dc01cb0d390bd668c13cfa7a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QFileDialog: optimize string handling in qt_tildeExpansionMarc Mutz2016-01-011-32/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of QString::split()-ing the path, just to inspect the first item in the list returned, simply find the location of the first separator and work with that. -> saves creating a QList, and its QString elements -> saves attempted detaches of that list when calling first() - When extracting the user name, don't do it in a QString, do it in a QStringRef. - When constructing the result, don't use QString::replace(), use QStringBuilder with a QStringRef into the original string. - Eradicate the out parameter, it is easily calculated from the return value. - Don't calculate userName on VXWORKS and INTEGRITY, where it is not used. Requires a different #ifdef sequence. Fixed preprocessor directives' indention as a drive-by. Costs 84b in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I61f1e8d558db7fb0c5c1170bdfd6f5ac1f1a9e62 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QHeaderView - fix broken stretchLastSectionThorbjørn Martsum2016-01-012-15/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In setStretchLastSection we restore a default section size if we no longer use stretch. That size was however not sufficient - we should restore the actual size. Furthermore we should also always stretch the last section (last visible index) - and not leave a section with a huge size and stretch another. This patch refactors stretch handling and keeps track of the last section and its size in eg. moveSection, swapSection, hideSection, showSection etc. There is an auto test showing and guarding its behavior. [ChangeLog][QtWidgets][QHeaderView] Fixed some issues (e.g QTBUG-39010) with restoring of section size after a section is no longer the last visible section (in stretchLastSection mode). Task-number: QTBUG-39010 Change-Id: Id47075b5a9dfeb250027374ecbd10eb8babbf9ef Reviewed-by: David Faure <david.faure@kdab.com>
* | QComboBox: use NRVO from QAIM::match() and prevent a detach attemptMarc Mutz2015-12-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Receiving the QStringList return value through RVO instead of move-assigning it saves 48b in text size on optimized GCC 4.9 Linux AMD 64 builds. Marking the QStringList const saves another 112b because the following first() doesn't need to attempt a detach. Change-Id: If6f25399e80de12114ce41c557bff6ee8c24938b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QCommonStyle: Multiple icon sizes for more Windows stock iconsFrank Richter2015-12-241-7/+5
| | | | | | | | | | Change-Id: I842270b922e019bdef0bb65efaf4a08db10c511e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | QGraphicsView: replace some Q_FOREACH loops over const locals with C++11 ↵Marc Mutz2015-12-233-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range-for 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 local and 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 ~1.8KiB of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I5c58658937ac4323594161bf94a2fce3c5667914 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsView: replace some Q_FOREACH loops over rvalues with C++11 range-forMarc Mutz2015-12-236-45/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 trivially cannot happen, because all containers are marked as const when being assigned the rvalues previously found on the rhs of the Q_FOREACH. The new code thus does exactly what the old code did: take a const copy, then iterate over it. Separate patches will deal with other situations. Range-for loops are much more efficient than foreach loops. This patch shaves almost 4K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: Ida868b77d078cbfa0516d17e98e6f0a86fcdb7a3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Optimize a code path in QGraphicsScenePrivate::cancelGesturesForChildren()Marc Mutz2015-12-221-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ev.isAccepted(), since list is gestures.toList(), the first foreach loop would clear 'gestures', one item at a time. The second foreach loop would then not execute at all. Make this case clearer by not executing either loop if ev.isAccepted(). Make it more performant by not iterating twice, but once, simply skipping those gestures in the second (remaining) loop which would have been removed by the first one. Also iterate over the equivalent QList instead of the QSet, because the former is way more efficient. Text size savings are present, but minimal. The runtime savings are signficant, of course. Change-Id: I3d5bfe99c5d3fcbe4c98816577846551c632f315 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsSceneBspTreeIndex: simplify the code of items()Marc Mutz2015-12-221-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code dealt with a lot of special cases, probably to avoid detaching. But the only case where deep copies are avoided is if a) there're no freeItemIndexes b) there're no unindexedItems c) the sort order is neither AcendingOrder nor DescendingOrder, which is funny, since those are the only two values for Qt::SortOrder. The code checks for SortOrder(-1), but nowhere in Qt is such a sort order created. Ergo, the deep copy was _never_ avoided. So simplify the code by always building the result list from the two input lists by copying all non-null items. Saves over 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I8e739fb78896b2ad0bec45d05e86a76fe1ede04a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QGraphicsScene: don't build a temporary QList just to iterate over itMarc Mutz2015-12-221-7/+4
| | | | | | | | | | | | | | Iterate over the original list instead. Change-Id: I7be154c0e19074033df6f6e01f68d21a8904d2ee Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QGraphicsScene: prevent lots of detaching d/t editing of copiesMarc Mutz2015-12-221-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTouchEvent::touchPoints() returns a const-&, but the old code took a copy, over which it then iterated, modifying the touch points, causing (necessary) detaches of both the list and the touch points. Befriend QTouchEvent and modify the list in-place, avoiding all detaches in the likely case that QTouchPoint contains the only copy of the touch point list. This is all the more important as the function is called once for every item-under-mouse in sendTouchBeginEvent(). Port to C++11 range-for as a drive-by. Change-Id: I2f74d19845711d97e3566886123b5d18d55db74c Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QListViewItem: Remove pointless copy ctorSérgio Martins2015-12-211-3/+0
| | | | | | | | | | | | | | Fixes static analyzer warning. Change-Id: I4f1bec1da5b2e90a1aeae699a9e3e329f1cc9199 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: de-inline some more virtual dtorsMarc Mutz2015-12-216-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helps pinning the vtable to a single TU, which can prevent false negative RTTI (incl. dynamic_cast and catch()). But mostly because it's rather pointless to have dtors of polymophic function inline. Most of the time, the code will be called through the vtable indirection, anyway (which also means that an out-of-line copy of the code needs to exist in any case). The inline method will only be used when the compiler can prove the dynamic type of an object. Saves ~1.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Ic4ce96da559252c8abc29d880530c84035db2306 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtWidgets: de-inline some Private ctorsMarc Mutz2015-12-216-97/+113
| | | | | | | | | | | | | | | | | | | | | | | | Saves ~7KiB text size on optimized GCC 4.9 Linux AMD64 builds. Drive-by fix: properly init QGraphicsProxyWidgetPrivate::proxyIsGivingFocus. Change-Id: Iac923f0f2a9cdc0349f706c5760883a210be36f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Don't re-evaluate QTextCharFormat::font() all the time in ↵Marc Mutz2015-12-211-5/+7
| | | | | | | | | | | | | | | | | | | | QAccessibleTextWidget::attributes() Saves ~100b in text size. Change-Id: I144b8c1d02ce8a24f1654d54abad90ba1054be9a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Boris Dušek <me@dusek.me>
* | Remove a use of a QMap in QAccessibleTextWidget::attributes()Marc Mutz2015-12-211-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMap<QByteArray, QString> was only used to hold key/value pairs until they were serialized into a QString at the end of the function. Serialize into QString directly instead, dropping the temporary QMap. The problem is that we'd like to keep the line formatting central while at the same time harnessing the power of QStringBuilder. This is possible with a templated function with an input/output parameter: format_attr(QString &result, const char *key, T &&value) format_attr(result, text-foo, str + str2 + str3); Or with return type deduction: formatted(const char *key, T &&value) -> decltype((expr)) { return expr; } result += formatted(text-foo, str + str2 + str3); I don't like out parameters, and we can't rely on auto return type deduction, yet, so I opted for a miniature expression template solution that can only match the expression attr[key] = value; where 'key' is a const char* and 'value' can be anything that QStringBuilder supports. This allows to keep the syntax of a map while at the same time serializing to QString immediately. The only behavioral difference to the old code is that the attributes are no longer sorted, but order doesn't matter. Saves more than 10KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I7b3bec0466ef24156c693adaa95f0316007e0bfe Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QLineEdit: hold SideWidgetEntry in std::vector, not QVectorMarc Mutz2015-12-213-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is private implementation, so there's no BC issue here. The collections ported here also do not benefit from CoW, because they are never copied. Adapt to STL API and replace foreach with C++11 range-for loops, because the former deep-copies STL containers. Also replace index-based for loops with C++11 range-for, to evade the int/size_t problem on MSVC. Saves a bit more than 1KiB in text size on optimized GCC 4.9 Linux AMD64 builds, not all of which can be attributed to the ports to range-for. Change-Id: I240030180bd1b2ca40c002b03ab72319a99a87c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Make use of new QHash::erase(const_iterator) overloadMarc Mutz2015-12-194-9/+8
| | | | | | | | | | | | | | | | | | | | Drive-by changes: - use auto for iterators - add Q_UNLIKELY for conditions leading to a qWarning etc Change-Id: Iff8f36d67c96674d354a501b26640f73c15ce58d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
* | 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>