summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Fix test compilation on WinRTAndrew Knight2013-11-261-3/+3
| | | | | | | | Tweak a handful of tests which didn't compile on this platform. Change-Id: I208d9eb289dfb226746c6d0163c3ea752485033b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-266-42/+30
|\ | | | | | | Change-Id: I83ff8f4d7dffd7385013a1bd8a1732a89ee20d56
| * Revert "Ensure Qt::WA_Mapped is set in case of obscured native windows."Tor Arne Vestbø2013-11-212-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Qt::WA_Mapped maps (sic) to windowHandle()->isExposed(), and we set/update it in QWidgetWindow::handleExposeEvent(). Setting it directly in show_sys shortcuts QPA and assumes showing a window is synchronous on all platforms, resulting in trying to flush the widget backingstore when the window was not exposed yet (due to discardSyncRequest starting to return false). This reverts commit 829b1d13b225e87b8a385397e2b53c7a9f8cda9e. Change-Id: I0bd700d4939bc69ba184d8586435b68ec3dd72fb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * tst_QFileSystemModel: don't expect ~/Documents to existMarc Mutz2013-11-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | For me, this test failed because I don't have a Documents folder in my home directory, even though that's what's returned from QStandardPaths as the first DocumentsLocation. Fix by falling back on the home directory if documentPaths.front() does not exist. Change-Id: I483f62f3b4b43d055c74774a7058a4aa420849b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Stabilize tst_QGraphicsWidget::updateFocusChainWhenChildDie().Friedemann Kleint2013-11-201-2/+10
| | | | | | | | | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I185bcd91bcdffbc0460a4d24f685d3dde84338a7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Stabilize tst_QGraphicsView::hoverLeave().Friedemann Kleint2013-11-201-6/+8
| | | | | | | | | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I0fab91c65b30e7028343c7e9b19a1b232fe72ebf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Stabilize tst_QGraphicsScene::isActive().Friedemann Kleint2013-11-201-1/+4
| | | | | | | | | | | | | | Position windows, use QTRY_VERIFY. Change-Id: I84349dd696a633840973e9db0c538830aaa96948 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-11-223-0/+61
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-203-0/+61
| |\| | | | | | | | | | | | | | | | | | | Conflicts: configure Change-Id: I0d31f23483ea67c4cac5af16014366e1ba5ac093
| | * Fix crash when windowcontainer is used in a dockwidgetGunnar Sletta2013-11-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dockwidget's toplevel window would be a parent of the container's window when floating. When plugged back into the mainwindow the dockwidget's window is destroyed and the container's window along with it. Added a function toplevelAboutToBeDestroyed to unparent the containers window before this happens so parentWasChanged will work correctly. Change-Id: I06679cfb3a8fa3834c0db0be5973c012b8277275 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Ensure Qt::WA_Mapped is set in case of obscured native windows.Friedemann Kleint2013-11-202-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-33520 Change-Id: I51f9b4634be29fd32f4ad9cc8b5d3e10b19ea2f5 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Center/position windows in tst_qmenu.Friedemann Kleint2013-11-211-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid menus showing up at 0,0 which is a taskbar area when running Unity. Task-number: QTBUG-33972 Change-Id: I156eec78248cec1708adf6bcf2e9ddcc98b7d8c4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | Remove QMacStyle titlebar height + 4 adjustment and consequencesShawn Rutledge2013-11-211-8/+0
|/ / | | | | | | | | | | | | | | | | | | This was a tweak to fix a bug in 2005 which has probably outlived its usefulness, plus an accumulation of workarounds on top. (started as 48b5266e8ff9b472a16290dd923fe24dd0b6989b in the historical repo) Task-number: QTBUG-34760 Change-Id: I2c01269e43636385ee5c89305c6b90f4a7f2c537 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-11-202-0/+36
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-182-0/+36
| |\| | | | | | | | | | Change-Id: Ie6d44caf1d630cb029178a1af40c637f24a25ee7
| | * Crash fix in QTreeView::sizeHintForColumn().Martin Pley2013-11-161-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vertical scrollbar may get out of sync. When this happens, the calculation of firstVisibleItem will retrun "-1". This must be handled in ::sizeHintForColumn(). Added an auto-test for the crashes. Task-number: QTBUG-34717 Change-Id: I867fd144ef3ce45e382337c5eafe345f573cd944 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * Skip tst_QGraphicsItem::ensureUpdateOnTextItem() on OSX 10.7Gunnar Sletta2013-11-141-0/+6
| | | | | | | | | | | | | | | Change-Id: Iedb8ed3ac797d11c47f08b92507401e2e1e96c14 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | | QProgressDialog: add unittest for the auto-show featureDavid Faure2013-11-201-0/+30
| | | | | | | | | | | | | | | Change-Id: I244d0b740467a09e8833f4debb95b19e45df371f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Widgets: Never revoke focus by click on focused widget.Christoph Schleifenbaum2013-11-181-0/+58
|/ / | | | | | | | | | | | | | | | | | | | | When clicking on a widget currently focused, w/o having Qt::ClickFocus set as focus policy, the focus should stay on the widget and not get propagated to the widget's parent. Task-number: QTBUG-34042 Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QHeaderView - do not ignore -1 as minimum section sizeThorbjørn Martsum2013-11-171-0/+2
| | | | | | | | | | | | | | | | | | We claim that -1 is a special automatic value, but calling setMinimumSectionSize with -1 is unfortunately ignored due a regression in 524c3e05e811d81fbcd71eedb377b7eaa0a21ef3 Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Stabilize tst_qabstractitemview.Friedemann Kleint2013-11-161-33/+106
| | | | | | | | | | | | | | | | | | | | Center windows on screen to avoid conflicts with Unity taskbars, observe minimum geometry for Windows, move cursor out of the way for Mac. Introduce QScopedPointer to ensure cleanup in case of failures. Change-Id: Ic169e015e795597457b8e85a28ff7fcb7b9b9430 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Remove QTRY_ macro from tst_qabstractitemview.Friedemann Kleint2013-11-151-13/+2
| | | | | | | | | | Change-Id: Ic8b8e5c242b640581aa735a3716666d4e7ff44eb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | QFormLayout: Avoid assertion with negative spacings.Jan Arve Saether2013-11-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | It's not really clear if styles *must* return a non-negative value for QStyle::pixelMetric(PM_Layout{Vertical,Horizontal}Spacing), but both QBoxLayout and QGridLayout seems to be robust enough to handle this. They will simply make sure that the spacing is never negative. We therefore make QFormLayout equally robust. Task-number: QTBUG-34731 Change-Id: I62235bfcd8adf7757cf15bc9927b29650ae6459d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QKeySequenceEdit: simplify clear()Marc Mutz2013-11-141-0/+24
|/ | | | | | | | | As the test case shows, clear() is semantically equivalent to setKeySequence(QKeySequence()), so implement it that way. Change-Id: Id68edbbf85aac3bcff82c81310c38274ed8e6708 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Revert "Fix setVisible() of QWidget has no effect in QTreeWidgetItem"Friedemann Kleint2013-11-081-34/+0
| | | | | | | | | | | | It introduces QTBUG-34653 (Qt Designer widget box no longer repainted after collapsing items or using the filter). This reverts commit 04de24c6449422d29a0d4760375aa94f59222fa3. Task-number: QTBUG-13522 Task-number: QTBUG-34653 Change-Id: Ieb9766e7f15acea901fce4ad7142aa72557b9957 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Disable clear button in read-only QLineEdit.Friedemann Kleint2013-11-051-0/+3
| | | | | | Task-number: QTBUG-34315 Change-Id: I6c318879aee907c080e871a541da4ba5eadd71ed Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix stability issues in tst_qwidget with VERIFY_COLORJan Arve Saether2013-11-011-23/+61
| | | | | | | | | | | | | The grabbing always grabbed the desktop. This caused it to also grab tooltips, siderbars etc that could overlap the window which again caused the pixmap comparison to obviously fail. This will currently only fix it on windows. If needed, it should also be fixed for other platforms. Task-number: QTBUG-30566 Change-Id: I5cee8651e1d94dedded0acae8b19f351acd976c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix setVisible() of QWidget has no effect in QTreeWidgetItemChengyong Xie2013-10-311-0/+34
| | | | | | | | | | Check if the item is hidden before show the item(QWidget) Task-number: QTBUG-13522 Change-Id: I1c605d5cb8a80f340e9b7601612d3760f51cb4a7 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Stabilize moveChild/showAndMoveChild-tests.Friedemann Kleint2013-10-311-27/+59
| | | | | | | | | | | | | Pass window flags on to ColorWidget constructor and use a window frame + stay on top-hint for the moveChild/showAndMoveChild tests to make the screen grabbing more reliable. Disable animations on Windows since they seem to affect screen grabbing as well (fading in of windows). Task-number: QTBUG-30566 Change-Id: I8eacfc203d26674dc1b283d6643f3d434f218f26 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* 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>