summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QMenu: Fix nested popup when keyboard shortcut is usedOrgad Shaneh2013-01-141-0/+17
| | | | | | | | | Task-number: QTBUG-20403 Change-Id: I2a5fe00dd16e9dc1ec0d742a8f48083fc2954996 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
* Fix warnings about not being able to set Window geometry on Windows.Friedemann Kleint2013-01-081-0/+9
| | | | | | | | | | Fully decorated windows cannot be smaller than 160x30 (Large fonts). Enlarge Windows or remove Window frame to get rid of decorations. Task-number: QTBUG-28611 Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Widgets: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-0415-34/+0
| | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ibe8e2ec867afb4051a3c7eef806d9cd86945928b Reviewed-by: David Faure <david.faure@kdab.com>
* Remove metatype registration of built-in types.Stephen Kelly2013-01-035-7/+0
| | | | | | | | As they are built-in, they are effectively registered at compile-time already. Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-211-1/+1
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Tests: stabilize tst_QAbstractScrollArea::setScrollBars2()J-P Nurmi2012-12-201-8/+8
| | | | | | | | | | | | Use QWidget::isVisibleTo(parent) instead of isVisible(), just like QAbstractScrollArea::replaceScrollBar() does. This removes the need of using QCoreApplication::processEvents() to deliver the actual hide event just for testing if the scrollbar was requested to be hidden as it should. Change-Id: Ie9a816e7b871d280a4b3d9d76adb10601915bd56 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QMdiArea: Increase minimum size for Windows 8/Large fonts.Friedemann Kleint2012-12-181-2/+2
| | | | | | | Task-number: QTBUG-28611 Change-Id: I115a5fa6726ac99c2bbff4ec65d3f8856b2530df Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* QMenu: Do not set snapToMouse if a caused-widget exists.Friedemann Kleint2012-12-121-4/+37
| | | | | | | | | | | | When clicking at the bottom-right corner of a menu in a menu bar, it appears at the wrong position. Add test and stabilize RTL-tests by making sure the layout direction is cleared should they fail. Task-number: QTBUG-28031 Task-number: QTBUG-2596 Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* test: Skip tst_QMdiArea::nativeSubWindows() on Windows/ANGLE.Friedemann Kleint2012-12-121-1/+4
| | | | | | | | Task-number: QTBUG-28545 Change-Id: Ifa698b9efe38654c8f8fbcc184db5d176df7ba47 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* tst_QMenuBar: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-3/+6
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: I422e7d67fadbb169d19285aab0a8ba0f3d668697 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QComboBox: use QProxyStyle instead of QWindowsStyleJ-P Nurmi2012-11-261-4/+4
| | | | | | | QWindowsStyle is soon to become an internal class. Change-Id: Ic76ecc20ff600a7d401b44c8dc4d93198c06becc Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QDateTimeEdit: remove redundant includeJ-P Nurmi2012-11-241-1/+0
| | | | | | Change-Id: I3aeb90723b41b35e221b86b1767ed1ac45a9fe0c Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QToolButton: remove redundant includeJ-P Nurmi2012-11-241-1/+0
| | | | | Change-Id: Ie55a530a89b85a4f3369ee3205221fb01fa1773e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Made QMacStyle internalJ-P Nurmi2012-11-233-11/+4
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QMacStyle directly. Change-Id: I44a2f5ee3fe08ecc837b593a2a2737eb90e8c267 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Made QFusionStyle internalJ-P Nurmi2012-11-211-5/+3
| | | | | | | | | | | | | We will take this opportynity to remove various QStyle specializations from the public API in Qt5. This gives us much more freedom, for example changing the inheritance hierarchy, pluginizing etc. without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QFusionStyle directly. Change-Id: I37d8acb13b6fd328a9cd53c74df971428bbbe443 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Widgets: Stop cursor blink timer when QLineEdit is read-onlyGabriel de Dietrich2012-11-141-0/+38
| | | | | | | This prevents unnecessary updates, since the cursor is not visible. Change-Id: Iec54ed338a0cb526a03cd611de4d823e26f3d804 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Do not call QWidget::show/hideEvent twiceOliver Wolff2012-11-082-2/+1
| | | | | | | | | | | | | | | | | | | | | While handling events for Widgets and Windows in QWidgetWindow::event makes sense for other events, it causes QWidget::show/hideEvent to be called twice when handled like "the rest". Having that as one case here seems to be the cleanest solution. Removing the call to showEvent from QWidgetPrivate::show_helper (as proposed in the bug report) causes autotests to fail and thus is not a viable option. Additionally the expected result for the task221221 test for QDoubleSpinBox was reverted to the Qt4 value as Qt4 behaviour was restored. Task-number: QTBUG-27199 Task-number: QTBUG-26424 Task-number: QTBUG-22565 Change-Id: I0ac42b09b1a7618de042d27aa5dd1b3d9f30f552 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Mac: refactor scrollbar animationsJ-P Nurmi2012-11-021-10/+10
| | | | | | | | | Get rid of QWidget-centric QMacStyle::eventFilter() and implement the fade out animations for scrollbars using QNumberStyleAnimation-based QFadeOutAnimation. Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Make it obvious that adding a QLayout to QSplitter is not supported.Mitch Curtis2012-11-021-1/+11
| | | | | | | | | | | | | | | It does not make sense to add a QLayout to a QSplitter, since the splitter manages its child widgets in the same manner as a QLayout. The result of doing so is that the child widgets inside that layout will lead to the splitter and the layout fighting to position the child widgets. QSplitter::addWidget should be used to add widgets directly to the splitter instead. Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679 Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix progressbar animation on macstyleJens Bache-Wiig2012-11-021-0/+7
| | | | | | | | The animation is not just supposed to run when indeterminate, but also while it is progressing. Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Do the actual removal of the Soft Keys API and related codeJan Arve Saether2012-10-293-84/+15
| | | | | | | | | | | | | | | | | | | In addition to the actual removal of the softkeys API in QAction, this commit removes some enums related to the softkeys feature: Qt::WA_MergeSoftkeys Qt::WA_MergeSoftkeysRecursively It also removes some "zombie" enums: Qt::WindowSoftkeysVisibleHint = 0x40000000, Qt::WindowSoftkeysRespondHint = 0x80000000, (The only implementation that used these were removed when qapplication_s60.cpp and qwidget_s60.cpp were removed.) Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QComboBox: new signal currentTextChangedMark Brand2012-10-261-0/+55
| | | | | | | | | | | Adds NOTIFY to currentText property. Test included. Change-Id: I3e92b585ad6697891d61537c82f6ab9e8beb1a00 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QComboBox: fix use in QDataWidgetMapper/QItemDelegateMark Brand2012-10-261-0/+53
| | | | | | | | | | | | | | | | | | | | | | | QItemDelegate and QDataWidgetMapper use the WRITE method on the USER property to set a value in a widget. This did not work for QComboBox whose USER property currentText lacked a WRITE method. This change adds the missing setter and flags it as the WRITE method. The setter setCurrentText() simply calls setEditText() if the combo box is editable. Otherwise, if there is a matching text in the list, currentIndex is set to the corresponding index. Test included. Follow-up to 816c5540179362500dfc175b77f05abf3ef25233 which restored currentText as the USER property. Task-number: QTBUG-26501 Change-Id: I5f2f999e60b09728ca03ead4e28fe36d1f3ee189 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Properly check for widget's visibility in doublespinbox autotestOliver Wolff2012-10-261-2/+2
| | | | | Change-Id: If9e08ab5c84090729537e2a060257564c62fda9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Unmark tst_qgroupbox as a parallel testRohan McGovern2012-10-241-1/+0
| | | | | | | | Judging from recent failures in the call to QTest::qWaitForWindowActive in this test, the test may not be parallel-safe as previously thought. Change-Id: I0a05eafd9086207ea3fc73f611bf834b657d5b8a Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-223-18/+13
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix integer overflow in QSpinBox.Stephen Kelly2012-10-221-0/+31
| | | | | Change-Id: Ic204d42fbdffc44576f7e76132bc53621e836299 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* normalise signal/slot signatures [QtWidgets tests]Marc Mutz2012-10-1916-52/+52
| | | | | Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QComboBox: replace homebrew with QSignalSpy for editTextChanged testMark Brand2012-10-161-35/+12
| | | | | Change-Id: Id4c81ae71d6dc87f9ad7cfb99a89d335162e1f75 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix QComboBox icon testingGiuseppe D'Angelo2012-10-163-2/+4
| | | | | | | | | | | | | | | The icons used were always null -- the files used to create them were not present. So 1) add back the files used for the test (qtlogo.png, copied from src/widgets/dialogs/images/qtlogo-64.png, and qtlogoinverted.png, its copy rotated by 180°); 2) use QFINDTESTDATA to get the paths to the files. Change-Id: I26f094079e037116e49e2a95345c2dea7496eecb Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Auto tests: revise cursor dependant testsJ-P Nurmi2012-10-135-11/+24
| | | | | | | | | | | | | | | | | | Cursor dependant auto tests are currently skipped in various ways. Some are checking PlatformQuirks::haveMouseCursor() that tries to detect if the desktop environment is MeeGo, using obsolete Q_WS_X11. Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and some are actually missing the approriate guards. => unify by defining QTEST_NO_CURSOR in qtest-config.h when appropriate ie. for platforms that have no regular mouse cursor support or when QT_NO_CURSOR is defined. Task-number: QTBUG-22551 Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix tst_QTextEdit::fullWidthSelection2() for shadow buildKonstantin Ritt2012-10-121-1/+1
| | | | | | | Search for the test data files in the test data directory, not in the current dir. Change-Id: I746e717bae575364102c1bb5c2888332d94c374f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Revert "Handle additional format ranges when itemizing."Pierre Rossi2012-10-101-4/+3
| | | | | | | | | | | This reverts commit 101d04681f4ceb7410681eae684534a206a9d90a. That change seems to have introduced a few regressions, and Creator hits an assertion that it introduced because it assumes the additionalFormats consists of well-formed ranges (QTCREATORBUG-7995). Change-Id: Ic4ae761e6e7f6df8a6b5ca565ceb250647420c15 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Move QValidator tests to QtGuiGiuseppe D'Angelo2012-10-1010-850/+0
| | | | | | | | Q*Validator classes are not in QtWidgets, so move them where they should stay. Change-Id: Ie6ea45a026e640fad131002bc9762c575235f3f4 Reviewed-by: David Faure <david.faure@kdab.com>
* tst_QMenuBar: remove QSKIP's -> omit whole test cases insteadJ-P Nurmi2012-10-101-46/+43
| | | | | | Change-Id: I2cf356c5790fd7f2b27a9032e2effacd098b3d05 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Mac: Bring back "Text boxes and list only" tab navigationGabriel de Dietrich2012-10-103-6/+6
| | | | | | | | | | | | | Added ThemeHint::TabAllWidgets as a mean to access that platform specific bool. The default implementation returns always true when querying QPlatformTheme::themeHint(). Several auto-tests had to be updated to reflect for qt_tab_all_widgets' type change. One XFAIL removed from tst_QApplication::focusChanged(). Task-number: QTBUG-24372 Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Stabilize test qmenu::pushButtonPopulateOnAboutToShow().Friedemann Kleint2012-10-081-19/+32
| | | | | | | | Do not leave an allocated menu in member lastMenu behind that interferes with the consecutive QTBUG7907_submenus_autoselect(). Change-Id: I80fc9de9ca63367264f642023a244c1d7d8ada7f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Handle additional format ranges when itemizing.Pierre Rossi2012-10-081-3/+4
| | | | | | | | | | | | | | This is useful when the additional formats are used on a text layout using a raw font. It can also come in handy for input methods operating on a QTextDocument. We now consider all format range edges to generate the associated items. The capitalization can be overridden via the additionnal formats mechanism. Adds an autotest that checks that this works with font capitalization. Change-Id: I782d2c48d05b0dfbad480a9ca77198465292b358 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* test: Remove QSKIP from tst_QToolButton::triggered()Sergio Ahumada2012-10-041-4/+0
| | | | | | | | This test actually passes on Mac OS X, so removing the QSKIP Task-number: QTBUG-24374 Change-Id: I0b761ca9c30afc9d511e9962ee1c0958b863b374 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* tst_QDateTimeEdit: cleanup whitespace & follow Qt coding styleJ-P Nurmi2012-09-281-76/+31
| | | | | Change-Id: Iae04cd0c9ac6ea85621b293f2ce184d673548e9b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QLabel: remove QSKIP, wrap Q_OS_MACJ-P Nurmi2012-09-271-3/+5
| | | | | Change-Id: If67dbb07900bfa8f1bcf55aa457bd90ef0550900 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QMenu: remove QSKIP's -> wrap Q_OS_WINCEJ-P Nurmi2012-09-271-6/+10
| | | | | Change-Id: If8cb4a7dc0630aca83e4796bffb46f547abc4b6f Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QMainWindow: remove QSKIP, wrap Q_OS_MACJ-P Nurmi2012-09-271-4/+4
| | | | | Change-Id: Ided3c4cbdc7508a36e96351b5f60d79532bb7f26 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_QAbstractButton::keyNavigation(): QSKIP -> XFAILJ-P Nurmi2012-09-271-3/+7
| | | | | | | Task-number: QTBUG-22286 Change-Id: If2c0e9181f2d954f3487dbb4c3f440d26a38adb6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* tst_QCommandLinkButton: cleanup whitespaceJ-P Nurmi2012-09-271-17/+11
| | | | | Change-Id: Ia1aab643f7b93b0532a38b27d7777fbcf5f489bc Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-271-6/+0
| | | | | | | | | | | | | | | | | It is time to clean up some of our legacy code. These styles have not been actively maintained for a long time and I think it is safe to say that they should no longer belong as part of the default distribution of Qt. We dont support any platforms based on CDE with our source packages. Note that even if we are removing these styles from the default distribution of Qt, applications that depend on them will still be able to bundle the existing (and unmodified) styles along with their own source code as we are not breaking compatibility. Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* tst_qcheckbox: remove duplicate codeJ-P Nurmi2012-09-271-8/+0
| | | | | Change-Id: Ic5d7694251e42a6d5ad7fea19137b71bc499ac94 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QtWidgets auto tests: revise clipboard related testsJ-P Nurmi2012-09-273-85/+20
| | | | | | | | Use PlatformClipboard::isAvailable() and omit relevant test cases when QT_NO_CLIPBOARD is defined. Change-Id: I7e7b20a0a18f1a82987564f0e5e6c76d9207bc4b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* [QTBUG-27308][QTBUG-21534] Don't mouse-wheel-scroll QScrollBar when disabledMarc Mutz2012-09-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced in Qt 4 commit e855b199319c932f2e9500235775f961bc32e41a. The problem was that by handling the wheel event in event() instead of wheelEvent(), we lack the guard clause in QWidget that doesn't even call the handler if the widget is disabled, and the code didn't handle this itself. Fix by reimplementing wheelEvent() instead, which we can now do because we can break BC. This commit just moves the code. Another commit will clean up the implementation of wheelEvent(). Task-number: QTBUG-27308 Reported-by: chenjiexin Task-number: QTBUG-21534 Reported-by: Martin Koller Change-Id: Ibe6b89a81fe889f839c205b859a1492b39a4ddc3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Auto tests: remove PlatformQuirks::isAutoMaximizing()J-P Nurmi2012-09-262-7/+4
| | | | | | | | | | Use QStyleHints::showIsFullScreen() where necessary. Notice that QWidget::show() already calls showFullScreen() if appropriate, and Qt::X11BypassWindowManagerHint doesn't do anything in the XCB platform plugin. Change-Id: Ib8f61188c075170d646894388561cbb3f72daee8 Reviewed-by: Caroline Chao <caroline.chao@digia.com>