Commit Graph

32 Commits

Author SHA1 Message Date
Samuel Rødal
b213d5bfa3 Make QPen default to 1-width non-cosmetic.
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.

The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.

Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-22 19:36:43 +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
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
Lars Knoll
328550ff00 Remove the obsolete scene argument for constructors of graphics items
The argument has been obsoleted and not documented since 2007. Get rid
of it now before Qt 5.0

Task-number: QTBUG-25089
Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-08-03 00:37:59 +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
Friedemann Kleint
305cdc7355 Remove usage of deprecated qWaitForWindowShown(QWidget *) method.
Change-Id: I445d24a09dbb7abb62a37bd9914284f21a4f08f1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-01 13:26:03 +02:00
Friedemann Kleint
4677cf3d01 Deprecate the qWaitForWindowShown(QWindow *) method.
While the qWaitForWindowShown(QWidget *) is inherited
from Qt 4.8, the qWaitForWindowShown(QWindow *) was introduced
in Qt 5. As it is identical to qWaitForWindowExposed()
and removed already, it can be deprecated in Qt 5.

Remove its usages in qtbase.

Change-Id: I28788d120ad687a49f02b2b44de6b38a2832fe5c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-25 07:24:49 +02:00
Friedemann Kleint
8761840397 Implement waitForWindowExposed and friends for widget windows.
- Implement waitForWindowExposed() for toplevel windows.
- Implement waitForWindowShown(QWidget *) and mark as
  deprecated in line with waitForWindowShown(QWindow*).
- Use in tests.
- Simplify tests (collapse waitForExposed, setActive
  into setActiveWindow, waitForActive), remove most
  hard-coded timeouts.
- Stabilize graphicsview tests by using waitForWindowActive.

Change-Id: Ic7c061e2745b36f71a715ee4e47c0346b11a91e8
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-07-20 09:27:28 +02:00
kb
cff6e39cd1 Remove capitalization when specifying include-libraries.
MinGW installations on case-sensitive filesystems expect
lowercase names of include-libraries and (usually) include
files.
When crosscompiling on Debian 6 (targeting MS Windows) linking
fails because mingw is looking for non-existent include-libraries.
Using lowercase names solves this.

Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 21:34:08 +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
Jason McDonald
56f0c67dc1 Remove insignficiation from qgraphicsscene test on Windows.
This test has been passing consistently since it started running in CI.

Task-number: QTBUG-24295
Change-Id: If2a163607ae72cae9e28619dd5de1b333aea4ed9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-30 03:29:52 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Pekka Vuorela
0ee1b4a1de Reverted use of tentative commit use in QWidget editors
Feature to be reimplemented simplified. Cases when input method
needs to be reset with possibility to commit use
QInputMethod::commit() again.

Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-03-27 12:51:38 +02:00
Samuel Rødal
55fa3c189f Got rid of Map / Unmap events in favor of Expose event.
Since change 2e4d8f67a8 the need for Map and Unmap events has
gone away, as now the Expose event is used to notify the application
about when it can start rendering.

The Map and Unmap events weren't really used except by QWidget to set
the WA_Mapped flag, which we now set based on the expose / unexpose.

Also guarantee that a Resize event is always sent before the first
Expose, by re-introducing an asynchronous expose event handler. Since
an expose is required before rendering to a QWindow, show a warning if
QOpenGLContext::swapBuffers() or QBackingStore::flush() if called on a
window that has not received its first expose.

Change-Id: Ia6b609aa275d5b463b5011a96f2fd9bbe52e9bc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-22 11:43:36 +01:00
Marc Mutz
a03a71e332 examples: use QVector<QPointF> instead of QList<QPointF>
QPointF is in the category of types for which QList
is needlessly inefficient (elements are copy-constructed
onto the heap and held through pointers). Use a vector
instead. This is consistent with the QPainter API.

Change-Id: Id0e910c067a60d12fbc175e7ee7da824834be374
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-08 05:31:40 +01:00
Pekka Vuorela
7401832a7d Refactor input context tests
Combined test input context instances and adapted changed
interfaces a bit.

Change-Id: Id5422cac5967d45dcaf2eb71b941d9c45e3b4dee
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-22 13:54:13 +01:00
Miikka Heikkinen
f8e2753323 Make 'nmake check' succeed for widgets tests
Marked a bunch of tests insignificant, and skipped one crashing test
case in QApplication test, as that couldn't be made to pass simply by
marking the test insignificant.

Once the underlying issues are fixed, the tests need to be re-enabled.

Task-number: QTBUG-24203
Change-Id: I9aea4fa207d307793445efdcaead72219fbf6c4f
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-17 14:08:19 +01:00
Bradley T. Hughes
f0f78eb0a9 Remove usages of QT_ARCH and QT_ARCH_* from qtbase
The architecture is detected at compile time based on the predefined
macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf
files.  The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present
in the current copy of src/3rdparty/libpng, so no change in
functionality is expected.

The conditional for the SUPPORT_JIT define in pcre.pri is moved to
src/3rdparty/pcre/config.h, again so that we can use the compiler's
predefined macros to detect the architecture at compile time.

Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their
Q_PROCESSOR_* equivalents.

Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with
their Q_OS_* equivalents.

Note that this commit also effectively disables the SPARC atomic
implementation. An inline implementation for SPARC needs to be added,
or we remove the current code and instead rely on the GCC intrinsic or
C++11 std::atomic support on SPARC.

Note also that this commit does not remove QT_ARCH from configure or
qconfig.h. This will continue to be set until all Qt 5 projects can be
moved away from using QT_ARCH.

Change-Id: I5de747cc4436d21941329974cff3016970f497b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-17 08:22:43 +01:00
Pekka Vuorela
71726ccf67 Renamed QInputPanel as QInputMethod
QInputMethod better describes what the class is about, input methods
in general, be they panels or just composing input from key events.

Compatability headers added for old name. Not bulletproof but should be
enough to get transition done.

Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-02 11:10:04 +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
Pekka Vuorela
b83e98d22c Adapt QGraphicsScene test to use QPlatformInputContext
Change-Id: Iaf61798cc78e57563fee088711d39090b722a946
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-30 11:28:20 +01:00
Jason McDonald
9e0479496e Remove mention of Trolltech from QGraphicsScene autotest.
Task-number: QTBUG-19653

Change-Id: Iabebf17f5b09c17a767e81a0ccadd03513238a75
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-28 04:48:01 +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
Jason McDonald
a8fd0c3654 Don't depend on moc to disable test functions.
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:
    924d810dbd
    8aaff67510
    338d3f1197
    a55034062b
    253497b744
    7cfad460c5
    9d2ff58f36
    0cf6baa2d6

Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-18 01:51:57 +01:00
Jo Asplin
b92fed185e Re-enabled passing tests in tst_qgraphicsscene
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsscene test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Idd229532787ce8138d8e1c86daf1f91b90e87e38
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:34 +01:00
Jason McDonald
fd672569e4 Remove unstable test from qgraphicsscene test.
The removed test was disabled in February 2007 because it did not work
cross-platform.  The comment that was added at the time claims that the
functionality is covered thoroughly by other tests, but even if that
isn't true we're not losing anything by removing this test as it is not
even useful as a starting-point for a new test due to its reliance on
random test data.

Change-Id: Ica74262082184908d02595702486803d1efff4d2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 08:31:24 +01:00
Friedemann Kleint
0c3d898a03 Tests: Remove Q_WS_QPA, qpa-sections from .profiles.
Compile without -qpa.

- Make Q_WS_QPA-#ifdefed sections the default in the code
- Replace some Q_WS_ by Q_OS_
- Add ### fixme for places that need checking
- Remove qpa conditionals from .pro files.

Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-27 09:50:30 +02: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
Jason McDonald
27f9f136f7 Remove SkipMode parameter from QSKIP calls.
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>
2011-10-21 01:20:29 +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