Commit Graph

106 Commits

Author SHA1 Message Date
Thorbjørn Lund Martsum
8d4544f00d QHeaderView: - avoid cursor move on setDefaultSectionSize
If we are reacting on the sectionResized signal and we call
setDefaultSectionSize we should ensure that we are not moving
the mouse-cursor.

This is an improvement of f8f6acb05c

Change-Id: I1adee7821bc8fcc9633f692bfd515f2c458b12c8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-25 08:29:39 +01:00
Thorbjørn Lund Martsum
2e78d7ac30 QHeaderView - Fix auto-scroll on manual move on sections
This patch fixes the manual move of sections when auto scroll is on.
It is done in QAbstractItemView::doAutoScroll by letting the
qheaderView use its parents scrollbars if they are childs of a
QTableView or QTreeView.

Task-number: QTBUG-993
Task-number: QTBUG-1103

Change-Id: I70d999d9a07c3566e42d01cc5ebb47a69a83d9d4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-23 17:04:00 +01:00
Friedemann Kleint
1b8dcec81a Make widgetgrab manual test compile with 4.8 and 5.
Task-number: QTBUG-27333
Task-number: QTBUG-27550

Change-Id: Iceb2ded9deff1d375bf02b88e214da20901bfa0e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-11-23 17:04:00 +01:00
Friedemann Kleint
2d07d3b4e3 Add a QEnterEvent containing the mouse position.
Enter handling requires knowledge of the mouse
position. Extend the enter handling of
QWindowSystemInterface to receive the position
(implemented for Windows, XCB and Mac), passing it
on to QEnterEvent. Dispatch QEnterEvent from
widgets code.

Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-10 20:08:28 +01:00
aavit
f4a8e940ed Qt5 updates to the QPainter lancelot autotest
a) Use the new Qt5 OpenGL API for testing of GL painting
b) Simplify: Use the higher-level QBaselineTest API instead
of the low-level baselineprotocol API.

Change-Id: Ib5f47f6fe68837dfdc8dc3a74638c5cb0b724614
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2012-11-09 16:07:44 +01:00
Friedemann Kleint
f09d434987 Extend widget grab test.
- Add enter/leave logging.
- Add button to enforce native widgets.
- Make mouse event logging more verbose.

Task-number: QTBUG-27800

Change-Id: I23160244bef6cb0b8d505cbf118cf12d91621fe7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-07 12:19:14 +01:00
Thorbjørn Lund Martsum
e0fc088c0c Qt 5.0 QTreeView. Prevent manual moving of the first section
This prevents the user of moving the leftmost column.

There will be no API to allow move of the tree-structure.
It is very weird to do that, so it shouldn't be a problem.

In case it is a big problem somewhere it can be hacked with:
QTableView unused;
unused.setVerticalHeader(tree->header());
tree->header()->setParent(tree);
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));

Task-number: QTBUG-332

Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-02 19:49:22 +01:00
Friedemann Kleint
a5e95ce39e Add manual test for dialogs.
Implemented for QFileDialog, currently.

Task-number: QTBUG-27621
Change-Id: I0c9b7628aa92e3fbca6f737448a7c469893764f1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-10-31 21:52:30 +01:00
Andy Shaw
356f3c89b8 Fix syncing of visibility and enabled for menus on Cocoa
Fixed menu handling on Cocoa so if a menu is enabled/disabled or made
visible or not then it will keep this in sync with the appropriate
native menu entry.

Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f
Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-10-26 14:53:09 +02:00
Marc Mutz
a4ffbfefe7 normalise signal/slot signatures [QtNetwork tests]
Change-Id: I2491cfe421a811d00759224da03580b3dcc2a091
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-10-19 00:44:54 +02:00
Marc Mutz
bb73c085a6 normalise signal/slot signatures [QtWidgets tests]
Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-19 00:44:54 +02:00
Tero Ahola
8b6de46771 Modified vertical alignments of simple widgets on OSX
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>
2012-10-18 21:45:46 +02:00
Shawn Rutledge
78f946f6dc QScreen manual test improvements: fields resize, better formatting
It's necessary to set the fieldGrowthPolicy on the QFormLayout in order
to have expanding fields on the Mac.  Geometry formatting with
negative x and y values looks better.  Display fewer
decimal digits for double fields.

Change-Id: Icb252c0c3fb7b605253e04c3361beba124570840
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-16 17:31:31 +02:00
Andy Shaw
8b7b6b6969 Add a manual test for QMacCocoaViewContainer
Added a test for QMacCocoaViewContainer which will enable the testing
of the fixes coming

Change-Id: I73e9540bc58411634f0da7d398eca4b7ffafba8e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-09-24 21:27:51 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
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>
2012-09-22 19:20:11 +02:00
Shawn Rutledge
f4c1ae6726 Added manual test for QScreen properties
Shows property values in fields which auto-update when the properties
change.

Change-Id: Ib97566a74cb8d0fff5f85bf97783e89dfb07481f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-21 22:03:53 +02:00
Kevin Funk
e78e7d325b Fix build of tests/ on Windows CE
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>
2012-09-10 14:09:45 +02:00
Friedemann Kleint
59774b5d64 Add example to test widget grab.
Compiles against Qt 4.8 and Qt 5.

Change-Id: Ic246aeb38171361a8338f38f9b92e5cf3b54b368
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-09-07 12:01:56 +02:00
Andy Shaw
49c251e054 Ensure child items are updated even if the parent item has no content
When a parent item had its visiblity toggled, then the child item would
not update if the parent item had ItemHasNoContents and
ItemClipsChildrenToShape set. This is a common use case in declarative as
the root item has ItemHasNoContents set.

Task-number: QTBUG-26846

Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-29 16:53:00 +02:00
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
Andreas Holzammer
a0be8ef271 Add command line options to windowgeometry test
Add -widgetminimized, -widgetmaximized, -widgetfullscreen,
-windowminimized, -windowmaximized, -windowfullscreen
as command line option to test creation of windows in
these modes

Change-Id: If192c131c8996d3b67648427e5784da47ffee971
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-01 00:14:41 +02:00
Marc Mutz
79b742b7e0 QtNetwork: use nullary version of qRegisterMetaType<T>("T")
Using the nullary version has the advantage that multiple calls
during a program run are much more efficient, since an inlined
atomic is used to store the result. It also ensures that
Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T")
will happily register anything. So I've added the macro where it
was missing, or moved it to a central place when it existed
hidden.

In tst_qnetworkreply, this became a bit tricky, because a private
header is conditionally included, so moved the Q_DECLARE_METATYPE()
into a conditional section, too.

Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-25 19:32:41 +02:00
Friedemann Kleint
8683ee14cc Track window state in manual test windowflags.
Change-Id: Ief6cd4b29ddcc946e1ccac75b352da80bbf647d0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-18 15:37:48 +02:00
Friedemann Kleint
09d3ebbf2a Improve windowflags, windowgeometry manual tests.
- Make them compile with 4.8 for comparison
- Add Active to WindowStates control
- Add -layout option to windowgeometry

Change-Id: I052330eb8689883c104a0552708ea700c7cd790a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2012-07-11 16:58:53 +02:00
Sergio Ahumada
59339941e0 Fix some spelling errors
Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-07-11 14:52:37 +02:00
Thorbjørn Lund Martsum
f8f6acb05c QHeaderView - resizeSection improvement
This patch improves the manual resizeSection a bit. Before we didn't
consider that the program could maybe resize other sections when the
user was resizing one section.

The main issue with that is that setOffset is so smart that it helps
moving the mouse cursor - however it really shouldn't do if the
program is trying to change something too.

Maybe this won't solve all (possible) problems at once - but it is
a fixed needed just to make something work - trying to make anything
work without this fix is horrible....

Change-Id: I3cefa375a9b8ee4c1ef1e08ba0900025c671e4c6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-05 13:13:58 +02:00
Shane Kearns
a32d6834ad qget test - fix null pointer dereference
If the server sends a redirect with no body, the file is null

Change-Id: I49fd1d8a4cdd404497ebef4c7f3b478960776896
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Oswald Buddenhagen
07581a87f8 remove some qmake -project boilerplate from project files
Change-Id: I5e6103db42b4fcca4ed4c2ffaec71e71e73d5b95
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:52 +02:00
Friedemann Kleint
23994a364e Add Qt::WindowTransparentForInput to Window flags manual test.
Change-Id: If27567a93d5a2e910289c680643503d02831d742
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-08 08:02:46 +02:00
James Turner
b8246f08e4 Cocoa implementation of QPA menu interface.
Implement the QPA platform menu interface for Cocoa,
including native menubar support and merging with the
predefined menus created from the bundled .nib. Cleanup
code previously used to maintain the menus, and add
a manual test of the menus code.

Change-Id: Ia99267ddb6485e18e05c540eb32c5aee6cbb85db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-05-19 10:18:21 +02:00
Shane Kearns
32adb82741 Enable specifying raw headers for the request
Use "--headers=file" where the file contains the raw headers to send.
This is useful for replaying requests from log files.

Change-Id: I3bbe582d96fc9797f692a0d5772e8164f8265ce0
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2012-05-05 03:50:41 +02:00
Friedemann Kleint
c4f4be9bd1 Windowmodality-test: Compile with Qt 4.8.
Make it possible to shadow-build using Qt 4.8  for comparison.

Change-Id: I1a18b7f1d03b11f0420aab14455e2c53d1afd6ba
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-05-04 15:24:52 +02:00
Thiago Macieira
dd5b373d41 Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtNetwork]
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: I94cc301ea75cc689bcb6e2d417120cf14e36808d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-05-04 12:46:05 +02:00
Debao Zhang
ade8888603 Don't use obsolete qVariantValue, qVariantCanConvert, etc.
qVariantValue and qVariantCanConvert are Compatibility members, while in
Qt4.8 they are marked as Qt 3 Support Members.

qVariantFromValue and qVariantSetValue are Obsolete members.

Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-02 08:30:59 +02:00
Thiago Macieira
ac7afd5ea7 Convert these files to ASCII or UTF-8
Remove all non-UTF-8 sequences from source code in Qt.

Change-Id: I46d9cb23ef2199894896f171d553b3144822f36c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-27 22:52:01 +02:00
Holger Hans Peter Freyther
066da57a12 lance: Document all available command line options.
Change-Id: I0e0d95cb5988574c1ecfbe7423ac7388022101fb
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-04-25 19:53:22 +02:00
Friedemann Kleint
41ea15f83d Fix windowgeometry test for Windows.
- Specify main.cpp with full path to avoid obscure link
  errors (grabbing main.cpp from windowflags)
- Set proper flags on the test window.

Change-Id: I9bbaf9cb5c7e210f53a51b58bd48a827d6104fe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-24 10:44:29 +02:00
Stephen Kelly
61c433785e Move the CMake unit tests to auto/
This will allow the CI system to run the tests. The tests are only
run if cmake is found.

Change-Id: Ie73a56114c151871160bafcbf0b90b2d54620855
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-04-23 17:03:56 +02:00
Stephen Kelly
460bf5f051 Build the tests with the build type that the top-level was invoked with.
Change-Id: I87918276987b3a506c2ac8556940fce89a2d20cd
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-20 22:23:23 +02:00
Stephen Kelly
57482b930f Make sure -fPIE is added to the compile flags.
Change-Id: I279881693b6eba15a2e145742b3281c9425e9b2e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-20 19:59:43 +02:00
Stephen Kelly
2dff7ad9e8 Only run the CMake DBus unit tests on UNIX systems.
Change-Id: I0c5b511229a7ac0c2aa23a9c3d2053077e94936c
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-20 19:59:34 +02:00
Friedemann Kleint
9b7739899e Window geometry manual tests: Add Window state controls.
- Factor out controls from the window flags test, split state
  into Qt::WindowState (QWindow) and Qt::WindowStates(Qt::Widget).
- Add to geometry test.

Change-Id: I25b9a8696bfb7f4faef113ac82559ebb90a140c5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-20 16:21:17 +02:00
Morten Johan Sorvig
128b7c56b7 Implement QCocoaWindow::setWindowState.
Add window state change notification logic. Send
and expose event in addition to window state change
on window restore since the QWidget logic expects
this.

Modify QCocoaWindow::setVisible to sync up window
state that may have been set on the hidden window.

Refactor NSWindow event observing to use one observer
function for all notifications.

Add window state testing to tests/manual/windowflags
Add delay after showFullScreen in tst_qstatusbar to
wait for the Lion fullscreen transition.

Change-Id: I57c523cedd0644d4181b40d72046fad4fdb09a9c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 10:29:14 +02:00
Morten Johan Sorvig
872f567d53 Set the window title for the QWindow as well.
Change-Id: I2ff20307974c4b6a2a4fb09d09941d0a0dd09d0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-04-20 10:29:14 +02:00
Friedemann Kleint
93b34badfe Add a manual test for the window geometry.
Test positioning QWindow and QWidget (frame / normal geometry)
for testing QPA plugins.
The test can be built with  Qt 4 for comparison.

Change-Id: I695bf28d5fdf738262d322518d01ad04aa5056f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-04-19 19:46:07 +02:00
Stephen Kelly
c12057df29 Fix a CMake unit test.
This has been broken since modules do not currently find
their (public) dependencies.

Change-Id: I0c9e7c46f7a6499993c98aa6d33996bdd3a1be5f
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 19:53:34 +02:00
Stephen Kelly
d5bd336dba Build the first CMake test if *at least* version 2.8.7 is available.
Change-Id: I061130e5b937ad818cc9016ae62d5890092d60f2
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-18 19:53:34 +02:00
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Friedemann Kleint
cdc221ae00 Fix warnings in manual tests.
- Constructor order.
- Unused variables.
- size_t -> int conversions.

Change-Id: Ic5b016f41d01a4d8153ae0900b607bf946523c1d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-04-13 18:15:26 +02:00
Friedemann Kleint
28675642f3 Build manual tests.
Add a toplevel manual.pro and other .pro-files to build them and
fix the build.

Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-04-12 14:50:39 +02:00