Commit Graph

1585 Commits

Author SHA1 Message Date
Jędrzej Nowacki
51f2a0c331 Cleanup usage of QVariant::Type.
QVariant::Type is marked as obsolete. It is not possible to get rid of
it completely, in a source compatible way, but at least we can remove it
safely from a method arguments list.

Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-27 12:47:52 +01:00
Toby Tomkins
472b06d63a Skip unstable qlineedit autotest on Ubuntu 11.10.
Task-number: QTBUG-24518

Change-Id: Ia271a820613c1f8a885779eddd20e261716afc6d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-27 09:10:25 +01:00
Toby Tomkins
35ef771d5a qfiledialog2: Skip test that is passing on CI and failing otherwise.
Task-number: QTBUG-23602

Change-Id: Id5dfb85956048c60849d865161212b0764e8f250
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-27 08:08:50 +01:00
Kurt Korbatits
efb5a3a52e Changed qnetworkreply unittest to return correct code
- Changed waitForFinished() to return correct return code

Change-Id: Ic6b0dfa195254783a2106011c4a108d907d73557
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-27 04:19:28 +01:00
Marc Mutz
77772f21de compile fix: parse under C++11
See d94ab97b77 for details.

Change-Id: Ifc015be6575bd8f469f257d71fbbf79e07226729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-02-24 22:39:59 +01:00
Friedemann Kleint
ed7f78acba Fix tst_qlineedit.
- Fix key handling in QWidgetLineControl according to
  the keyboard scheme returned by the QPlatformTheme,
  remove #ifdefs.
- Do the same in the test.

Task-number: QTBUG-21402

Change-Id: I36d836584e7122309061af72819a4147cadd0a74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-24 16:21:37 +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
Caroline Chao
4ee14d6f87 CodeCoverage: Skip headersclean test.
The code coverage tool adds #line when instrumenting the code using the gcc
syntax.

Since tst_headersclean now uses the -pedantic-errors flag (qtbase commit
7e970eb58c), it causes a fatal error when the code is
instrumented with the coverage tool.

Change-Id: Icb1888d1c1f0a982c0c56aa168e70a76a246a18c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-24 06:48:46 +01:00
Oswald Buddenhagen
d91cf1e53b clean up qmake-generated projects
remove "header" and assignmets which are defaults or bogus,
reorder some assignments.

Change-Id: I67403872168c890ca3b696753ceb01c605d19be7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-24 05:18:30 +01:00
Pekka Vuorela
194899df24 Reverted part of "Refactor input context tests"
This commit reverts partly 7401832a7d

There is something wrong with DummyWindow/XCB/Metacity, Metacity
crashes quite often when QWindow is activated.

Change-Id: I611af2678814f41c941cb697054135f561a77878
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-24 02:38:04 +01:00
Friedemann Kleint
5e7a4d6bed Use new plugin system in plugin autotest.
Fix up test use QFINDTESTDATA for shadow builds.

Change-Id: I64731baa44f446ce360631ed6a638cea098d78a0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-23 16:38:45 +01:00
John Tapsell
2b23d7214f QTextEngine - treat a fullstop (0x2E) as the same script as the preceeding text when dividing up strings
Many languages use a fullstop to indicate an abbreviation, making the
fullstop part of the word.  For languages like thai, it is required to
pass the fullstop along for correct word breaking.

Change-Id: I5ad0ddbc66ea96e08913446dad8fd3c5d5dd0905
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-02-23 15:07:58 +01:00
John Tapsell
785e95ef0a Harfbuzz-thai: Hide ZWJ and ZWNJ characters and show Inherited characters
Thai is not supposed to have ZWJ and ZWNJ characters or any other of the
Inherited Unicode Scripts
(http://www.verisigninc.com/assets/idn-inherited-unicode-script.pdf)
- they don't have a mapping to the thai encoding tis620 which libthai
requires.  However it is an unfortunate fact that there are many websites
etc that liberally place these ZWJ and ZWNJ characters throughout thai text
to force word boundaries, so we must also deal with them.

We deal with all Inherited characters by mapping them to the invalid code ~0
in tis620 encoding, following what libthai does internally in its own tis620
encoding functions, and then replacing this character with the original
unicode and setting dontPrint to true to hide the ZWJ and ZWNJ
characters.

Includes a unit test to check the behaviour.

Change-Id: I1ee8388b650cb5fc61bcb265efb9843c73f327ac
Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-02-23 15:07:58 +01:00
Stephen Kelly
b067f6cfe3 Add the quitlock feature to QThread.
Change-Id: Ib44ee9739499ba4c5f0fecbef3976251ea22836d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-23 15:07:58 +01:00
Marc Mutz
8d10d9a444 compile fix: missing #include <unistd.h>s
Change-Id: I3bd34f67033fb921c49da97419c107811d8da6ff
Reviewed-by: David Faure <faure@kde.org>
2012-02-23 13:25:26 +01:00
Eskil Abrahamsen Blomfeldt
660af10dee Update tst_QTextEdit::fullWidthSelection
Since we would add 1 to the height of script lines in the layout before
and there was no compensation for this in the box font engine, which is
used by this test, the selection rect in the test images was one pixel too
high. Now that the +1 has been removed from the height, the images have to
be updated.

Change-Id: Ic9ea0ace6b61be496846c7f757ae309756cd9f5f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-23 10:28:49 +01:00
Debao Zhang
d2f65aa470 Fix conflict between QMainWindow::restoreState() and QWidget::setStylesheet()
If QMainWindow::restoreState() then QWidget::setStylesheet() were called
before the QMainWindow is shown, the size of QDockWidget can not be
restored.

QWidget::setStylesheet() will generate QEvent::StyleChange event, which will
cause the function QDockAreaLayout::fitLayout() to be called before the layout
of MainWindow is activated. Although the state info has been stored in
a QMainWindowLayoutState variable by QMainWindow::restoreState(), but
QMainWindowLayout::setGeometry() still isn't called at present. So
QDockAreaLayout::fitLayout() will force the size of dockwidgets
and centralwidget to be calculated using the wrong geometry, which will
break the state restored by QMainWindow::restoreState().

This is a side effect of 692e9103ebb85b90e79377206d5d03b704d43d42.

Task-number: QTBUG-15080

Change-Id: I8cda6a529d178f7467a59b780db80df0a44d4769
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-23 10:14:24 +01:00
Andrew den Exter
ef9a86db56 Fix rounding error in QInputMethod::cursorRectangle().
Use QRectF consistently to avoid the rounding done in the conversion
to QRect.

Task-number: QTBUG-24463
Change-Id: If9ea858ebabf8c449ea058b9d379d4a57cb6c82d
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-02-23 09:33:27 +01:00
Debao Zhang
1501f1ddd4 QMenuBar: Clean up Q_WS_WIN
- Replace Q_WS_WIN with Q_OS_WIN
 - Remove useless #ifdef Q_OS_WINCE which located in another #ifdef
   Q_OS_WINCE

Change-Id: I6279b6d74902ab3ca6bdb7292c2936a76e3e6952
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-23 09:21:22 +01:00
Friedemann Kleint
4a7be92f06 Fixed tst_qobject signalbug silently not compiled in -fast builds.
When configuring with -fast on Windows, a directory which contains two
.pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile
silently clobbered by the non-SUBDIRS Makefile.  In practice, this may
cause various subdirectories to be silently excluded from the build.

Rearrange .pro files for this test to avoid triggering this bug.

See also  e9015b3bc8.

Task-number: QTBUG-21168

Change-Id: I18fac1ac636fdc6b2aaee1b4cdfee9c4bc2a77ff
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-23 09:06:44 +01:00
Richard Moore
194898bab9 Fix breakage in dead code
Change-Id: Ibcddfb711a3f47bf957a4b010330e8a775f1a2e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-22 17:32:32 +01:00
Friedemann Kleint
541949aed2 Add further theme hints to QPlatformTheme.
- Add hints for QDialog/QDialogButtonBox.
- Add hint for available popup-menu area.
- Add keyboard scheme hint replacing
  QGuiApplicationPrivate::currentKeyPlatform()

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>

Task-number: QTBUG-24204
Task-number: QTBUG-24315

Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-22 17:28:51 +01:00
Robin Burchell
186692f81f Remove custom text codec for C strings.
This setting is extremely harmful, as code cannot know whether or not to expect
it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive,
and caused a lot of people to make mistakes with it.

Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 14:00:32 +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
Friedemann Kleint
82fb03546b Fix QJson autotest on Windows.
- Fix warning: "Character represented by universal-character-name
  '\uFFFF' cannot be represented in the current code page (1252).
- Fix character conversion
- Change source file to plain ASCII, add defines for special
  characters.

Change-Id: I8557e6ba7488f746247f0d78181f14bfb7d5aaae
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 13:00:04 +01:00
Rohan McGovern
e9015b3bc8 Fixed tst_qlogging app silently not compiled in some -fast builds.
When configuring with -fast on Windows, a directory which contains two
.pro files, one SUBDIRS and one not, will have the SUBDIRS Makefile
silently clobbered by the non-SUBDIRS Makefile.  In practice, this may
cause various subdirectories to be silently excluded from the build.

Rearrange .pro files for this test to avoid triggering this bug.

Task-number: QTBUG-21168
Change-Id: Ic51941db497d7b8fb004f3c50f5ea24d90ff3114
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-02-22 04:48:36 +01:00
Toby Tomkins
4c577aead9 Flag QGraphicsView test as unstable on Mac.
Task-number: QTBUG-24296

Change-Id: I9f748c368fbc0cc2b272be9400da95d774d51bde
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-22 00:07:31 +01:00
João Abecasis
7bbe79fe5f Drop file-engine abstraction from public API
This abstraction imposed serious performance penalties and is being
dropped from the public API.

In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.

Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.

For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.

[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]

Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.

Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.

Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 00:07:31 +01:00
Andrew Stanley-Jones
d1abf3e3e7 Fix the qlocalsocket test
This test is broken in a couple of ways. A few one line fixes
combined into a single patch.

1. Linux is the only OS that does
abstract unix domain sockets by prepending a null as the first
character.  Don't test this on non-Linux platforms and expect
it to pass.

2. Change QVERIFY2 to QCOMPARE so we can see why this
fails in CI but no on the local system.  Use QCOMPARE
where possible.

Change-Id: Ic3d2cf9696730dc4d6589539fdfe8a48ccf28de5
Reviewed-by: Alex <alex.blasche@nokia.com>
2012-02-21 22:31:00 +01:00
Andrew Stanley-Jones
511e447b70 Enable qlocalsocket auto test
Due to recent changes in the test it should now compile
and run properly.  This re-enables the test.

Change-Id: I6c647d99fa1f1b1c53e006fef2865d6be08ec16c
Reviewed-by: Alex <alex.blasche@nokia.com>
2012-02-21 22:31:00 +01:00
David Faure
848d3694f6 qmimetype: Fix test failure when LC_ALL is set.
This code sets LANG=en_US so that the method comment(), which returns a translated
name, can be compared with an expected result in English.
(QMimeType::comment uses QLocale::system().name() and QLocale::system().uiLanguages())

But LANG= has no effect if LC_ALL is set, so LC_ALL needs to be cleared (or set
to en_US) for the test to work.

Change-Id: Icb031057769be9bc8c0fcab65daa45e7bf1d5b18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-21 15:28:40 +01:00
Shane Kearns
3f91cde588 Test for QT_NO_SSL instead of QT_NO_OPENSSL
Change the ifdefs in our own code (except openssl backend) to use the
new configure flag.

Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-21 15:28:40 +01:00
Marc Mutz
3a8da4a484 QEasingCurve: implement move constructor
The move constructor sets other.d_ptr to zero. This is safe, because
after being moved from, the object is left in a state in which it
can be safely destroyed (delete nullptr is a no-op).

It cannot meaningfully be used anymore (most members will crash with
a nullptr dereference), but in most cases, the moved-from object
cannot be accessed anyway (not a named object), and if a named object
is moved from, it must have been through explicit std::move(), as in
the test case.

The STL makes better guarantees (moved-from containers are .empty()),
but I don't think it's worth introducing a null state into
QEasingCurve just for supporting a use-case that should be
considered a bug anyway.

Change-Id: I4115b7386cdea6960507da6843a0d0196d8e4139
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-21 15:28:40 +01:00
Marc Mutz
6a6178702e QEasingCurve: implement move-assignment operator
Implemented as in QPen etc.

Change-Id: I65b43c6ec7308ca4b44f614594c15c41ab2f89f9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-21 15:28:40 +01:00
Marc Mutz
5d6b2d5e34 QEasingCurve: add member-swap
Implementated as in QPen etc.

Change-Id: Ia08551bf7902b60e115d1b1d2353030597e34841
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-21 15:28:40 +01:00
Kent Hansen
12520e8300 Port badxml autotest to QMetaObjectBuilder
The meta-object format is going to change for Qt5. Use QMOB to
insulate the badxml test from such changes.

(It just so happens that the QFAIL("a failure") statement is still on
line 109 after the refactoring, so the expected_badxml.* files'
location tags did not have to be changed.)

Change-Id: I04421d13c4df71c8004fa71cafc4823a59079a41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-21 13:57:12 +01:00
Friedemann Kleint
69da8588d4 Fix qlogging test.
Build app sub-process first.

Change-Id: I87a11f7fd5d8a82584e496722f79e236191b0fb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-21 08:39:44 +01:00
Jason McDonald
4eb54f7f36 Improve tst_QPrinterInfo::testForDefaultPrinter().
Be explicit about skipping the test when no default printer is present.

Change-Id: If69b275eb0f490411471ec42798d8aefcc57fd83
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:43 +01:00
Jason McDonald
f8c3074faa Allow printer names to contain hyphens in QPrinterInfo test.
Change-Id: I473627413d2f1cd5637704f2948eb07a264be49e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:39 +01:00
Jason McDonald
7d44f45fb7 Fix warning about unregistered metatype in QWindow autotest.
Change-Id: If9d8d7e1cd52815ef7231294e4890dfafcd28ec8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:34 +01:00
Toby Tomkins
a30f42ddb3 Flag two tests (Win+A, Simon+G) in parseString as expect fail on OSX.
Remove previously defined insignificant test flag as the number of
tests failing has been reduced.

Task-number: QTBUG-24406
Task-number: QTBUG-23058

Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 04:17:51 +01:00
Jason McDonald
ca1aa0da03 Make the QApplication autotest work for shadow builds.
Use QFINDTESTDATA to locate the helper applications.

Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 02:27:23 +01:00
Rohan McGovern
8a182591be tst_qapplication: mark expected failure on mac
The tab key behavior in Qt5 no longer respects the "Text boxes and lists
only" tab navigation option in OSX, which is the default.  This is a
regression since Qt4.

Task-number: QTBUG-24372
Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-02-21 02:27:23 +01:00
Kurt Korbatits
4c56db58a2 Changed qnetworksession unittest to work from installation dir
- Made test depend on subprogram
- added install of subprogram

Change-Id: Ib263e9e75ed3c900b52fb1c9b6d319e71d19bdbb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 01:01:52 +01:00
Rohan McGovern
e88f9a92b7 Stabilize tst_qdbusabstractinterface and make it XFAIL
This test was written incorrectly in a way which happened to allow it to
pass most of the time (but not all the time).

Reset the state of test objects between each test function, and mark the
broken functions with QEXPECT_FAIL and a link to a task.

Replace the unusual WaitForPinger construct with the usual
QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations.

Task-number: QTBUG-24262
Change-Id: I82d09002307c0b500bf60cd5b583674321b37609
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 23:34:35 +01:00
Kent Hansen
a0587f79e5 Silence warnings/debug output from qobject tests
They create noise in the test results.

Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-20 19:51:41 +01:00
Friedemann Kleint
054114a459 Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.
Forward-declare instead.

Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-20 16:52:59 +01:00
Friedemann Kleint
ed9b608684 Fix warning about converting false to pointer value.
Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-20 16:52:59 +01:00
Marc Mutz
49b08f96e8 uic: use QStringLiteral() instead of QString::fromUtf8() where applicable
Many (most?) strings written aren't in fact UTF-8, and we can check at
compile-time which are and which aren't, so don't hard-code fromUtf8()
but use the much more efficient QStringLiteral() where applicable.

This is low-hanging fruit. This patch only optimises US-ASCII string
literals, not those that are latin-1 or even UTF-8, because that would
require more extensive changes to the original fixString() function.

Likewise, there are also other calls to QString::fromUtf8() being
generated (e.g. in the pixmap code) that could benefit from being
turned into QStringLiterals, but their code paths are more involved
than those this patch fixes.

This patch at least suffices in turning all the setObjectName()
arguments into QStringLiterals, which was the main goal.

The autotest baseline has been updated with the new expected results.

Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 15:17:08 +01:00
Kent Hansen
5640b0b443 Add QMetaMethod::isValid() function
This function provides a proper way of determining whether a function
returned by QMetaObject::method() is valid. (Checking whether
signature() returns a 0 pointer, which e.g. testlib does, is not an
ideal API -- especially given that signature() will soon be removed
and replaced by a function that returns a QByteArray.)

Change-Id: I644f476b09904925f2042945f5d0ad744482b682
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-20 11:28:38 +01:00
Kurt Korbatits
c66bb51a75 Changed qabstractnetworkcache unittest to use TESTDATA
- Changed qabstractnetworkcache to install testdata

Change-Id: I8f2ae6103214755ee7898dbc0ee50c0e4d7d45ab
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-20 09:36:51 +01:00
Toby Tomkins
853e9ac787 Modify helper functions to remove embedded QSKIP call and return status.
The helper functions contained QSKIP macros which do not also skip their
parent function. These QSKIP function were removed and replaced with a
return success value.

Change-Id: I533f57842fc95beaeb1fcde5235678e9807db056
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:06:19 +01:00
Toby Tomkins
2465143f24 Set tst_qtoolbutton triggered function skipped.
This autotest seems to be caught in an event loop preventing further
correct signalling. Mark test function skipped with QSKIP.

Task-number: QTBUG-24374

Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:06:14 +01:00
Jason McDonald
7fbe7fd7b5 Make QLocale autotest pass for shadow builds.
For shadow builds where "make install" had not been run, the
tst_QLocale::emptyCtor test function would fail to find its helper
application because QFINDTESTDATA was not searching for it in the build
directory due to the test not instantiating QCoreApplication.

This commit fixes the test by instantiating a QCoreApplication using the
QTEST_MAIN macro, which also allows some special case code for Windows
CE to be removed.

Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:06:04 +01:00
Jason McDonald
eb52d78e90 testlib: Report one test result per benchmark test.
Prior to this commit, a benchmark test could report 0..n passes and 0..m
fails or skips, where n is the number of accumulation iterations used to
collect benchmark data and m is the number of times the test function
was invoked.  Depending on the type of benchmark measurer being used,
this could result in a very large volume of test output and inconsistent
pass, fail and skip counts between test runs.

This commit changes the behaviour so that each benchmark test reports
one pass, fail or skip, regardless of the number of iterations used to
collect benchmark data.

This commit also prevents benchmark data being reported in the test
output if the benchmark test failed or skipped, as any benchmark data is
of dubious value in such cases.

The latter change in behaviour requires a minor modification to the
badxml selftest, which now tests quoting of literal strings in xml test
output for both passing and failing benchmarks.

Finally, this commit also adds a new selftest specifically for verifying
correct behaviour for benchmarks that fail or skip.

Task-number: QTBUG-24313
Change-Id: I3426dc659a7511b62fd183a031c7235bc753f497
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:05:58 +01:00
Kurt Korbatits
4cb09aea6a Fixed qobject unittest to work from installation directory
- Made test depend on subprogram to make sure it was there when
  test ran.
- install signalbug subprogram

Change-Id: Ie0a19e52d131adcd17c97b263389aecffb81520e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-20 03:27:02 +01:00
Jason McDonald
88c903f6a3 testlib: Add selftests for XPASS and XFAIL involving QCOMPARE.
Change-Id: I4f897b411aaa51ff453208eda50e12665489074b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 03:27:02 +01:00
Jason McDonald
f64f428b81 testlib: make XPASS output slightly less confusing.
Prior to this commit, when an unexpected pass occurred the test output
showed the message "XPASS : tst_foo::function() 'expr' returned FALSE",
where the problem was actually that the expression evaluated to true
when it was expected to be false.

This commit changes the output to make it clear that the expression
evaluated to true unexpectedly.

Task-number: QTBUG-22118
Change-Id: Id22c178073d3b75789675ca37a8ef019029b1f91
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 03:27:02 +01:00
Bradley T. Hughes
2e18c16e59 Speed up tst_QWaitCondition
Reduce the thread and iteration counts to make this test execute faster.
This change reduces the runtime to 14 seconds (from 5 minutes, 38
seconds).

Change-Id: Id5ea056cfd33022da5a06809f0598a5cdb02b27b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 00:21:00 +01:00
David Faure
b164911b7f Import QMimeType / QMimeDatabase into QtCore.
History of the development before the import:
ssh://codereview.qt-project.org/playground/mimetypes.git

Mimetype definitions come from shared-mime-info where available (UNIX systems),
loaded using a mmap'ed binary cache generated by update-mime-database.
As a fallback if no cache is found, we parse the raw XML files otherwise.

This makes the MIME type support fast and with very low memory usage on UNIX,
and it makes it easy to use on Windows (no dependency on shared-mime-info,
Qt even includes a freedesktop.xml file to use if none are found on the system).

Change-Id: I27b05008216ff936dc463bd80d3893422bfb940e
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-02-18 22:19:43 +01:00
Andrew Christian
908a080006 Added error reporting to QJsonParser
Change-Id: Ib2390c0faf1ed7ada3fc185abce83740ad112929
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-18 18:08:06 +01:00
Friedemann Kleint
e0d9fade03 Fix qclipboard autotest on Windows.
Emit changed signal only if the clipboard is not owned,
in which case QClipboard does it.

Task-number: QTBUG-24184
Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-18 00:00:21 +01:00
Friedemann Kleint
400c865f29 Windows: Fix QWindow-test.
- Save & Restore style and geometry when switching to
  full screen and back since it is not a real state on
  Windows.
- Obey the positioning policy in setGeometry.

Task-number: QTBUG-24185

Change-Id: I18dea4fd372e0b2e46273a7a27e0c6f4f4bde771
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-17 20:09:58 +01:00
David Faure
7e970eb58c Ensure that Qt public headers compile with strict flags
Those from
http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files
(unfortunatey -Wold-style-cast cannot be used due to the glibc macro bswap_16)
and many Qt defines that disable casts.

Change-Id: I97ac707a101df9819e8c031fa75a31b30e20247f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-17 16:42:28 +01:00
Shane Kearns
b4a538ea1c Fix handling of urls containing username/password in QNetworkAccessManager
QNetworkAccessManager was ignoring the supplied credentials, although
webkit seems to support these urls at a higher level.

Following the behaviour of browsers:
We use supplied credentials if authentication is required.
We add supplied credentials to the authentication cache.
We emit authenticationRequired signal if the credentials were wrong.
We do not use previously cached credentials for that url

Synchronous http requests fail, if the credentials were wrong.

Task-number: QTBUG-18107
Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-17 15:04:07 +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
Miikka Heikkinen
3efb0d50e5 Disable 'check' target generation for network autotests for Windows.
A number of network autotests are unstable in Windows, so don't
generate check target for them as is done for mac.

Once the tests are acceptably stable, this needs to be reverted.

Change-Id: I18262e28ce40eba541aecf3cfb651bff34698ead
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-17 11:48:08 +01:00
Bradley T. Hughes
0a6516e126 Expect failure in tst_QStyleSheetStyle::hoverColors()
This is similar to the focusColors() failures in QTBUG-23686.

Task-number: QTBUG-23686
Change-Id: I1f01a4e41e61a7a664309be34cfa4fe916a92b15
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 11:44:29 +01:00
Bradley T. Hughes
ee7c81b9c4 Skip tst_QGuiApplication::focusObject() on Mac OS X
This test fails intermittently, and at random locations.

Task-number: QTBUG-24322
Change-Id: Ied6dd4d1593066debc0fb48c6ca2a17a1f4d51b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 11:44:29 +01:00
Bradley T. Hughes
ea1ef2a471 Skip all tst_QFontDialog tests on Mac OS X
All of these tests currently hang.

Task-number: QTBUG-24321
Change-Id: I7664b57f6539d4c03008701da66e193019a4440a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 11:44:29 +01:00
Bradley T. Hughes
a902387204 Skip hanging tst_QColorDialog test, expect failing test on Mac OS X
tst_QColorDialog::native_activeModalWidget() hangs, so skip this test.
tst_QColorDialog::task247349_alpha() fails, so XFAIL this failure.

Task-number: QTBUG-24320
Change-Id: Ie4d69e07063e9a648ec4fa3337274143a52ea3e3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 11:44:29 +01:00
Bradley T. Hughes
33fe2cf23f Skip hanging/failing tst_QApplication tests on Mac OS X
The first block of tst_QApplication::quitOnLastWindowClosed() hangs
on Mac OS X, so skip that block for now.

tst_QApplication::testDeleteLAter() both hangs and fails on Mac OS X,
so skip the test and XFAIL the failure.

Task-number: QTBUG-24318
Task-number: QTBUG-24319
Change-Id: Ice11292d84e63215f1bb9e03f3ef369943d1d887
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 11:44:29 +01:00
Bradley T. Hughes
2c3b2b4703 Expect tst_QSettings::ctor(native) failures on Mac OS X
The default constructor for QSettings does not set NoAccess status, even
if the organization domain, organization name, and application name are
empty. Instead of trying to fix QSettings, keep the existing behavior,
and test for it.

Failures from tst_QSettings no longer need to be ignored, so
mac:CONFIG+=insignificant_test has been removed from the .pro file.

Task-number: QTBUG-22745
Change-Id: Ic9f8b6821c483c217e1ef2ece704be2da169e340
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-02-17 11:44:29 +01:00
Friedemann Kleint
4cf0deef73 Add palette() and further hints to QtGui/QPlatformTheme.
- Move palette() from deprecated QtWidgets/QGuiPlatformPlugin
  to  QtGui/QPlatformTheme, Make it return a const * since
  QPalette does not have isNull().
- Initialize QGuiApplication::palette() and
  QApplication::systemPalette() from it.
- Do not initialize QPalette from QGuiApplication::palette()
  unless app_pal is non-null (default to Qt::black if it is 0).
  This avoids initialization order crashes/recursions in the
  QPA plugin. Streamline initialization function.
- Remove styleName(), systemIconThemeName() and iconSearchPaths()
  from QGuiPlatformPlugin and re-add them as
  QPlatformTheme::themeHint().
- Remove styleHint() from QGuiPlatformPlugin, add it to
  QPlatformTheme::themeHint().
- Add UNIX themes with factory function (Generic,
  KDE, Gnome), taking it from Qt 4.8 code (stripping the
  KDE 3 code).
- Implement Windows palettes.

Task-number: QTBUG-24204

Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-02-17 11:44:29 +01:00
Kurt Korbatits
d0759e348d Changed qnetworkreply unittest to work from install directory
- made subdir test depend on echo
- remove SRCDIR and changed to use TESTDATA and QFINDTESTDATA
- added waitForFinish() to handle slow networks
- removed core module header from echo subprogram and replaced
  with needed header only
- Added ipv6 skip to connectToIPV6Address() if not available
- Added check QT_BUILD_INTERNAL and skip tests if backend
  not available
- Skip permission tests if run as root
- Removed win32 debug and release directory locations so that
  application is in known location relative to test data

Change-Id: I58c3c2fca3cd2fee72fdb81d016bb4fd7fe08ac2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-17 08:25:10 +01:00
Kurt Korbatits
c08fb806bb Removed rfc3252.txt from networkselftest unittest
- no longer needed after test that used it was removed

Change-Id: I63fc8a9db07f9250507becb9bf6c2aefe0fdc254
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-17 08:23:10 +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
Marc Mutz
b1004b6f83 Compilation fix: missing includes for geteuid()
Change-Id: I054b8c9a398b5e192c2e005a39cba19bb4930966
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-17 05:27:29 +01:00
Miikka Heikkinen
7c081ba942 Fix qlogging test for release configuration
The helper process 'app' wasn't built in release configuration.

Also improved finding the helper executable to utilize
QFINDTESTDATA and print out a proper errors if it could not be
found or started.

Note that adding ".exe" to process name in Windows is unnecessary
as QProcess already does that for you, so removed the ifdeffing.

Task-number: QTBUG-24330
Change-Id: Ibe75e0ecd24181ab623d0a60f17ecaf92052b0dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-17 05:26:58 +01:00
Friedemann Kleint
3b5f6f7647 QWindow-test: Fix QSignalSpy warning about Qt::ScreenOrientation.
Change-Id: I5954445057c1a597b5062ee8e472d684832812e5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-17 05:26:55 +01:00
David Faure
1209fccaf7 QMimeData: export URLs as text too
This allows to drop or paste them into lineedits and text widgets
(including such widgets in non-Qt applications)

Implementation note: this is done on-demand rather than in setUrls
so that it's still possible to setText explicitely; the new code
is only a fallback for when no text/plain data is available.

Change-Id: Ie90c43a30bfa64a6047b627e7351d20bf5ec8e03
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-17 05:26:47 +01:00
Eskil Abrahamsen Blomfeldt
cb8445f032 Remove historical +1 from font height calculation
Historically, we've calculated font height as ascent+descent+1.
In Qt 4, a patch was added to work around this by subtracting
1 from the descent of the font engines. We now remove the +1 and
the work arounds.

Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-17 05:26:44 +01:00
David Faure
b838170ceb QDebug: Add support for %{pid}, %{appname} and %{threadid}
Change-Id: I4add0a374e6524b615c6dc0ecfb010a90075b04f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-17 05:25:56 +01:00
Bradley T. Hughes
2193df65a3 Fix tst_QFileSystemWatcher failure on Mac OS X
The watchFileAndItsDirectory() test would fail due to atime updates for
the first watched file coming up to 2 seconds after the file was closed.
Observation shows that the atime has a 2 second resolution on Mac OS X
using HFS+, so add an appropriate delay to make sure that the atime
update from the kqueue based file system watcher can dispatch all
updates.

Task-number: QTBUG-22744
Change-Id: Ie79af20d6b4c154021307c8a8f6d336369720337
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-02-17 05:25:26 +01:00
Jason McDonald
64642a4d97 testlib: Skip test function if init() fails.
Prior to this commit, the following statement in the qtestlib
documentation was untrue: "If init() fails, the following testfunction
will not be executed, the test will proceed to the next testfunction."
If init() called QSKIP, the test function would be skipped, but if
init() reported a failure, the test function would still be executed
(even though doing so could be unsafe).

This commit makes testlib skip a test function if init() reports a
failure and enhances the selftests to cover skips and fails in both
init() and cleanup().

Task-number: QTBUG-20371
Change-Id: Id1cc8464ae0b8c257ae1b74dbe9189a501f5366b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-17 05:24:46 +01:00
Kurt Korbatits
4121f9df29 Changed qsslkey to work from installation directory
- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I30bf175c2c9044e1f8556260a032467ca0dfc09f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-17 05:24:43 +01:00
Kurt Korbatits
20f6dc615a Changed qsslcertificate unittest to work from install directory
- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I1957ef287ba2f337b5e0b2c6245d872eacb6316f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-17 05:24:40 +01:00
Kurt Korbatits
857775f701 Changed qcryptographichash unittest to work from installation directory
- Changed qcryptographichash to use TESTDATA and QFINDTESTDATA

Change-Id: Ic3a1bdccc9f81605c648dab2a642421d17f7fe80
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-17 05:24:37 +01:00
Kurt Korbatits
32060c2115 Changed json unittest to work from installation directory
- Changed json unittest to use TESTDATA and QFINDTESTDATA

Change-Id: Id29f8257565f409fa184ba465f25bc8454e2b7fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-16 04:23:20 +01:00
Jason McDonald
eb64bb89cf Eliminate duplicate data row names in dbus, tools and xml autotests.
Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-16 02:00:52 +01:00
Jason McDonald
6dfb1de099 Eliminate duplicate data row names in network autotests
Change-Id: Icbfc24309a182f37268232fc3c299d35d6d6a0ea
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-16 02:00:46 +01:00
Jędrzej Nowacki
214e031d56 Implement new static less API for QMetaType.
Currently QMetaType API contains almost only static methods. This works
nice until someone needs more information or needs to do more operations
on a type. In this case every function call has to do type dispatch.

This API allows to avoid redundant type dispatching, by caching a
type information in a QMetaType instance. It gives significant
performance boost especially for custom types (up to 9x).

Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-16 02:00:15 +01:00
Rohan McGovern
7a5bb18dc6 Fixed tst_QFile when redirecting stdin/stdout/stderr to/from files.
openStandardStreamsBufferedStreams would fail if standard streams were
redirected to a file (e.g. ./tst_qfile > testlog.txt).

openStandardStreamsFileDescriptors already has a workaround, so apply it
here too.

Change-Id: Iffe9d7864909e489e77c1114e80c4e3bc70a8722
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-16 01:57:27 +01:00
Stephen Kelly
66603985f2 Fix ref counted window close handling.
Instead of refcounting QWindow visibility, we ask the Application
subclass whether quitting is appropriate.

Task-Id: QTBUG-24120
Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-02-16 01:56:27 +01:00
Jędrzej Nowacki
18965b1384 Add QMetaType::FirstCoreType enum value.
We should not assume that the first type id is 0.

Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-02-16 01:56:05 +01:00
Stephen Kelly
394315d902 Move the removal of the Quit event to QWindow.
Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-15 20:47:32 +01:00
Miikka Heikkinen
656dff47a6 Fix tst_QFileDialog2 for Windows 7.
There are no rights for typical user or even administrator to write
directly under c:\ root in windows without rights elevation, so
completionOnLevelAfterRoot() test case failed. Changed the test case
to use an existing directory.

Task-number: QTBUG-24289
Change-Id: I6a8dfc9d1d6ae798b3b9049c542b45fdbdbd9a8c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-15 18:03:54 +01:00
Miikka Heikkinen
79e9076274 Remove XFAIL in QGraphicsWidget test for Windows
The XFAILed initStyleOption() case passes on Windows, so do not XFAIL
it there.

Task-number: QTBUG-24297
Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-15 18:03:01 +01:00
Kent Hansen
ded417b75a Add autotest for QMetaMethod introspection
This autotest checks that meta-methods can be properly inspected
(signature, return type, parameter types, etc.).

Change-Id: I13dc75ec5123280e94ec738dade3f54e427fdbaa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-15 17:27:04 +01:00
Friedemann Kleint
0f0d8a5a8f Stabilize QFileSystemWatcher test.
- Run each test in a temporary directory, avoid writing test
  files in source/build tree and prevents tests being influenced
  by left-overs from previous runs and locks of the application
  on the current directory.
- Modify test to be able to use absolute paths to the temporary
  directory.
- Skip parts of test removeFileAndUnWatch if a race condition
  occurs.

Task-number: QTBUG-24029
Change-Id: I215cc2e0fe6f92d2ffe597b01cdc9c9a39e3c5b4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-02-15 08:59:34 +01:00