Commit Graph

80 Commits

Author SHA1 Message Date
Stephen Kelly
50ef3ae2f3 Notify about moves in the source model more efficiently.
Change-Id: I5ea2a2dddc1b39a3d2b405bda815f42df7c07c75
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
Friedemann Kleint
ebfdb73b75 qtbase: Remove QSound.
Which currently causes tests not to compile on Windows
due to missing symbols in QtWidgets (QSound::QSound() ,etc).

Change-Id: I87f0a403e61c3a67f9a758f114e33db1012e33e8
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-07 14:37:41 +01:00
Jason McDonald
b989444f35 Use QTRY_VERIFY to test asynchronous behaviour.
QTRY_VERIFY waits for a condition to become true while regularly
processing events.  There is no need for a custom solution to this
problem.

Change-Id: Ia65c90cbdb165b543f5c78f9bac3cfadd77dfb3f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-07 07:53:30 +01:00
Jason McDonald
7fcc55034c Use QTRY_VERIFY to test asynchronous behaviour.
QTRY_VERIFY waits for a condition to become true while regularly
processing events.  There is no need for a custom solution to this
problem.

Change-Id: Ia23e2fb61cdc5c3a3a8a729cd4356ba930fe7cb7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-07 07:53:26 +01:00
Jason McDonald
e3640d1bdd Remove TESTED_CLASS/TESTED_FILES comments from tests.
These comments were mostly empty or inaccurate.  Appropriate naming of
tests and appropriate placement of tests within the directory tree
provide more reliable indicators of what is being tested.

Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 02:19:25 +01:00
Friedemann Kleint
0fc713b436 Tests: Temporarily remove qsound.
As the test does not link Windows.

Change-Id: I07ce2381146e43aef4353ddb2625ac472e6a0555
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-12-01 15:16:28 +01:00
Jo Asplin
9acec431c3 Moved integrationtests/* into other/
Currently there seems to be no precise definition of what
an integrationtest is in the context of Qt testing.

To avoid confusion, the tests under integrationtests/ are
moved into other/ (which is effectively where we keep
tests that don't clearly fit into any other category).

Tests can be moved back into an integrationtests/ directory
at a later point, should an unambiguous definition be established.

Change-Id: I3bb289be2dc2aca11b51a8ce8fcc5942f06d6c5c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-30 09:30:22 +01:00
Jason McDonald
cbcdb5f4cf Correct usage of network-settings.h.
Four of the modified files only use functions from network-settings.h
on Windows, and the other three files don't use anything from that
header.

Change-Id: Ifa4b0319d14367735b859e538921fa0eeeccce1a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-28 08:13:41 +01:00
Stephen Kelly
c1007112c8 Be specific about what part of the model is being re-layouted.
Change-Id: I6b6fe98929543447f945a335c33960823c0d1a4a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-25 14:37:02 +01:00
Rohan McGovern
9ffd7a339f Added build system support for installing tests.
Tests will install under $$[QT_INSTALL_TESTS].

TESTDATA may be used to install additional testdata required by the
test.

The default install rule may be disabled by
CONFIG+=no_testcase_installs.

Change-Id: I204de60c8e844775906ffd016ca50bffbb414142
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-23 00:13:46 +01:00
Friedemann Kleint
e8b4c49efd qtbase tests: Fix some warnings
- Fix warnings about QAtomicPointer/Int usage
- Fix some gcc 4.6 warnings about assigned/unused variables

Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-21 09:58:23 +01:00
Jason McDonald
a8fd0c3654 Don't depend on moc to disable test functions.
The moc tool is not aware of all defines (particularly those that are
compiler builtins) and does not correctly evaluate others that depend
on compiler builtins, such as Q_OS_FOO.

This commit reverts parts of the following commits, but is not a
complete fix as there were many instances of this problem in the tests
prior to those commits:
    924d810dbd
    8aaff67510
    338d3f1197
    a55034062b
    253497b744
    7cfad460c5
    9d2ff58f36
    0cf6baa2d6

Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-18 01:51:57 +01:00
Jiang Jiang
3d063ecc5f Provide defaultFont with fontconfig db
So that it won't just return "Helvetica" that may not exist in
target system. Providing it seems to fix QTBUG-21833 as well,
thus we can remove the QEXPECT_FAIL statement in qlistview test.
'_' appears to reach the minimum right bearing in some fonts.

Task-number: QTBUG-21833
Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-15 18:33:58 +01:00
Jason McDonald
c1c51dd4f7 Avoid crash in QColumnView autotest.
When combined with http://codereview.qt-project.org/8644, the test
crashes.  This appears to be due to a column of the view being deleted
in response to calling setCurrentIndex(), as documented in QTBUG-22707.

This commit must be merged at the same time as
http://codereview.qt-project.org/8644.

Task-number: QTBUG-22707
Change-Id: I075be7df5d9196e37e2286e61d317086a76a167d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-15 04:31:55 +01:00
Mikko Knuutila
ddb512fb37 Fix for QMessageBox's autotest.
Mnemonic shortcut caused string comparison to fail.

Task-number: QTBUG-22119

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 11a6d868b5613dd7fdbef02198aaf9566fcd1f17)
Change-Id: I11a6d868b5613dd7fdbef02198aaf9566fcd1f17
2011-11-14 23:42:17 +01:00
Bradley T. Hughes
a2ece6e626 Disable qmacstyle test on Mac OS X
The QMacStyle is not built as part of QtWidgets at the moment (see the
TODO in src/widgets/styles/styles.pri), so disable the test for now.

I've included a comment in styles.pri to re-enable the test once the
style is done.

Change-Id: Ia6ea130135586f107ba257bf2c6c2c7187a830b6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-11-14 23:42:17 +01:00
Mikko Knuutila
2b8c3ff0f0 Added base 10 to be used with QIntValidator.
Fixes an error in QIntValidator, which occurred because
locale.toInt() was missing a parameter for base value and this
led it to presume wrongly that a base 8 is in use.

Task-number: QTBUG-21602

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit ee3f763f3642d1a098e6293fbc586b34a3e6e8be)
Change-Id: Iee3f763f3642d1a098e6293fbc586b34a3e6e8be
2011-11-14 10:34:41 +01:00
Markku Heikkila
d7695e82ac Fixed wrong QGroupBox check state
Handle mouserelease only if mouse is pressed in QGroupBox.

Task-number: QTBUG-19170

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit df819cfe17f6dfd089096063524932fc4975804f)
Change-Id: Idf819cfe17f6dfd089096063524932fc4975804f
2011-11-14 10:34:24 +01:00
Stephen Kelly
999196e336 Add API to clear the current index. Symmetric with clearing selection.
Change-Id: I08070f4fdf26898d5b6edd5259f011f9b3c75512
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-11 12:24:48 +01:00
Stephen Kelly
0b293e4afc Make this API virtual to make selection proxying possible.
Change-Id: Ie93c8b38c59d347026a68eae03687d9017b3d048
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-11 12:24:48 +01:00
Tero Ahola
1505508742 Repaint QProgressBar when minimum or maximum changed
The implementation of QProgressBar::setMinimum and setMaximum did not
repaint the widget. This caused the widget to be shown incorrectly in
case you call setMinimum or setMaximum but not setValue.

Task-number: QTBUG-22121
(cherry picked from commit b1998f4f59c3b10700963b2d13a17a0cc77ef665)

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>

Change-Id: I331d37ab4451d9e096cdf91a9e0a0286bc3cdffb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-11 10:58:10 +01:00
Pekka Vuorela
dc2a1aff9b QWidget text editors to commit text on their own on losing focus
Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:38 +01:00
Pekka Vuorela
1dbfbf4c66 Implement partial tentativeCommit support in QTextEdit
Available on plain text for now, html support still pending.

Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-10 13:07:20 +01:00
Jo Asplin
582bb9e467 Re-enabled passing tests in tst_qabstractprintdialog
To increase the effective test coverage, this patch
re-enables the tst_qabstractprintdialog test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ic09a03ed405bf6f85917410a7a86e17f2fe22cba
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-10 09:32:30 +01:00
Jo Asplin
dad925a1ce Re-enabled tst_qdialog
Commit 0fd8514a57 ensured that
the showAsTool test function is now properly QSKIP'ed for
platforms where it is always known to fail.

This change re-enables the test case as a whole so that
the passing test function may actually catch real Qt bugs again
(without being ignored by CI).

Task-number: QTBUG-22453
Change-Id: Icfe56558f8c0f4b50dbbc21d9748df6d81fea4fe
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-08 09:22:00 +01:00
Jo Asplin
e0dfa4547e Re-enabled passing tests in tst_qmenu
To increase the effective test coverage, this patch
re-enables the tst_qmenu test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I62cc1a2a9b0206595808deafb5fc137888ec97b3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-07 13:26:41 +01:00
Jo Asplin
50890c0da8 Re-enabled passing tests in tst_qinputcontext
To increase the effective test coverage, this patch
re-enables the tst_qinputcontext test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ib1d4946ab29e67e0e72f4f9c6a7bf39b65d0f6be
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-07 09:28:33 +01:00
Pekka Vuorela
8bd40fef07 Support tentative commit string with input method.
Tentative commit string allows input method to notify editor
what is expected to be committed in the place of preedit.
This commit adds such support in QLineEdit.

Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-05 23:47:02 +01:00
Laszlo Agocs
0008428f90 Prevent timestamps in widgets' touch events from disappearing
Change-Id: I096914eb2b02ad9c4a5c0462a1f4b76ef17c3957
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-04 20:48:19 +01:00
Sergio Ahumada
780a03191f test: Use QWidget::grab() instead of QPixmap::grabWidget()
Removing warnings from the test function as QPixmap::grabWidget()
is being deprecated.

Change-Id: I26ad1e9def0bebe8e4ee997068ba593245d0cd05
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-04 12:37:27 +01:00
Jo Asplin
24971fbef0 Re-enabled passing tests in tst_qlistview
To increase the effective test coverage, this patch
re-enables the tst_qlistview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I029be60c16cdff5ee3e38889d2780f1ee7d01b51
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-04 01:53:55 +01:00
Sergio Ahumada
d2f1c6cd75 test: Skipping tst_qmdisubwindow::setFont() as it's unstable
This unstable test is preventing some good changes from being
merged. Further investigation needs to follow, so people can
refer to QTBUG-22544 for a real fix.

Change-Id: I038e5f340ccd2562d0e67428af595a2bcfc8c11d
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-11-03 20:07:04 +01:00
Jason McDonald
f79dc01304 Remove empty functions from QDirModel test.
Change-Id: Ieb8af41425739f9175df26224b171cd9f8b3c4f3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:54 +01:00
Jason McDonald
edc77f5aa8 Improve QDirModel autotest
The unreadable() test function has been disabled since before the tests
were imported into the Qt repository.  The idea of the test seems valid
(though the original implementation failed to correctly create an
unreadable file), so it should be re-enabled.

Change-Id: I94634bc5785dfbfbb42ca975badaead7fe812b29
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:43 +01:00
Jo Asplin
938ce35cec Re-enabled passing tests in tst_qgraphicsitem
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsitem test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: If311bc61801d2a279c274928ae7f0faeb595eeb3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:42 +01:00
Jo Asplin
718f58487d Re-enabled passing tests in tst_qgraphicsview
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I6b8eb09000ece789b990a2dd697cdb8b47cc8e1c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:38 +01:00
Jo Asplin
b92fed185e Re-enabled passing tests in tst_qgraphicsscene
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsscene test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Idd229532787ce8138d8e1c86daf1f91b90e87e38
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:34 +01:00
Jason McDonald
e9b5cd0266 Reinstate disabled part of qsortfilterproxymodel test
This test function has been disabled since before the tests were
imported into the Qt repository in 2006, but seems to pass today, at
least on Linux.

Change-Id: I8ff90a11a0fbb260d66b20ae735b5f21c450a5af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:34 +01:00
Jason McDonald
5eb0a7be74 Remove stale test data from qsortfilterproxymodel test
The removed test data has been disabled since before the tests were
added to the Qt repository in June 2006, and was incomplete (the
"pattern" field was missing).

Change-Id: I974d03a4dcca76ba1a20f740372702612c8ce02b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:27 +01:00
Jason McDonald
82a4516c5d Remove disabled code from QWidget autotest.
The removed code was already disabled when first committed in January
2009.

Change-Id: I00a82f2e673fee76869cc76d756c36d081da2d2a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:20 +01:00
Jason McDonald
647e59fdb1 Remove disabled code from qgridlayout autotest
The removed code was already disabled when it was first added in June
2006, and is based on assumptions that no longer hold true.

Change-Id: Id7941d46e2a993aac422554dcc5540eb64eac492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:55 +01:00
Jason McDonald
98992786f3 Remove redundant code from qsortfilterproxymodel test
Remove a couple of "#if 1" directives (but not their contents), which
have been present since before the tests were imported into the Qt
repository in 2006.

Change-Id: Id43aff37843e7a44ed96973f809de3838ba0e5b9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:50 +01:00
Jason McDonald
238bdc2e91 Improve QWidget autotest.
Remove some "#if 1" directives and a line of debug code.

Change-Id: Ib34f5b65470a24ee499799525ffe0645ccc117fe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:16 +01:00
Jason McDonald
6fce33dd4c Remove debugging code from qgraphicsitem autotest.
Change-Id: Ia2ff65b5e980b42c5c64b957143860e94395d54f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:21:00 +01:00
Jason McDonald
2c665596ae Remove disabled code in QItemView test.
The removed code was disabled in January 2007.  The commit history does
not make clear what the code was supposed to achieve and the code
doesn't do what the comment at the top says (that looks like a TODO).
Best to delete it and start again.

Change-Id: I42b6b1d865c96518d74dc189a4a41d0d2776e5bc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Friedemann Kleint
735457a40b Remove remains of qpa in tests.
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>

Change-Id: I41aed5290df5aebeb30ebf5d2796aca6c65980d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-01 16:15:08 +01:00
Jo Asplin
6264bf242a Re-enabled passing tests in tst_qgraphicswidget
To increase the effective test coverage, this patch
re-enables the tst_qgraphicswidget test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ic484fde3492f077453f47a959dd6dc862288dcaf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-01 13:15:44 +01:00
Jason McDonald
d304b3a5bb Remove debug code from qsortfilterproxymodel test
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: I80691b274d9d2abda72bca894ace9de545410ed8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:57 +01:00
Jason McDonald
ceb4dd4b54 Improve QWidget autotest
There are two cases where a QCOMPARE may fail on some platforms. Rather
than disabling the QCOMPAREs with "#if 0", use QEXPECT_FAIL so that we
can look in the CI logs to see which platforms fail.

Change-Id: Ife93c8032e01a04e8068bf213e2040778c12f711
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:51 +01:00
Jason McDonald
3e05a987b1 Remove debug code from QLayout autotest.
Any test diagnostics that are useful should be part of the regular test
output, as the CI system cannot switch on commented-out code when there
is a test failure.

Change-Id: Id4efb74a2d3646f3554b643762beefba113c3602
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-01 04:58:44 +01:00