summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* Plug remaining leaks in tests/auto/widgets/styleMarc Mutz2016-09-301-3/+3
| | | | | | | | | | | | | | | The usual: - delete styles Either by using QScopedPointer. This fixes the remaining errors in GCC 6.1 Linux ASan runs of tests/auto/widgets/styles. Change-Id: Ifba59085c057d474bf964cbb93010c408d773a61 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Enable testStyleOptionInit for all styles and fix affected styles.Hannah von Reth2016-06-061-6/+3
| | | | | Change-Id: I7cb759445342ecb58d5187ddd4a22e41fdea084a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make sure QStyleOption is correctly initialized.Hannah von Reth2016-04-051-0/+107
| | | | | | | | | | | Ensures that QStyleOption is correctly initialized. This prevents possible styling issues due to QStyleOption's reporting version 0, see qstyleoption_cast. This enables users to handle more cases in their QProxyStyle. For now the test is only used for QCommonStyle. Change-Id: I768db00b12b46890343fffe44e4f562762e9cf80 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Allow to style arrows drawn with drawPrimitive in QCommonStyle.Hannah von Reth2016-03-251-0/+48
| | | | | | | | Its currently not possible to style the arrows with QCommonStyle because drawPrimitive from QCommonStyle is called instead from the proxy. Change-Id: I910b13df110601cb18578bc16edfa5ddaa17bbd2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* tests: remove use of obsolete QStyleOption*V<N>Marc Mutz2015-11-032-18/+2
| | | | | | | They are obsolete since Qt 5.0. Change-Id: Iefe47684526832def8fc5be5a170817059dcc530 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-312-87/+111
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ie29640451dddeb58342038a8cd5fac152cce39e5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * fix usage of wince scopeOswald Buddenhagen2015-06-051-1/+1
| | | | | | | | | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Blacklist and skip various tests that are flakeySimon Hausmann2015-06-141-0/+2
|/ | | | | | | | | | They didn't show up in the "old" CI runs because they usually pass the second time they are executed - which the testrunner does. The new CI doesn't do that anymore, instead we now mark those tests explicitly and will track their record of passing and failing in the new metrics database. Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright headersJani Heikkinen2015-02-114-28/+28
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Android: Fix some QStyle testsEskil Abrahamsen Blomfeldt2015-01-082-0/+25
| | | | | | | | | This adds the testdata to a qrc to make them available on Android. There are still some failures which might be actual errors, and which will be addressed separately. Change-Id: I1bdcfb2c6676134ca52388d49a1b2d25cf2813f9 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Update license headers and add new license filesMatti Paaso2014-09-244-76/+44
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Uncomment some tests which accidently got commentedAndy Shaw2014-08-071-6/+6
| | | | | | | | With SHA1 47b3ecf3f49933f2a7e3a9dd98f0641d513822bb some tests got commented out by accident. This re-enables those tests. Change-Id: If9c7d8a672b66086895a0383fe87d3101fb146fb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Remove the widget from the stylesheet cache before polishingAndy Shaw2014-06-201-7/+30
| | | | | | | | | | If the widget exists in the style rules cache before it polishes for the first time then it should be removed from styleSheetCache too so that the latest set stylesheet is used for the polishing. Task-number: QTBUG-39427 Change-Id: Ic1e7988afe530f16ea9996bae56543ed554d6be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix tst_QStyleSheetStyle::toolTip().Friedemann Kleint2014-05-081-1/+17
| | | | | | | | | Use the correct palette and enforce Fusion style to prevent the Vista style from clobbering the tooltip palette in polish(). Task-number: QTBUG-38183 Change-Id: Id19d548f818d801c4914a343e08207195c343888 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Revive tst_qstylesheetstyle on Desktop platforms.Friedemann Kleint2014-05-082-32/+91
| | | | | | Task-number: QTBUG-21468 Change-Id: I37f741d9709b17ad31b01078e10538f0f6bff01a Reviewed-by: Liang Qi <liang.qi@digia.com>
* Revert "Ignore tst_QStyleSheetStyle::hoverColors() failures on Mac OS X"Liang Qi2014-05-061-9/+0
| | | | | | | | | | | This test doesn't fail on Mac any more. This reverts commit 36493a7a41b7ce38af429a943a73d791100c6c13. Task-number: QTBUG-23685 Change-Id: Ib7c56494b07de9839b3287758fe228f799bc343c Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* CSS parser: fix the pseudo-classes array lengthGiuseppe D'Angelo2014-02-261-0/+32
| | | | | | | | | | | | | | | The pseudoclass array is declared with length "NumPseudos - 1", but the declaration has actually 44 elements, not 45. This caused a zero-initialized last element to be silently appended to the array. The zero-initialized element broke the sorting of the array, which in turn broke std::lower_bound usage (although of course the problem was there from before switching to the standard library algorithms). Task-number: QTBUG-36933 Change-Id: I8a02891fc36761b6ae72d15a0a8d6c6a96813947 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Test password mask delay and characters on Mac.Mitch Curtis2013-07-111-0/+12
| | | | | | | Task-number: QTBUG-31498 Change-Id: Iab4a56b94364e3db78070aca40c629f9398ffbb7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Use QFINDTESTDATA on tst_QStyle instead of SRCDIRRafael Roquetto2013-06-072-5/+5
| | | | | | | | Update the test code to match the current Qt idiom for finding test data (and fix it on QNX). Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix tst_qstyle autotest build for WEC7.Janne Anttila2013-04-171-2/+2
| | | | | | | | | | Apparently testAllFunctions method has been changed to take pointer, but code inside different WinCE defines was not updated. Change-Id: Id15380ecc1e85650d679cb7437923ff9c77057ae Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-284-4/+0
| | | | | Change-Id: I1264784d6984edc70bf07e58ed763e1d1b001d7d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}Debao Zhang2013-03-272-4/+4
| | | | | Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-163-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add QProxyStyle(QString key) constructor for convenienceJ-P Nurmi2013-03-041-2/+5
| | | | | | | | | | | | | | | The QStyle implementations are becoming private, so the following slightly verbose pattern seems to be now repeated a lot: new QProxyStyle(QStyleFactory::create("windows")) This change adds an alternative, more convenient constructor for this particular use case: new QProxyStyle("windows") Change-Id: I97ded597a0fd3225a6354ebea0abb367237430af Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-184-4/+4
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QStyle-test for Windows Aero / 8.Friedemann Kleint2012-12-181-3/+29
| | | | | | | | | | | | Increase tolerance on Windows for the Aero style. Set small top level widgets frameless to avoid warnings about minimum size of decorated windows on Windows. Task-number: QTBUG-28611 Change-Id: Ia4aec0cf0763da9955577054cb8cf81337fac134 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* tst_qstyle: Fix compiler warning about unused variables.Friedemann Kleint2012-12-171-2/+2
| | | | | Change-Id: Ida6a45be577cc1e21a2ba2b45f57b1e96c944fb2 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Style auto tests: kill QWindowsStyle dependenciesJ-P Nurmi2012-11-282-46/+51
| | | | | Change-Id: I135fe2b0aae81c73c1cca6272f71db07ecb3fa6b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Made QMacStyle internalJ-P Nurmi2012-11-232-11/+6
| | | | | | | | | | | | | 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 QWindowsMobileStyle internalJ-P Nurmi2012-11-231-3/+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 QWindowsMobileStyle directly. Change-Id: Id64f3dabff38db7864e235c79b2e9276379f4ba4 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Made QWindowsCEStyle internalJ-P Nurmi2012-11-231-5/+2
| | | | | | | | | | | | | | 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 QWindowsCEStyle directly. Change-Id: I6b3c0554e7a2a4a5f0027f4ea1342fd332af89ad Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Made QWindowsXPStyle internalJ-P Nurmi2012-11-211-7/+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 and even merging style implementations (XP & Vista) later on, without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsXPStyle directly. Change-Id: Ib4fec35c2fcb3b5a193537a1de5b6e26fbbe0a06 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Made QWindowsVistaStyle internalJ-P Nurmi2012-11-211-5/+5
| | | | | | | | | | | | | 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 and even merging style implementations (XP & Vista) later on, without worrying about BC. => Use QStyleFactory and/or QProxyStyle instead of creating an instance or inheriting QWindowsVistaStyle directly. Change-Id: I8b320036e241e877fc9bb5f4084cc6e63756cbc4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Made QFusionStyle internalJ-P Nurmi2012-11-212-11/+8
| | | | | | | | | | | | | 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>
* test: Remove some QSKIP's from tst_QStyleSergio Ahumada2012-11-031-20/+23
| | | | | Change-Id: Ic277889a75871a8bf72ab2eb2b97e6deeed498e9 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Compile fix for tst_qstylesheetstyle.cpphjk2012-11-011-1/+1
| | | | | | | There was a semicolon missing. Change-Id: Id2eb843604907acf952d7d238f80ba8a7010ccd1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-222-32/+18
| | | | | | | | | 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>
* Modified vertical alignments of simple widgets on OSXTero Ahola2012-10-182-10/+5
| | | | | | | | | | | | | Adding QCheckBox, QComboBox, QLineEdit etc. into an HBox layout or grid layout makes the layout look like a snake's trail. Fixed the positioning of these widgets to make the layouts visually more appealing. Updated qmacstyle auto-test accordingly. Task-number: QTBUG-13635 Ammended-by: Gabriel de Dietrich Change-Id: I89461f9aad68ea8488070ed06257b9b8e7f493c5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Auto tests: revise cursor dependant testsJ-P Nurmi2012-10-131-4/+6
| | | | | | | | | | | | | | | | | | 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>
* Remove CDE and Motif styles from qtbaseJens Bache-Wiig2012-09-272-34/+2
| | | | | | | | | | | | | | | | | 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-224-96/+96
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix regression in QAbstractScrollAreaJens Bache-Wiig2012-09-211-0/+39
| | | | | | | | | | | | | The style hint SH_ScrollView_FrameOnlyAroundContents was currently being ignored by QAbstractScrollArea. This looks like an accidental regression following 10c6f015f45092040c281bb90a65179f598a00b1. This code path does not execute on mac so it should have no impact on that patch. Change-Id: I78ca0a6b87dfdd7d426acbb3ef49480390211af2 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix build of tests/ on Windows CEKevin Funk2012-09-101-0/+3
| | | | | | | | | | Remove some subprojects that have missing dependencies or use API that is non-available on Windows CE. Change-Id: Iad7118b95a691a433c3f798d56a6a069e5e41917 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* auto tests: updated for new QStyle pure virtualsJ-P Nurmi2012-08-311-0/+16
| | | | | | | | QStyle::standardIconImplementation() & layoutSpacingImplementation() are removed, and standardIcon() & layoutSpacing() made pure virtual. Change-Id: If8ab6cfef0b639b7973be22dd630ba3e6f39a225 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Remove some dead code wrapped in Q_WS_QWS.Stephen Kelly2012-08-031-11/+0
| | | | | Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-014-0/+4
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove usage of deprecated qWaitForWindowShown(QWidget *) method.Friedemann Kleint2012-07-251-12/+9
| | | | | | | | Remove usages from autotests with the exception of widgets/kernel, widgets/widgets and widgets/graphicsview. Change-Id: I917b2857ed0cd07a6b3dbcd69244f558086c6586 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Tests: Replace deprecated QPixmap::grabWidget() by QWidget::grab().Friedemann Kleint2012-07-201-12/+12
| | | | | Change-Id: I5018cf5dd51c1781e7f17c7d205f3f60de7945be Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Implement waitForWindowExposed and friends for widget windows.Friedemann Kleint2012-07-201-1/+2
| | | | | | | | | | | | | | - Implement waitForWindowExposed() for toplevel windows. - Implement waitForWindowShown(QWidget *) and mark as deprecated in line with waitForWindowShown(QWindow*). - Use in tests. - Simplify tests (collapse waitForExposed, setActive into setActiveWindow, waitForActive), remove most hard-coded timeouts. - Stabilize graphicsview tests by using waitForWindowActive. Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>