summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\ \ \ \ \
| * | | | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-1112-63/+73
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| | * | | | QWindowsVistaStyle: Suppress animation when QLineEdit's base color is set.Friedemann Kleint2016-02-101-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce utility function to check using QWindowsXPStylePrivate::isLineEditBaseColorSet(). Task-number: QTBUG-40634 Change-Id: Iaa6962a17217352aa59d0c54421b764ad47d3bf8 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | | | QWindowsXPStyle: Introduce utility function for QLineEdit's palette.Friedemann Kleint2016-02-103-39/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce QWindowsXPStylePrivate::isLineEditBaseColorSet() checking whether the base color has been set in the widget's palette taking into account the QSpinBox special case and simplify the code accordingly. Task-number: QTBUG-40634 Change-Id: I0e7527031b333d71727fbd30db6dd80aa715c9ab Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | | | QWindow::setMask(): Apply High DPI scaling.Friedemann Kleint2016-02-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move code from QWidget::setMask() and reimplement QWidget::setMask() using QWindow::setMask(). Task-number: QTBUG-50938 Change-Id: I040688d6b18df91368fa6ab6392a3b4cd80f2683 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| | * | | | Reduce allocations by using reserve()Sérgio Martins2016-02-073-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If34fa53402985f6b3c5e7217bce4a1177af835b6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | | | QtWidgets: Fix build & warnings with QT_NO_GRAPHICSVIEW.Friedemann Kleint2016-02-052-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel\qapplication.cpp(3157,18) : warning: unused variable 'isGraphicsWidget' [-Wunused-variable] bool isGraphicsWidget = false; ^ kernel\qwidget.cpp(6446,18) : warning: unused variable 'window' [-Wunused-variable] if (QWidget *window = w->window()) { ^ kernel\qwidget.cpp(7949,50) : error: no member named 'proxyWidget' in 'QWExtra' if ((q->isWindow() && (!extra || !extra->proxyWidget)) ~~~~~ ^ kernel\qwidget.cpp(8084,50) : error: no member named 'proxyWidget' in 'QWExtra' if ((q->isWindow() && (!extra || !extra->proxyWidget)) Change-Id: I8474ab0ab4617c6588707ce0c2f7a97e4d0e54da Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | | | Doc: corrected minor link issuesNico Vertriest2016-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: I98eafe0c7ed55f309640e8495c83ffcef355aa08 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| | * | | | Fix crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8aAndy Shaw2016-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the crash introduced by 75b705fec8e9517047d7dfa98203edff69f2bf8a. The drag only needs to be ended on the hide if it is actually in the middle of dragging. This enables the case of dragging the dock widget out with the mouse to continue to work. Task-number: QTBUG-50890 Change-Id: I72309dd40ee670319f2ff607ae201c46f8de4652 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | | | End the drag if the dockwidget is being hiddenAndy Shaw2016-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the window flags are changed for the widget then it is possible to minimize the dockwidget via the titlebar. This will cause it to be ready to start a drag internally but since the dockwidget never gets a mouse release event it doesn't end it. Therefore it ends up being in an invalid state later on when restored, so the endDrag() needs to happen in the hide event to ensure this is not an issue later on. Change-Id: Ia84bee96b9eed49896869e6a15d4de6d01964264 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | | | QWizard/Windows: Add missing override.Friedemann Kleint2016-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-50804 Change-Id: Ia1c73b40d96ddea01e440e0e3e010ff3fcb88793 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * | | | Disintermediate QDateTimeParser::SectionNode operations.Edward Welbourne2016-02-021-3/+3
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name, format and maxChange of a Section depend only on the section, not on the details of the currently parsed text it matches; so we don't need the parser object's list of all sections to work them out. Move these methods to the SectionNode and act directly on that instead of going via the section list. Make the name take a Section enum instead of an int. Likewise, make stateName take a State enum instead of an int. Change-Id: Ie340d042ab95aec517013c4dcc30901d40305c78 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | / | | Add SH_ItemView_ScrollMode style hint and use it in QMacStyleGabriel de Dietrich2016-02-117-5/+49
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OS X, the default scrolling mode of item views should be per pixel instead of per item. We enforce this through a new style hint. On all other platforms, the behavior remains the same. It's still possible to override the style hint by using the regular scroll mode setters. Any subsequent style change will result in a no-op once the setters have been called and until the properties are reset. Some auto-tests had to be update to to take the new behavior into account. [ChangeLog][QtWidgets][Styles] Added SH_ItemView_ScrollMode style hint. [ChangeLog][QtWidgets][Item Views] Item views scroll per pixel on OS X now. [ChangeLog][QtWidgets][Item Views] QAbstractItemView::verticalScrollMode and QAbstractItemView::horizontalScrollMode are now resettable. Change-Id: I3f923275c99aa4389323b52fc1c5455fe71f8d73 Task-number: QTBUG-50102 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | | | dbusmenu: Use proper toggle-type for items that are part of groupDmitry Shachnev2016-02-093-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To achieve that, add a new virtual setHasExclusiveGroup() method to QPlatformMenuItem class (optional because we don't want to break existing platform themes), call it when converting QActions into platform menu items, and use it when exporting the menu items over D-Bus. Also, send ActionChanged event for actions when their group is changed, so that the platform menus are updated too. Change-Id: I8d951ace8c4097decec2a0154163e3672214effb Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | | Replace some QList<int> with QVector<int>Marc Mutz2016-02-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 64-bit platforms, QVector<int> uses only 50% of QList<int> per-element memory. Change-Id: I3057781e7fb58007ea2619cc91965a626d01473b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>