summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-1116-107/+138
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * Wheel event widget: Harden logic an extra bitGabriel de Dietrich2016-03-092-25/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite an unlikely scenario, but not impossible. It could be that the wheel widget is destroyed during an update phase event. In that case, wheel_widget would be a dangling pointer for any subsequent wheel event. We protect against this with a QPointer. However, that would mean that if the next wheel event were to be an end phase event, that event would be lost. So we go through the usual code path, except that we won't set wheel_widget in the case of an end phase event. Change-Id: I59a912b845dcc249e1edc60b4dc28bf308d807d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QGestureManager: fix UB in filterEvent()Marc Mutz2016-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code infers from the presence of an address in a QHash<QGesture *, ...> that the address belongs to a QGesture. So far that is fine enough. But in order to perform the lookup, it static_cast<>s the QObject* argument to a QGesture* for the QHash:: contains() call. Even though the pointer is not dereferenced, the cast is UB. Says UBSan: qgesturemanager.cpp:558:73: runtime error: downcast of address 0x2ab83364f3a0 which does not point to an object of type 'QGesture' 0x2ab83364f3a0: note: object is of type 'QDBusConnectionManager' which is a particularly hideous error message because of the constantly-changing completely-unrelated actual type in the second line of the message: 52 QDBusConnectionManager 19 QSocketNotifier 14 QFusionStyle 13 QAction 6 QApplication 3 QGraphicsWidget 1 Window 1 TestRunnable 1 RectWidget 1 QTimer 1 QSingleShotTimer 1 QOffscreenSurface 1 QGraphicsProxyWidget 1 QDefaultAnimationDriver 1 QDBusPendingCallWatcherHelper This error is also _very_ common, triggered 116 times in a single run of make -C tests/auto check. Fix by using qobject_cast first and then doing the lookup only when the cast succeeded. Depending on the performance of qobject_cast<>, this may actually perform better, too. Change-Id: I884ec7d885711acc3c1d004ce93c628268d8fc18 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Q*Application: fix UB caused by accessing QGuiApplication from ↵Marc Mutz2016-03-092-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCoreApplication ctor As reported by ubsan: src/gui/kernel/qplatformintegration.cpp:463:10: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' src/gui/kernel/qplatformintegration.cpp:466:14: runtime error: downcast of address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' src/gui/kernel/qplatformintegration.cpp:466:43: runtime error: member call on address 0x7ffdc2942490 which does not point to an object of type 'QGuiApplication' 0x7ffdc2942490: note: object is of type 'QCoreApplication' to name just a few which are reported when running gui and widget auto-tests; there're definitely more where these came from. This is caused by QCoreApplication::init() being called from the QCoreApplication ctor, calling virtual functions on Q*AppPrivate, which happen to attempt, in this case, to emit QGuiApp signals. At that point in time, the QGuiApplication ctor has not entered the constructor body, ergo the object is still a QCoreApplication, and calling the signal, as a member function on the derived class, invokes UB. Fix by cleaning up the wild mix of initialization functions used in this hierarchy. The cleanup restores the 1. Q*ApplicationPrivate::Q*ApplicationPrivate() 2. Q*ApplicationPrivate::init(), calling each base class' init() as the first thing two-stage construction pattern commonly used elsewhere in Qt to make sure that the public class' object is fully constructed by the time each level's Private::init() is called. Change-Id: I290402b3232315d7ed687c97e740bfbdbd3ecd1a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Clean up WINVER, _WIN32_WINNT macros for MinGW.Friedemann Kleint2016-03-073-31/+0
| | | | | | | | | | | | | | | | | | | | | | Define WINVER, _WIN32_WINNT as 0x501 (Windows XP) in qt_windows.h. Remove definitions of the same/lower versions and unneeded definitions in other places. Remove definition for Borland compiler. Task-number: QTBUG-51673 Change-Id: I2a344a7f7cf78b2afbf45dcdf8bf2a19b93f0a07 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-072-11/+8
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * QCompleter: QMatchData: init all fields in default ctorMarc Mutz2016-03-061-1/+1
| | | | | | | | | | | | | | | | | | Found by UBSan: src/widgets/util/qcompleter_p.h:130:8: runtime error: load of value 249, which is not a valid value for type 'bool' Change-Id: I0529e54e17a6f4d6add91786a2d5687f2d043531 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Make use of defaultDropAction in QListView icon modeSamuel Gaist2016-03-062-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, using setDefaultDropAction on QListView in icon mode would not have any effect. Now the drag behaves properly. The default action is set to CopyAction rather than IgnoreAction to keep the current behavior and avoid breaking user code. [ChangeLog][QtWidgets][QListWidget] Fixed a bug that caused the default drop action to be ignored when using icon mode. Task-number: QTBUG-15741 Change-Id: I49654cde382af344ffc4594699303c928e27e05d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Make an implicit grab on TouchBegin for a widget subscribed to a gestureAlexander Volkov2016-03-052-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A receiver of TouchUpdate and TouchEnd events is determined either as a widget which has an implicit grab for the touch point or as a visible widget if there are no implicit grabs. The events are sent if the receiver has accepted TouchBegin event or if it is subscribed to a gesture. Before sending the events to the widget they are delivered to the gesture manager. Thus, in order to detect gestures for the widget, it must own an implicit grab or be a visible widget. It can happen that the parent widget is subscribed to a gesture, but doesn't accept TouchBegin event, as in the case of QScrollArea. Then it will not get an implicit grab and gesture detection will be impossible. Activate an implicit grab for such widgets. Also don't send TouchUpdate and TouchEnd to them, because it's against the documentation. Task-number: QTBUG-43277 Change-Id: Id767583991def6d76c48ad15eb39af822cad115d Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QWheelEvent: make NoScrollPhase opt-inShawn Rutledge2016-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for QTBUG-50199 involves adding an undocumented enum value which can be returned from QWheelEvent::phase(). This will be quite unexpected for applications that use it, which work fine with 5.6.0 and then start receiving this new phase value in 5.6.1. So it should not happen by default. Set the env variable QT_ENABLE_MOUSE_WHEEL_TRACKING to enable this functionality. In 5.7 it will be default behavior. But in 5.6 the default behavior is as it was before: if you use a conventional mouse wheel, the phase stays at ScrollUpdate continuously. [ChangeLog][QtCore] QWheelEvent::phase() returns 0 rather than Qt::ScrollUpdate when the wheel event comes from an actual non-emulated mouse wheel and the environment variable QT_ENABLE_MOUSE_WHEEL_TRACKING is set. In Qt 5.6, this is required to enable the fix for QTBUG-50199. Change-Id: Ieb2152ff767df24c42730d201235d1225aaec832 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Fix GCC 6 -Wunused-functions warningsMarc Mutz2016-03-052-21/+0
| | | | | | | | | | | | | | | | | | GCC 6 is able to identify member functions that are unused. Remove them. Change-Id: Ic77548164b38a1cd3c957d2c57a5bccb979bc02e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Don't create accessible interface for QWidgets being destroyedGabriel de Dietrich2016-03-021-0/+9
| | | | | | | | | | | | Change-Id: I975ee556913707e8595b2a89f1bba4299187bcfb Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * QMacStyle and QCocoaTheme: Fix selected item color for non-native menubarGabriel de Dietrich2016-02-291-2/+3
| | | | | | | | | | | | Change-Id: I3b55e9ce896383338cf6ed768d912ca1835b7742 Task-number: QTBUG-28960 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * QMenuBar: Acknowledge AA_DontUseNativeMenuBarGabriel de Dietrich2016-02-291-1/+2
| | | | | | | | | | | | Change-Id: I756f4181d66ef6e79ab7b7be8a23a10171a9f30c Task-number: QTBUG-28960 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Add QWheelEvent::inverted()Morten Johan Sørvig2016-03-064-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QMainWindowLayout: eradicate Q_FOREACH loops: Extract Method allMyDockWidgets()Marc Mutz2016-03-031-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | Extract a loop repeated four times in the code into a separate function. Port to use C++11 range-for loops and not create temporary QLists. Saves 2.4KiB in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I7eb78ffaac33627b595e35cafb6ce0769fb760a8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-292-17/+52
|\| | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qprocess/tst_qprocess.cpp Change-Id: Ib6955eb874b516b185b45d6c38cec646fbaa95f4
| * Track target widget when wheel events are receivedGabriel de Dietrich2016-02-292-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This issue is reproducible on OS X when using a Magic Mouse or a combination of Magic Trackpad and regular mouse. In these cases it's possible to start a scrolling gesture on one widget and move the mouse cursor over another widget. Although we send the wheel event phase information, we never made any use of it. This means that a widget would start scrolling even though it never received a ScrollBegin event. In this patch, we make sure the scrolling cycle is respected and that once a widget starts scrolling, it'll be recieving all the wheel events until a ScrollEnd event reaches the application. For those input devices not supporting a proper phase cycle, we introduce a new (undocumented) phase value, NoScrollPhase. If the wheel event phase is NoScrollPhase, then we ignore the current scroll widget and proceed as usual. This value is the default for wheel events. It's up to the platform plugin to set the proper phase value according to the data received from the OS. Finally, we fix a few of QWheelEvent constructors to properly initialize the phase and source properties. Task-number: QTBUG-50199 Change-Id: I3773729a9c757e2d2fcc5100dcd79f0ed26cb808 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | QVector: preserve capacity in clear()Marc Mutz2016-02-293-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is what std::vector implementations usually do, because it minimizes memory fragmentation and useless allocations since no user will call clear() unless she intends to append new data afterwards. Fix calls to resize(0) that show how existing code tried to work around the issue. Adjust test. Port from QVERIFY(==) to QCOMPARE as a drive-by. [ChangeLog][QtCore][QVector] clear() now preserves capacity. To shed capacity, call squeeze() or swap with a default-constructed QVector object, see the documentation for an example. Change-Id: I9cebe611a97e027a89e821e64408a4741b31f1f6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: eradicate Q_FOREACH loops [rvalues]Marc Mutz2016-02-289-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. This is the simplest of the patch series: Q_FOREACH took a copy, so we do, too. Except we don't, since we're just catching the return value that comes out of the function (RVO). We can't feed the rvalues into range-for, because they are non-const and would thus detach. Saves 2.2KiB in test size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I914aa20fe65577b2e32ea7ea89d51a8d003a57ba Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: eradicate Q_FOREACH loops [QVarLengthArray, std containers]Marc Mutz2016-02-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_FOREACH over a QVarLengthArray or std containers is a particularly bad idea (because of the deep copy that Q_FOREACH then performs). Use C++11 range-for (without qAsConst(), because neither QVLA nor std containers are CoW). Saves 5.7KiB in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I4c1fb0b488bb08726912528b559840a45c1397df Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: prevent detach attempts from first()/etc. use [dialogs, kernel, ↵Marc Mutz2016-02-2614-42/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | util, widgets] The algorithm used was: - If possible, just declare the container const - Otherwise, for first()/last(), use constFirst()/constLast() and for front()/back(), to not destroy the use of the STL API subset, use qAsConst() Did some caching of function returns here and there, and converted one 0 to nullptr as a drive-by. Also saves almost 4KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I04b7bfd68dc85c22de247cb65a310e1cbbca1e8c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QtPlatformHeaders/Windows: Add function to set window activation behavior.Friedemann Kleint2016-02-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows OS by default does not activate windows when the calling process is not active; only the taskbar entry is flashed as not to distract the user. Nevertheless, for some use cases, it is desirable to activate the window also in the inactive state. Introduce an enumeration specifying the behavior to QtPlatformHeaders and employ a workaround using the Win32 API AttachThreadInput() to attach to other processes while setting the foreground window to achieve the AlwaysActivateWindow behavior. Task-number: QTBUG-14062 Task-number: QTBUG-37435 Change-Id: I79cb6cd3fab29d55b5d3db7f9af01bbaa5096a37 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | QtWidgets: replace QStringLiteral with QLatin1String when appendingMarc Mutz2016-02-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes little sense to use QStringLiteral for strings which are immediately appended to, or which are appended to other strings, because no dynamic memory allocation is saved by doing so. But if the only advantage of QStringLiteral does not apply, all its disadvantages dominate, to wit: injection of calls to qstring dtor, non-sharability of data between C strings and QStringLiterals and among QStringLiterals, and doubled storage requirements. Fix by replacing QStringLiteral with QLatin1String. Saves 288B in text size on stripped optimized Linux AMD64 GCC 4.9 builds. Change-Id: Ie632f25883163f57991264b29e8753fe4c4f738e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-242-17/+64
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * QtWidgets: Always deliver the wheel event to submenusBłażej Szczygieł2016-02-241-3/+14
| | | | | | | | | | | | | | | | | | | | When mouse events are delivered using XInput2 then the wheel event is missing on submenus, because XInput2 delivers the wheel event only to the root menu. Task-number: QTBUG-50996 Change-Id: I757c0b5e3aea4606d2e45dfc8180c263e02167ca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QtWidgets: Proper delivery of enter/leave event to context menusBłażej Szczygieł2016-02-241-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First-level context menu grabs the mouse, so all mouse events are delivered to it. This menu passes the mouse events to submenus. Any platform delivers mouse enter/leave event differently when window is grabbed. This patch unifies event delivery to context menus - it can block some unwanted events and it emulates fake events if necessary. This patch can reduce duplicated events and can provide proper enter or leave event to additional widgets in the context menu. It can also prevent submenu from unwanted close on Windows and X11. Added autotest. Task-number: QTBUG-45565 Task-number: QTBUG-45893 Task-number: QTBUG-47515 Change-Id: I7dd476d0be23afa34e947e54aef235012d173dcf Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * QMenu: Add delegate related notes to OS X-only APIGabriel de Dietrich2016-02-191-2/+8
| | | | | | | | | | Change-Id: I88bb4fdb2c11da0602e4c9f6637bbdeaa715aba0 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | QListView: avoid quadratic complexity in selectedIndexes().Anton Kudryavtsev2016-02-241-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Use std::remove_if(), which is linear, instead of looping over erase(it), which turns the loop quadratic. Reorder condition: call cheap non-virtual QModelIndex::column() first, then virtuals parent(), and isIndexHidden(). Change-Id: Id46ee1297b91906332eeca98f69372ef887ac330 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* | QFileDialogOptions: Expose default name filter setting.Friedemann Kleint2016-02-222-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the bool QFileDialogPrivate::defaultFileTypes to QFileDialogOptions as defaultNameFilters and add a static function returning the translated default filter string. Let QFileDialogOptions::nameFilters() return the default filter until a value has been set. This removes the need for special handling for empty filter lists in the QPA plugins. As a side effect, Qt Quick Controls's FileDialog will then also default to "All files" if no filters have been set. Task-number: QTBUG-50644 Change-Id: I9ba271a472d4fa03767b540ef6f1399f5ca4408e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | QListWidget: setup connections when changing selection model.Samuel Gaist2016-02-212-4/+27
| | | | | | | | | | | | | | | | | | | | | | QListWidget uses a set of slots for its selection model that are connected only at creation time. This patch adds the missing connections cleanup and setup when a user changes the selection model. Task-number: QTBUG-50891 Change-Id: I942bae6c471ea1ae22637d09b96d6fbd422f653f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QFileSystemModelPrivate: remove unused codeAnton Kudryavtsev2016-02-201-10/+0
| | | | | | | | | | | | Change-Id: I83df0d0bbac66957dc06e2805acf2c47d172fed8 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-186-25/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * Fix build when QMacStyle is disabled.Jake Petroules2016-02-181-1/+1
| | | | | | | | | | | | Change-Id: Ica66ab2b48266590b14d16a323b572f63168a580 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * QListView: fix skipping indexes in selectedIndexes().Anton Kudryavtsev2016-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | Remove spurious increment of i. Task-number: QTBUG-51086 Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-02-151-0/+1
| |\ | | | | | | | | | Change-Id: Ic011149c50dcbff3468d8fbdd3069a51ecd8f21c
| | * Add missing emission of activated(QString)Andy Shaw2016-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This signal got missed when 3fb0d851a was submitted so this compliments that fix. Change-Id: I91d20b709fce2c78d41166779954a3bb618feb37 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6.0' into 5.6Liang Qi2016-02-153-23/+31
| |\ \ | | | | | | | | | | | | Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
| | * | Revert "QWidgetWindow: call base class close event impl".Friedemann Kleint2016-02-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch causes the window creation on reshowing nested QWidget with native windows to create child windows with 0-parent handles, which can have adverse effects on the various platforms. The patch might be re-applied on top of 73c86fcb400cb91868b56ac05a3b82a3f7ba1a1b. This reverts commit 470c8b68df539ca7356cd6b8596f8323ba3ed779. Task-number: QTBUG-43344 Task-number: QTBUG-50854 Change-Id: I2ad837c3800fc71cccf04d455d1b9c3600b233e7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | Merge 5.6 into 5.6.0Oswald Buddenhagen2016-02-0216-113/+87
| | |\ \ | | | | | | | | | | | | | | | Change-Id: I95962e28b6fc101cbbad41230585e2b61f1f6c0f
| | * | | Fix widget texture list locking to avoid animation issues on eglfsLaszlo Agocs2016-01-282-22/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetBackingStore::sync() has two variants. The widget texture list logic was only present in one of them. This led to problems on eglfs in cases when the other variant got invoked. (for instance using the scroll area in the qopenglwidget example) eglfs relies on the texture lists's lock status to properly serialize its somewhat asynchronous built-in compositing mechanism and therefore is the only platform affected. The patch moves the code to be invoked from both sync() variants. Task-number: QTBUG-50668 Change-Id: I4c62987b7bb3cc40f98a4e94447368d2f740dbfd Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | | | QDirModel: replace an inefficient QList with QVectorMarc Mutz2016-02-171-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SavedPersistent is larger than a void*, so holding it in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by marking it movable and holding it in a QVector instead. Take advantage of rvalue-enabled QVector::push_back(); optimize element construction by using aggregate initialization. Change-Id: I4fd88879aa13e6536d59d164b3c33fbc2fead77f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | | | Merge "Merge dev into 5.7" into refs/staging/5.7Oswald Buddenhagen2016-02-1726-171/+58
|\ \ \ \ \
| * | | | | Use QVector instead of QList for sizeof(T) > sizeof(void*)Sérgio Martins2016-02-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | caught with static analyzer which only warns for trivial cases: - Container must be local - Container isn't passed to any function, assigned to another container or assigned to. Change-Id: I3f3aa73c128a56f067fa8745990977445a495ac4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | | | QtWidgets: use new QRect::transposed()Marc Mutz2016-02-139-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idfed0ae6b80e301fd32206b2e6d68054460b76de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | | | | Use QFlags::setFlag where prudent in qtbaseAndre Somers2016-02-1217-155/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFlags::setFlag is most useful to replace explicit constructs like if (condition) { someFlags |= TheConditionFlag; } else { someFlags &= ~TheConditionFlag; } with someFlags.setFlag(TheConditionFlag, condition); Change-Id: Ie4586681c83e0af812d5bbf14965aad51941a960 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | | | QDialogButtonBox: replace a QList copy + pop_front() with mid(1)Marc Mutz2016-02-171-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies the code and is also more efficient, because it copies less data. Change-Id: I9ad0c372fb4fa6f5818d9d6cb7b7cf35935f8565 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | | | Add attribute Qt::AA_DontUseNativeDialogs.Friedemann Kleint2016-02-173-9/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attribute can be set to suppress native dialogs for example for testing purposes. Task-number: QTBUG-51074 Change-Id: I35611e07e00b7a060f22b49d6ab6f3b8627f8aca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | | | Suppress memory allocation due to temporary containerSérgio Martins2016-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I337c3f7ed63444ac0950a30298eb619f462b7a16 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-02-1112-63/+73
|\ \ \ \ \