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>
When the sections has been resized we need to calculate new values
for the section start-positions. Otherwise we break visualIndexAt
and sectionPosition.
This fixes a regression introduced in
b800d8b94a
Change-Id: I148dbf44f742208787ed59b70d82b8048d721e90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QAIM::createIndex() took either int or quint32, but QMI::internalId()
returned qint64.
In the new interface, createIndex() takes, and internalId() provides,
integers of type quintptr.
This matches the storage size of the void* in the model index and
avoids truncation.
Remove the
createIndex(int, int, quint32) and
\obsolete createIndex(int,int,int)
overloads.
This makes a literal 0 in the third parameter ambiguous now.
The solutions have been noted in changes-5.0.0.
Change-Id: I0a0ecd8430eaf695129a4d09d14d4e30745485c4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>