This provides a stronger mechanism e.g when inheriting QItemDelegate.
It makes some things much easier e.g avoid delete of an editor
and maybe only delete depending on what the editor says itself.
This introduces a new virtual function.
Task-number: QTBUG-2299
Change-Id: I8410f8199775987dbacffd99e4c354fdadcdd21f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This is a test that verifies correct behaviour of qheaderview.
It includes test of swapSections, moveSection, rowcount-change,
resizeSection, hideSection and position lookup.
Change-Id: Idc1fe8167f2d95dee5c5b1161cb633cbf9495d17
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patch removes the posibility to call resizeSection
with negative sizes.
Sections with negative sizes affect the other sections,
and it does not seem to have a useful, well-defined semantic.
The length can also become negative - and visualIndexAt
work strange.
Change-Id: I632beb160649fa10e2106314557b8c5a106aa3cf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This allows QStandardItemModel to be usable in QML without requiring
clients to subclass it.
Task-number: QTBUG-15067
Change-Id: I867fcd8137132affdf21f37a9fa293e855a09a13
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
setSectionHidden called with (logindex, true) will
sometimes prevent a (correct) call to
resizeSection(logicalIndex, 0).
This seems a bit odd - however it does execute
d->doDelayedResizeSections().
Therefore the section is going to be hidden later.
However it is a problem that the length meanwhile is wrong.
(That is a value that is not the sum of the sections)
This is fixed by execute updates before returning the
length.
Task-number: QTBUG-14242
Change-Id: Ia1d2f6db3213792b250a6a37942b56554261cd3a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.
Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tst_qwidget.cpp will not build/link without tst_qwidget_mac_helpers.mm,
so re-add it to the build as well.
Change-Id: I55130f62c215c4b82683d90456e31fdb09f833a8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
EditKeyPressed 4 test data fails, all other test data for the function
pass.
Task-number: QTBUG-23696
Change-Id: Ied56bd0b653ad4dcc2b6451b486aae7cad134211
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Both test data fail.
Task-number: QTBUG-23697
Change-Id: Iee4b08a88db33c72c584e326e928863af61c8dd4
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Crash was introduced by d639105759491 (pre-Qt-4.8 only)
Task-number: QTBUG-15834
Merge-request: MR-2725
(cherry picked from qt4 commit fd25323de7b5d5f3e0ffb1bd81ea4d251e071566)
Change-Id: I59959d3ba4c9bcb0d39bdbe58432817bbbfdd9f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QAbstractItemViewPrivate::renderToPixmap was not setting all the flags
that the normal QTreeView painting sets:
option.showDecorationSelected, option.viewItemPosition (so the drag pixmap
looked wrong on Windows 7, with rects around each cell), and then the
unittest also discovered that State_Children/State_Sibling wasn't set either.
Task-number: QTBUG-15834
Merge-request: 2517
(cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b)
Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
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>
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>
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>
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>
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:
924d810dbd8aaff67510338d3f1197a55034062b253497b7447cfad460c59d2ff58f360cf6baa2d6
Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Fix typos I was able to find in `tests/auto' directory.
Change-Id: Id0bfcc18301381ac8b1ca8d5af17bd926e5913d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.
Change-Id: I3c1d993d5682db913aadc267d98a638061f393d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
The previous commit removed SkipMode from the testlib APi. This commit
removes the parameter from all calls to QSKIP.
Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>