Commit Graph

137 Commits

Author SHA1 Message Date
J-P Nurmi
ee317360e3 QColorDialog manual test: add initial color selection
Change-Id: I956404af728ef0d70977f6c69b1059b3656edd91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-07 01:22:40 +01:00
J-P Nurmi
0de3ea6554 Dialog testing tool: add missing enableDeleteModalDialogButton() calls
Change-Id: I012dc8c7c07fced69f8b7eda7a1686af1e11033f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-07 01:22:40 +01:00
J-P Nurmi
5809471ac7 Manual test for QFontDialog
Change-Id: I2bcdd30990e88af45c8d4b2756fcdd48fc2a47d7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-05 14:42:50 +01:00
J-P Nurmi
b7eaf2efdf Manual test for QColorDialog
Change-Id: I4eab3ecfbe5b6e7d663fe92d49af173fd179ba6e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-30 10:47:05 +01:00
Frederik Gladhorn
d0c360fd88 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-24 18:34:11 +01:00
Friedemann Kleint
9c6a91d07b Manual file dialog test: Add showModal().
Modal dialogs can now tested by just showing or running exec().
Remove connection of accept() from applySettings().

Change-Id: I5e3c0e6405ce5682f39d10a9c06b9d61be10ed3f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-24 16:28:16 +01:00
Frederik Gladhorn
627d9cbd3c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
2013-01-24 16:02:55 +01:00
Peter Hartmann
ce35c0db0d QSslConfiguration: toggle on demand loading of root certs properly
make sure we keep track of when we can load root certs and when we
cannot (we cannot when the developer set the certs explicitly). This is
implemented the same way for QSslSocket already, and needs to be
duplicated because we have 2 methods for setting CA certificates: one in
QSslSocket and one in QSslConfiguration.
In addition, adapt the auto test which checks whether setting a default
QSslConfiguration works: There is no way to set on demand loading
through the API, so it should be enabled by default.

Task-number: QTBUG-29103
Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-23 19:36:07 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/corelib/io/qsavefile_p.h
	src/corelib/tools/qregularexpression.cpp
	src/gui/util/qvalidator.cpp
	src/gui/util/qvalidator.h

Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
2013-01-22 18:40:13 +01:00
Tor Arne Vestbø
f5c6a5d06b Don't build lance as application bundle on Mac OS
Change-Id: I23732b4ec0dc45d9d3a2cc5f21dad2cb33af5830
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-22 14:56:47 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Friedemann Kleint
34572dadc6 Dialog testing tool: Control life cycle of non-modal file dialogs.
Keep the non-modal file dialog around and delete only on request,
such that one can simulate repeated invocations of show() on
the same dialog for testing native dialogs.

Change-Id: I80d0f1dfafbc02a31be192098121654a01025174
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-01-16 17:06:12 +01:00
Frederik Gladhorn
cdf13ce286 Merge branch 'stable' into dev
Conflicts:
	tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp

Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
2013-01-07 15:18:16 +01:00
Stephen Kelly
cf22e8ea4e Tests: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ifd116dee32a450ff89a9a1011e26b434765d6e95
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-06 11:23:45 +01:00
Frederik Gladhorn
ca2f44680c Merge branch 'stable' into dev
Conflicts:
	examples/widgets/painting/shared/shared.pri
	src/corelib/tools/qharfbuzz_p.h
	src/corelib/tools/qunicodetools.cpp
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/qwindowsfontdatabase.cpp

Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
2013-01-04 11:12:05 +01:00
Thorbjørn Lund Martsum
28a21d98ef QAbstractItemView - allow deselect in single selection mode.
This patch allows single selection to be cleared with the normal
control modifier. This affects e.g QTreeView and QListView.

Task-number: QTBUG-8836
Change-Id: I7fd50b987acc3552b36657409568192763257536
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-02 16:09:14 +01:00
Oswald Buddenhagen
586adeabe4 add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 19:05:02 +01:00
Sergio Ahumada
7706c31eaa Fix some typos
Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2012-12-21 19:05:02 +01:00
Friedemann Kleint
04a5a74685 Add a manual test for QFile.
Add a command line program allowing to test rename, copy, etc.

Task-number: QTBUG-28246

Change-Id: Ie9667f03b65a874475700ec9ecd91ca2ed32ed97
Reviewed-by: David Faure (KDE) <faure@kde.org>
2012-12-21 15:08:35 +01:00
Oswald Buddenhagen
2ac3f92296 clean up example project files, mostly wrt QT+=widgets
move QT+=widgets (and printsupport) statements before the install
statements, and de-duplicate some cases.
also move some TARGET assignments to a more conventional place.

Change-Id: I6140d8611680f66c24490e5894e4eb90cae95635
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-17 14:08:17 +01:00
Oswald Buddenhagen
599a58170d remove obsolete DEPENDPATH assignments
qmake now add CONFIG+=depend_includepath by default, making manual
DEPENDPATH setup unnecessary.

Change-Id: Ie57cf05c369e21b5b9e099b6ce9be4f75da1508f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-17 14:08:17 +01:00
Morten Johan Sørvig
8fa464ffa6 Compile.
Update painting code with retina support.

Change-Id: Iebdfaaaaf98ed69f4ecb3cef5ca96b4e4ddb09dd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-12-17 11:57:02 +01:00
Thorbjørn Lund Martsum
9cf56b3e09 QGraphicsView - fix rubberband to expand on wheel event
In SHA 51914375b6 the rubberband
selection was fixed, so it followed the scene-point on mousemove.

However wheelEvent could move the view - but avoid update of the
rubberband (that would not be updated until next mouse-move).

This patch fixes that (and generally improves rubberband behavior)
since QGraphicsViewPrivate::mouseMoveEventHandler is called by
replayLastMouseEvent, which is called from various places,
where we need to update the rubberband (e.g scrollContentsBy).

Change-Id: I1b78c27edaaecea797a2319086d7a11d437d2bd3
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-12-11 13:37:57 +01:00
Marc Mutz
98b77f9faa QMetaType: remember whether a type was registered with Q_DECLARE_METATYPE
There are two ways to register a type: using Q_DECLARE_METATYPE(T) and
using qRegisterMetaType<T>("T"). Doing one thing in one translation
unit and another thing in another TU constitutes an ODR violation,
because the value of QMetaTypeId<T>::Defined will differ in the two
TUs.

By adding the information whether a type was declared with
Q_DECLARE_METATYPE to the typeFlags(), such a use will trigger
the existing binary-incompatibility failure that checks for
equality of the incoming type flags with the stored ones (if any).

I had to encode the type as a defaulted function argument in order
to avoid the linker merging instantiations of the function templates
and therefore rendering the detection moot.

Change-Id: I82017caf300458b411cc8ac2f6653536fac64117
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-11 11:12:08 +01:00
Sergio Ahumada
8c2a51b586 test: Remove CONFIG += testcase from manual tests
Manual tests are not supposed to be run by "make check"

Change-Id: I0539b94f5286e89ddad2edf487d4b0d82fc2f374
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
2012-12-11 10:37:59 +01:00
Friedemann Kleint
1b908e13e6 Compile windowflags/windowgeometry manual tests against 4.8.
Change-Id: I3611fe752168729f3605e0f451d487ca3e10d09d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-12-03 12:00:18 +01:00
Sergio Ahumada
0df026de86 Stop using the name "Trolltech" in QSettings
Also change Trolltech for QtProject in other places

Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-03 03:47:08 +01:00
Morten Johan Sørvig
5e61bbe586 Basic high-dpi "retina" support for Qt 5.
Bring Qt 5 on par with Qt 4, prepare for more comprehensive
support later on.

Introduce device independent pixels (dips), device pixels,
and devicePixelRatio. Add high-dpi support to QPainter,
QGLWidget, the cocoa platform plugin, mac and fusion styles.

Dips are similar to CSS pixels, Apple points and
Android density-independent pixels. Device pixels
are pixels in the backing store/physical pixels on screen.
devicePixelRatio is the ratio between them, which is
1.0 on standard displays and 2.0 on "retina" displays.

New API:
QImage::devicePixelRatio() and setDevicePixelRatio()
QPixmap::devicePixelRatio() and setDevicePixelRatio()
QWindow::devicePixelRatio()
QScreen::devicePixelRatio()
QGuiApplicaiton::devicePixelRatio()

Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-12-01 08:33:20 +01:00
Shawn Rutledge
c8dc41bacd QWidget windows have fullscreen button by default; manual test for it
It's again possible for QWindows and widget windows to go into
fullscreen mode on the Mac.

Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-12-01 08:32:26 +01:00
Thorbjørn Lund Martsum
51914375b6 QGraphicsView - fix rubberband to stay right on scroll
We should consider the scene-position when we are expanding
moving a rubberband. If the user does some auto-scroll
(Qt should support that itself, but that is another matter)
then the rubberband should not keep the (old) local position
to calculate the rubberband extension, but instead use the
scene-position that was actually clicked.

Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-01 08:28:43 +01:00
Samuel Rødal
7a7102ad07 Fixed abbreviations in QWindow::framePos() and QWindow::setFramePos().
As 672e7c875e did changing pos() to
position() and setPos() to setPosition().

Luckily there's not much code that uses these.

Change-Id: I1e1982f00412a22bd376e667a5e8c30b6149f9b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-27 15:24:31 +01:00
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