Commit Graph

23 Commits

Author SHA1 Message Date
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
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>
2012-08-01 15:37:46 +02:00
Friedemann Kleint
58ab483cdb Stabilize the QHeaderView test.
The test has a member QWidget *topLevel which it recreates
and shows in init() without waiting for it to be exposed
although it is not used in every test case. This apparently
interferes with some tests that create separate top levels.
Do not show in init(), delete the topLevel.
Add wait to the cases where the topLevel is shown.

Change-Id: Ib428020b36dc82991d41e68478fd583bdfb004c7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-31 11:57:21 +02:00
Friedemann Kleint
aaaf60aeab Remove usage of deprecated qWaitForWindowShown(QWidget *) method.
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>
2012-07-25 17:32:21 +02:00
Thorbjørn Lund Martsum
5dc9036e18 QHeaderView - adding an auto test with saveState and restoreState
This test is nice to have regardless though the main reason for it
is a refactor of hiddenSections in QHeaderView.

Change-Id: Id41a1d5edda2ef75bf432a78cdb3e952303eae92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-05 13:13:58 +02:00
Thorbjørn Lund Martsum
524c3e05e8 QHeaderView - prevent negative default+minimum section sizes
In 96f1fe8855 we agreed that sections
with negative sizes did not make sense. Of the same reason default
section sizes and minimum section sizes should be not negative.

Change-Id: I6a770e7f510d8e2bb90bfd8f38b4fa0566fc137b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-04 18:00:41 +02:00
Stephen Kelly
8ec1594e63 Rename setResizeMode to setSectionResizeMode.
The overload of this method was renamed
in b64426248d but this one was not.

Change-Id: I60a6ddf0fcf9deea31ccf51e7b0db16c66023356
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2012-05-07 17:55:47 +02:00
Thiago Macieira
1eac22a1b9 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtWidgets]
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: Ie8ac500f2f8ebe99b7525feaa7b39247e641a461
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-05-03 06:10:20 +02:00
Thorbjørn Lund Martsum
699f2424eb QHeaderView - rename many spans classes and variables
In (SHA) b800d8b94a the span model
was replaced with a plain section model. The code however still has
variables and classes called someting with spans which would be
confusing for possible new readers of the code.

This patch cleans up most of it. It only renames classes,functions
and variables (and not any semantics or the public API).

Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-11 01:42:12 +02:00
Thorbjørn Lund Martsum
fcc01e6c37 QHeaderView - minor fix to setDefaultSectionSize
This fixes a situation where we (wrongly) assume that
a section with size 0 is hidden. However a hidden
section should be one that we have called hideSection
(or setSectionHidden) on.

Change-Id: Ic14eded2666022f27434dc55927323a74910549c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-20 11:44:09 +01:00
Thorbjørn Lund Martsum
b64426248d QHeaderView - renaming functions in Qt5
This patch renames the functions in Qt5 according to the
notes. It also renames resizeMode to be consistent.

The old functions are both marked with both QT_DEPRECATED
and '### Qt 6 - remove'

All usage of the function within the qtbase are also
changed to use the new functions.

Change-Id: I9e05fa41d232e9ca43b945fcc949987017f3aedd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-14 11:37:18 +01:00
Thorbjørn Lund Martsum
12c2a3d852 QHeaderView - fix setOffsetToSectionPosition a bit
It might be silly to have sections with size 0 without using hideSection.
Nevertheless we should still use the principle of least surprise.

It does not make sense that hiding a row 'far' away should affect
the semantics of setOffsetToSectionPosition on lower indexes.

Change-Id: Iaf847eba2ea4d28fc7bcfe3a27d62f432f6f61e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-24 14:55:06 +01:00
Jason McDonald
1acc490248 Eliminate duplicate data row names in widgets autotests.
Change-Id: I82bab3cc39320014fac6732c7b60233b262cb30d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-15 02:36:47 +01:00
Thorbjørn Lund Martsum
73a5bc2aac QHeaderView - minor bug in visualIndexAt
This fixes a minor bug in VisualIndex triggered when calling
resizeSection with size 0 (but not hideSection).

It is mostly cosmetics - however hopefully there will soon
be a minor refactoring and there is really no need to make
strange code to keep a semantic bug.

However it is also doubtful to make a semantic change
while refactoring.

Change-Id: Ide153e421fd7a634062cb74867f4a49da4bf9cd6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-10 00:27:44 +01:00
Thorbjørn Lund Martsum
f0a8a4293a Extending the auto test for QHeaderView
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>
2012-02-01 16:26:11 +01:00
Thorbjørn Lund Martsum
96f1fe8855 QHeaderView - preventing negative section sizes.
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>
2012-02-01 02:16:08 +01:00
Thorbjørn Lund Martsum
125016ad24 QHeaderView - length returns wrong value fix
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>
2012-01-30 06:29:42 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
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>
2012-01-30 03:54:59 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +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
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
Rohan McGovern
6b29e881cd widgets: eliminated usage of qttest_p4.prf
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>
2011-10-25 08:42:23 +02:00
Jo Asplin
9f1aa866bd Moved tests into integrationtests/ and widgets/
Task-number: QTBUG-19013

Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-10-20 19:45:41 +02:00