summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-188-0/+48
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * QListView: fix skipping indexes in selectedIndexes().Anton Kudryavtsev2016-02-171-0/+28
| | | | | | | | | | | | | | | | | | | | 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>
| * Autotest: Enable make check on rhel 7.1Simo Fält2016-02-117-0/+20
| | | | | | | | | | | | | | | | Blacklisting all tests, which were failing locally. Task-number: QTQAINFRA-949 Change-Id: I40c25ab0155b8977596d61297ab252a546515f87 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-02-113-33/+21
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-113-33/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Pass -silent to lrelease to avoid cruft in test logs.Edward Welbourne2016-02-022-2/+2
| | | | | | | | | | | | | | | Change-Id: I7cf2808187f97b6319f7561fe06ddef476fa9aa0 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | * Don't clutter up the source tree with .qm files generated by testing.Edward Welbourne2016-02-022-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate the qundo*.qm files for tst_QUndo*::commandTextFormat() in the current directory (out of source, for a shadow build) rather than alongside the qundo*.ts from which they're derived (in the source tree); and remove them once loaded, if that succeeds. (On failure, we might even want to look at them.) Task-number: QTBUG-49081 Change-Id: I666985fa3ceb8c25c917b617d6d39141eddebb76 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | * Clean up tst_qwidgetwindowBłażej Szczygieł2016-02-021-25/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename TestWidget to PaintTestWidget, because this class tests only whether paint event occurs. Remove unused variables. Remove reset() method, because there is no need to reset only one variable in class method. Change-Id: I8f442c73598e3431baf2b0433fefc157d3f10ea6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Add SH_ItemView_ScrollMode style hint and use it in QMacStyleGabriel de Dietrich2016-02-113-8/+72
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-023-4/+44
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * QDockWidget: Restore using setGeometry since the geometry is used for the stateAndy Shaw2016-02-021-0/+26
| | | | | | | | | | | | | | | | | | | | This solves an instance where restoreState() was used when the dockwidget was already floating and the saved state was also for a floating dockwidget. Change-Id: I1fe764ae2a6b0351ae26e33ffec682ad37c944d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Revert "QWindow::destroy(): only reset QGuiApp::focus_window and friends as ↵Tor Arne Vestbø2016-02-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | a last resort" This reverts commit 4c71db756741d35ccb32dc4c32aa1823264c85df. It's too risky for 5.6, we should let it cook in dev for a while and backport when ready. Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last ↵Tor Arne Vestbø2016-01-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resort Resetting focus_window and other internal QGuiApplication variables before calling setVisible(false) and destroying the platform window means that the platform window can't reason about whether or not it was the focus window unless it can resolve that using native APIs. We should let the platform window take care of resetting the focus window and related states, and only execute our fallback logic if the plugin doesn't do the right thing. We also use QPA to update the state instead of modifying the internal QGuiApplication variables directly, so that events and signals are emitted as a result of the reset. The QLineEdit test gets two added calls to processEvents(), since assuming that activateWindow() is synchronous is not correct, and would result in the QMenu resetting the focus window to 0 on destroy. Task-number: QTBUG-46414 Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * QtWidgets: Allow to cover up the window container by another widgetBłażej Szczygieł2016-01-281-0/+18
| | | | | | | | | | | | | | | | | | | | When the window container already has a window handle, allow embedded windows to use this handle as a parent. This change will allow proper window stacking and clipping. Task-number: QTBUG-50477 Change-Id: I8d656ecb99e0c42ae7a7ac461e5e5b5d801f5493 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Remove some old QT_MAC_USE_COCOA cruftTor Arne Vestbø2016-01-281-4/+0
| | | | | | | | | | Change-Id: Ib9cb57563274c722023084e94f2cd439088366a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | tst_qcombobox: Don't use the deprecated QTest::qWaitForWindowShown()Liang Qi2016-01-261-2/+2
| | | | | | | | | | Change-Id: I9a7a5f87e67e6d01d571097e8955d22bc86ca8d6 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-264-14/+71
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-214-14/+71
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-193-12/+50
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
| | | * Fix UB in tst_QDialog::showExtension()Marc Mutz2016-01-071-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't cast a QDialog to a subclass it is not. Fix by creating it as the required subclass in the first place. Found by UBSan: tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp:203:20: runtime error: downcast of address 0x2b5f5000ad40 which does not point to an object of type 'DummyDialog' tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp:203:46: runtime error: member call on address 0x2b5f5000ad40 which does not point to an object of type 'DummyDialog' Change-Id: I63ae7e782bda6a78d11af5c2bc2f7d88aacd0ac0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | | * Revert "Fix global coordinate mapping for child widgets in QGraphicsView."Friedemann Kleint2016-01-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 56aad2ad6074237537fecf10d0cda0f3872e7f71. QWidget::mapFromGlobal() does not work correctly when the widget is a child widget of another widget embedded into a QGraphicsView with a transformation (scaling/rotation). It starts applying offsets going up the widget tree (just as mapToGlobal) until it hits the embedded widget not taking into account the transformation. It would need to go in from to top to bottom or better be reimplemented such that a QTransform for mapping coordinates from/to global is determined which is then applied in reverse. Task-number: QTBUG-50030 Task-number: QTBUG-50136 Change-Id: Iadeb891d793be1938c64942bfbf38d541a281c33 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * QWidgetWindow: The alien widget should be from the window's hierarchyGabriel de Dietrich2015-12-211-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 025d6a778ceb377e688f1. Change-Id: I7b964b0d598abe46137c22177fe2b5dcca5bb812 Task-number: QTBUG-49831 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| | * | Fix reentrancy regression in QShortcutMap after c7e5e1d9eTor Arne Vestbø2016-01-121-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When closing a popup dialog using a shortcut, when the popup was originally opened using a shortcut, the closing-shortcut would interfere with the state of the first shortcut, and we ended up sending a key event for the original shortcut. Task-number: QTBUG-50360 Change-Id: I62e5ddb9ca43b28519ede629775bc0d7598dccc4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | | Updated license headersJani Heikkinen2016-01-21136-2311/+1631
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Android: Fix some QGraphicsScene testsEskil Abrahamsen Blomfeldt2016-01-203-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Use qrc for test data so that it can be found on all platforms. 2. Skip a test which does not work on platforms where show() implies showMaximized(), as it depends on the window size being 150x150. 3. Skip test for hover event which depends on having a valid mouse cursor position. 4. Skip a couple of tests that fail on some Android devices. It's not worth spending a lot of time investigating this at the moment. Change-Id: Icb2b7f1d82981546a2154a76535b95606d7f40da Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-123-0/+4
|\| | | | | | | | | | | Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
| * | don't rely on transitive dependenciesOswald Buddenhagen2016-01-083-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ide872b452e02ebefb3eeb51464c8d59e8bf58bc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-17/+17
|\| | | | | | | | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * | Make use of preprocessor easier to understand.Edward Welbourne2016-01-041-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | The #if had a condition that was needlessly hard to understand; and was widely separated from its #else clause. Change-Id: I43f4282993f4f2e8c4b5ad07dc2c2e06a6b95aa9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | QFileDialog: optimize string handling in qt_tildeExpansionMarc Mutz2016-01-011-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-011-1/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Refactor tst_QGraphicsWidget::setTabOrderAndReparent().Friedemann Kleint2015-12-221-62/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test produces compiler warnings in release builds: tst_qgraphicswidget.cpp: In member function 'void tst_QGraphicsWidget::setTabOrderAndReparent()': tst_qgraphicswidget.cpp:1521:89: warning: 'w2' may be used uninitialized in this function [-Wmaybe-uninitialized] tst_qgraphicswidget.cpp:1536:88: warning: 'w1' may be used uninitialized in this function [-Wmaybe-uninitialized] Use arrays instead of the variables w1,2... and rewrite the helper function compareFocusChain() to work on iterators allowing to remove some temporary lists. Also return error messages in a QByteArray ready for the Q[TRY_]VERIFY2 macros. Change-Id: I43466921af59521d1faf00b75fe943508418abb3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-186-24/+156
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Fix compilation for WinRTMaurice Kalinowski2015-12-142-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | TEST_HELPER_INSTALLS cannot be used on platforms with no QProcess support. Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
| * | QFileSystemModel: report special files which are not symlinksGiuseppe D'Angelo2015-12-131-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | QFileSystemModel autotest: fix a broken sort() testGiuseppe D'Angelo2015-12-121-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was comparing an "unsorted" file listing read from disk with a reference listing, checking whether the two were different. Obviously that's a nonsense test, as there's no stable order for the entries returned by readdir_r and friends. Change-Id: I1d781a6513c42bb0b585d02e57a771c5336c7df4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | QLineEdit: a validator fixup() should keep it modified; add failing testGiuseppe D'Angelo2015-12-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | I still have no idea how to fix this properly given the absolute mess of QWidgetLineControl. For now add a failing test. Change-Id: Ieb5ad6994c8ce7deb0cd0f2f47d51073d042244e Task-number: QTBUG-49295 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | QFileDialog test: make the right subwidget visibleGiuseppe D'Angelo2015-12-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes little sense to give focus to a hidden widget; in order to make the treeview visible, we need to set the view mode to Detail. Change-Id: I453111e83593a790a656651b603a9c9b1a78dd9d Task-number: QTBUG-7690 Reviewed-by: Jan Blumschein <jan@jan-blumschein.de> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | QFileSystemModel: do not unwatch directories if removal failsGiuseppe D'Angelo2015-12-101-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
| * | QFileDialog: Call reject() on Key_Escape even when itemview has focusGiuseppe D'Angelo2015-12-091-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-1043-869/+39
| | | | | | | | | | | | | | | | | | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | QLineEdit: fix the shortcut override events on a readonly line editGiuseppe D'Angelo2015-12-091-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-093-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-081-1/+16
|\| | | | | | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * | Skip testing empty window sizes on WindowsJan Arve Saether2015-12-041-1/+16
| | | | | | | | | | | | | | | Change-Id: Ib4f3bc63196527583a274180c40d0f7847e13f55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | QAbstractItemView: replace a QPair with a dedicated structMarc Mutz2015-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-026-104/+101
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Windows QPA: Fix window state transition from minimized to normal.Friedemann Kleint2015-12-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use SW_SHOWNORMAL instead SW_SHOWNOACTIVATE as a parameter to ShowWindow() to enforce the window to be restored to normal state, even if the state before minimized was maximized. Task-number: QTBUG-48449 Change-Id: I9436623b1495f574a72050e50e8b31bfc83ced5c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
| * | Use QCollator for sorting in the filesystem modelLars Knoll2015-11-301-76/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code was extremely inefficient, and QCollator can provide the same functionality in a much better and faster way. Task-number: QTBUG-30902 Change-Id: Iaf5dbe587d9a6ebca26885259fdee74a29d3c84f Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>