summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QWizard: give all buttons an objectNameMarc Mutz2013-10-281-0/+42
| | | | | | | | | | | | Only Commit, Finish and Cancel didn't have an object name, yet. Also Extract Method on the switch statement, add a test, and use QStringBuilder. Task-number: QTBUG-29924 Reported-by: Leo Arias Change-Id: I8c29606bc53e9d4caab631da2089e971a9da2d75 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog can delete files too, not just directoriesShawn Rutledge2013-10-231-0/+20
| | | | | | | | | After Ic12de12ec51c20de52d040514e90be5e783add43 this functionality was broken. Added an autotest. Task-number: QTBUG-34159 Change-Id: I8f41b7073dc57fea855ab87796f09e8a91520d13 Reviewed-by: David Faure <david.faure@kdab.com>
* Better QWindowContainer by not relying on native widgets.Gunnar Sletta2013-10-221-4/+58
| | | | | | | | | | | | | We change the behavior slightly from the initial implementation in 5.1. Forcing the use of native child widgets is causing massive performance issues so instead, we attach the embedded QWindow directly to the root window. The only exception is QScrollArea and QMdiArea which still enforces native windows for the entire parent chain to make clipping and stacking work. Task-number: QTBUG-34138 Change-Id: If713637bd4dce630552ace2f8ad6b2e86c063721 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tests: Replace Q_OS_MACX -> Q_OS_OSXSergio Ahumada2013-10-211-2/+2
| | | | | | | | Use the correct identifier for the OS X operating system. Change-Id: I7158a6b77e5e7418bc6b0a565f003500820a346d Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Only emit messageChanged() if the message has actually changedAndy Shaw2013-10-151-0/+27
| | | | | | | | | This fixes QStatusBar so it is back to the original behavior of only emitting the signal when the message has changed. The intention of the code that caused this to break in the first place is kept intact. Change-Id: I2f57c2abec01246ed924626ad954ac9ff9889855 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QFileDialog: don't create widgets if the platform dialog will be usedShawn Rutledge2013-10-151-0/+17
| | | | | | | | | | | This is a performance and memory optimization which also fixes bugs that are related to creating widgets, file system models etc. despite using platform native dialogs. Similar to 785bc64f8e743ac269f15cbe7fecba93d3d507ac for QColorDialog. Task-number: QTBUG-33039 Change-Id: Ia1aa7ec1f43b47006b9ebd377aed15c958538a17 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Skip tst_QGraphicsItem::paint() on Mac OS X 10.7Simo Fält2013-10-151-0/+4
| | | | | | | | | The test is randomly failing on CI when ran on 10.7. Task-number: QTBUG-31454 Change-Id: I79fce9a37616c6abaee960e338f8eea8fe6f31cf Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Stabilize tst_qmenu on Mac.Friedemann Kleint2013-10-141-3/+9
| | | | | | | | | Position cursor outside and move once more. Task-number: QTBUG-33972 Change-Id: If060f1359361981cf1243d8d2a4ebef181689d74 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Stabilize tst_QComboBox::keyBoardNavigationWithMouse.Friedemann Kleint2013-10-111-5/+15
| | | | | | | | The cursor needs to be within the view from start on Mac. Task-number: QTBUG-33973 Change-Id: I313c9fd1c3a917e135a92497f1818d1b0d8b7698 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix temporary file leak in tst_qfiledialog2.Friedemann Kleint2013-10-031-6/+5
| | | | | | | Change-Id: I5a1e601e3aa6e84300efa09bfbd9232fecab903e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Mac: QWizard default background pixmap works againLiang Qi2013-09-261-16/+4
| | | | | | | | Task-number: QTBUG-26722 Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* Add QKeySequenceEditIvan Komissarov2013-09-244-0/+111
| | | | | Change-Id: I497309d3e6cbf38b298afb5ff3cb1ed6a0e82000 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add widget replace function to QLayoutThorbjørn Lund Martsum2013-09-214-1/+136
| | | | | | | Sometimes it is nice to be able to replace a widget in a layout. Change-Id: I23a6a65e417e94d53bc48639503db1a142bc3f10 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-0/+45
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * xcb: QWindow never uses XCB_GRAVITY_CENTERShawn Rutledge2013-09-161-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Center gravity doesn't mean center the window, it only affects the method of converting between internal window bounds and decorated bounds. So wanting to have each dialog centered w.r.t. its transient parent is not a reason for using center gravity. Instead it caused the bug that when you resize a QMessageBox by clicking the Show Details button, it jumps downwards on the screen. Task-number: QTBUG-32473 Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | QCompleter::setFilterMode() add property filterMode.Oto Magaldadze2013-09-201-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | QCompleter::setFilterMode(Qt::MatchContains) will enable filtering out entries that contain typed characters in any place, instead of the default behavior when only those entries that start with typed characters are displayed. Qt::MatchEndsWith is also possible. QCompleter::setFilterMode(Qt::MatchStartsWith) will bring the default behavior back. Task-number: QTBUG-3414 Change-Id: I3845704c59eb8fc401e9a650c54a9c934ed28c2e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Set tst_qfilesystemmodel as insiginificantSimo Fält2013-09-201-0/+2
| | | | | | | | | | | | | | | | | | | | The test has been failing on all platforms. Usually it just times out, but it also have behavied flaky, failing with different error codes when executed twice in a row. Task-number: QTBUG-29403 Change-Id: Ic06638f0ffd23131b4c1aa4136f715195727e959 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Implement QMainWindow::takeCentralWidget()Sune Vuorela2013-09-201-0/+55
| | | | | | | | | | | | | | | | This allows the application developer to restructure the application, including moving the central widget some place else. Change-Id: Idca2f74c190500db24404e020b0eb400e41aad10 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Simplify QFileSystemModel::remove by using QDir::removeRecursivelyDavid Faure2013-09-161-4/+2
| | | | | | | | | | | | | | | | This also fixes it in case of hidden or system files, which were missing from the filter (found by Denis Kovalskiy). Change-Id: Ic12de12ec51c20de52d040514e90be5e783add43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-074-418/+559
|\| | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * Forward QGraphicsView::mouseDoubleClickEventMarcel Krems2013-09-061-5/+109
| | | | | | | | | | | | | | | | | | | | Do the same as in mousePressEvent. Otherwise it is not possible to handle the event in one of the graphics views parents. Task-number: QTBUG-8061 Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Center the QColumnView on-screen, in case that helps avoid the test failure.Stephen Kelly2013-09-051-0/+8
| | | | | | | | | | | | Task-number: QTBUG-32927 Change-Id: Icf0301d583b2ca6e2e099a19eb1f91feac1fb975 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Stabilize tst_qmenubar.Friedemann Kleint2013-08-281-413/+403
| | | | | | | | | | | | | | | | | | The test was re-using a main window and menu bars for all tests, clearing and repopulating them. Rewrite the code to be able to use menu bars and windows on the stack separately for each test. Change-Id: I13ab31b26b70bc8537e8d8ab164051b3197cd68e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Close menu on 2nd click on QMenuBar.Friedemann Kleint2013-08-271-0/+25
| | | | | | | | | | | | Task-number: QTBUG-32807 Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Center widgets using UpdateWidgets in tst_qwidget.Friedemann Kleint2013-08-271-1/+15
| | | | | | | | | | | | | | | | Try to stabilize doubleRepaint and others, try to get them away from taskbar areas. Change-Id: Icae8da575999afccb314edafd7deb16446e3d1c2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Fix layouts with expanding items with maximum sizePaul Olav Tvete2013-09-041-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layout items with a Preferred size policy would be treated as fixed size if they were in the same layout as an Expanding item (or one with a stretch factor). This occurred e.g. if a layout was configured similar to this: 1. One item with ExpandFlag/stretch but with a maximumSize set, e.g. (100x100). 2. Another item with 'just' GrowFlag, and a maximum size bigger than its size hint. If the above layout was resized to e.g. (200x50) it would cause the expanding item to correctly get the size (100x50), but the 'growing' item would not stretch beyond its size hint. Instead, it would distribute space around both items, behaving as if the 'growing' item was fixed'. The expected behavior is to continue to grow the 'growing' item after the expanding item has reached its size limit. Task-number: QTBUG-33104 Change-Id: Ie410653d905f7ca4d702528dafb269f30a0e4f61 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Skip tst_QGraphicsProxyWidget::popup_subwidget on Windows.Friedemann Kleint2013-09-031-0/+3
| | | | | | | | | | | | Task-number: QTBUG-33213 Change-Id: I1c8daa3a859f9d0d760054f1d8934abd84f62f0d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | QHeaderView - add maximum section sizeThorbjørn Martsum2013-09-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we auto resize it is handy to be able to limit the maximum size (just like the minimum size). [ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections has been introduced. The maximum section size is by default the largest possible section size which in Qt 5.2 has been limited to 1048575 pixels. Task-number: QTBUG-4346 Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | item delegates: fix clicking on tristate checkboxes.David Faure2013-09-021-0/+51
| | | | | | | | | | | | | | | | | | QCheckBox cycles through the 3 states, but item delegates didn't do that. Change-Id: Iad1e464341033ca357925fe8064f53bb584459f4 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-021-3/+4
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-3/+4
| |\| | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| | * Add more comparisons to narrow down error case.Stephen Kelly2013-08-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32927 Change-Id: I83d6def83c37febd8cd83676bff9d74f364ecfad Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Simo Fält <simo.falt@digia.com>
| | * Add debugging output to randomly failing test.Stephen Kelly2013-08-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result at http://thread.gmane.org/gmane.comp.lib.qt.ci-reports/12118 shows an unusual value. The expected output is QDEBUG : tst_QColumnView::scrollTo() last= 0 ; HorizontalOffset= -256 QDEBUG : tst_QColumnView::scrollTo() last= -256 ; HorizontalOffset= -512 QDEBUG : tst_QColumnView::scrollTo() last= -512 ; HorizontalOffset= -768 QDEBUG : tst_QColumnView::scrollTo() last= -768 ; HorizontalOffset= -1024 Change-Id: I8db091f4390cb1a41547d44ca966d172ac278e1a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Revert Mac event loop changes.Morten Johan Sørvig2013-09-022-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Make QGuiApplication::exec() run within NSApplicationMain()" "Make Qt process native and timer events on Cocoa applications" "Cocoa: Fix QFontDialog, QColorDialog auto-tests" This reverts commits 1e14762b8d79118540bd09a84dd3e48f4f5e113e e4b2a0b4bab2a17a65fedafe9bae50af1fe019f6 df7944e7d7dd8b2bbccbd639eff0ab09745d6cc3 Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QTreeView - fix next focus when there is no current indexThorbjørn Martsum2013-08-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we went through non hidden indexes, but we never considered the visual order. This patch fixes that issue. Though it was wrong before, it probably never was a big problem since it was unlikely that the tree (on logical index 0) was swapped or hidden, but 658e42e77a00596b63823482c9b77644556b647c makes it more likely that problems with wrong focus could occur. Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Cocoa: Fix QFontDialog, QColorDialog auto-testsGabriel de Dietrich2013-08-292-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new Cocoa event dispatcher made apparent some deficiencies in the way the dialog helpers were being hidden. In particular, we would not stop a dialog helper's modal loop when closing the dialog, resulting in the auto-tests hanging. Also, since the QApplication event loop is runnig with [NSApp run] in the stack, the previous workarounds are no longer needed. Task-number: QTBUG-24321 Change-Id: Ifba713c286638d78a699c319a15683d09714f06f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | QButtonGroup - add buttonToggled signalsThorbjørn Martsum2013-08-282-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QButtonGroup emits signals on clicked, pressed and released for buttons in the group, but for some (insuffienct) reason it did not emit anything for toggle (the only signal that it didn't emit anything for). This patch changes that, by adding handling of that signal to QButtonGroup. Task-number: QTBUG-14857 Change-Id: I88bcd7b060b78c7ff05ea1adf7baaddfe6d463be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Test layout engine fundamentalsPaul Olav Tvete2013-08-271-0/+155
|/ / | | | | | | | | | | | | | | | | Done with Jan Arve Task-number: QTBUG-33104 Change-Id: I8319748536d448d1c37a26527ced53156d8c2f56 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | QAIV - Fix scollbars with ScrollPerPixel to scroll 1 pixel.Thorbjørn Lund Martsum2013-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that we scroll one pixel Quote: "QAbstractItemView::ScrollPerPixel (value 1)" "The view will scroll the contents one pixel at a time." However until now Qt has tried to be smarter than the documentation, but is actually getting in the way of the user, where a manual set value to setSingleStep will continuingly be overwritten (on e.g resize). This patch ensures the behavior described in the documentation for the vertical headers - and leaves the control to the user. [ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews scrollbars will now by default only scroll 1 pixel when scrollMode is set to scrollPerPixel. That is it will (when scrollMode is scrollPerPixel) do what is stated in the documentation, and no longer automatically adjust the scrollbars singleStep. The user can now control that value. Task-number: QTBUG-7232 Change-Id: I8a61d3100be65d0c4ee32aad58caed019aa2669c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-232-3/+32
| | | | | | | | | | | | | | | | | | | | | | Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is really only for the native dialogs then the SnapToDefaultButton hint is moved as it has relevance for all dialogs Task-number: QTBUG-32631 Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Thiago Macieira2013-08-224-4/+82
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-214-4/+82
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| | * QtBase: Skip some tst_qwidget steps in Ubuntu 11.10Simo Fält2013-08-192-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Same steps keeps failing on Ubuntu 11.10 without valid reason. Task-number: QTBUG-30566 Change-Id: Ic7bf65496ff9ad9c4fdef42a30b808aa2c45a1e5 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Fix QGraphics(Ellipse)Item autotestGiuseppe D'Angelo2013-08-191-4/+7
| | | | | | | | | | | | | | | Change-Id: I6d5d702e97a0186979bd3bdcd0526d53afeecbd8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * QHeaderView::paintSection(): fix visible index handlingJ-P Nurmi2013-08-151-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sections may be hidden => QStyleOptionHeader::position must reflect the state seen on the screen. Otherwise styles will give wrong visual results. Task-number: QTBUG-32203 Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | tst_qgraphicsproxywidget: fix memory leakDavid Faure2013-08-211-0/+5
|/ / | | | | | | | | Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Extend QStyle API with a SH_Splitter_OpaqueResize styleHintRohan Garg2013-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently the default for QSplitter::opaqueResize is hard coded, which is less than ideal. Instead this should be provided as a style hint via QStyle so as to give a more uniform look to all applications. Change-Id: I5711811f7b672e36aafcd292ed320308570a0390 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Skip tst_QGraphicsProxyWidget::deleteProxyForChildWidget on WinFrederik Gladhorn2013-08-201-0/+4
| | | | | | | | | | | | | | | | | | This tests crashes a lot lately. Task-number: QTBUG-29684 Change-Id: I6892238dc071f050b0208dd5b4843629fa707347 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | tst_qgraphicsproxywidget: skip crashing test on Mac/Windows.David Faure2013-08-201-0/+3
| | | | | | | | | | | | | | Created QTBUG-33067 for tracking the issue, after some debugging. Change-Id: Iaf5556db2e0858e40a7cf6c9dbbe7e6fd6120bac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-08-167-10/+128
|\ \ | | | | | | | | | refs/staging/dev