profile/ivi/qtbase.git
12 years agotest: skip some broken tests in tst_qpixmap for qpa
Rohan McGovern [Thu, 11 Aug 2011 23:58:45 +0000 (09:58 +1000)]
test: skip some broken tests in tst_qpixmap for qpa

These tests cannot be written properly for qpa, due to missing API.

Task-number: QTBUG-20864
Task-number: QTBUG-20863
Change-Id: I2b311833a6738b1830c1cd8be1f20293492bebda
Reviewed-on: http://codereview.qt.nokia.com/2877
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: skip tst_QPrinter::testNonExistentPrinter for qpa
Rohan McGovern [Thu, 11 Aug 2011 23:18:51 +0000 (09:18 +1000)]
test: skip tst_QPrinter::testNonExistentPrinter for qpa

Since the test is irrelevant for Q_WS_X11 and Q_WS_QWS, it's almost
certainly irrelevant for Q_WS_QPA too.

Change-Id: Icc563046baf4c2a5217b87dee150afc7f6fd034d
Reviewed-on: http://codereview.qt.nokia.com/2876
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoQXmlStream lives in QtCore
Lars Knoll [Thu, 11 Aug 2011 13:17:40 +0000 (15:17 +0200)]
QXmlStream lives in QtCore

We can finally remove the hack where a copy of QXmlStream
was compiled into QtXml on some platforms.

Change-Id: Ia164caa73dfb470ac86d1b4062031093b433d10c
Reviewed-on: http://codereview.qt.nokia.com/2869
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoLet CONFIG+=no_default_target also disable `check' by default
Rohan McGovern [Thu, 11 Aug 2011 01:53:10 +0000 (11:53 +1000)]
Let CONFIG+=no_default_target also disable `check' by default

If the compilation of a subdir was explicitly disabled by default, then
the testing of that subdir should also be disabled by default.

Change-Id: I928e232393e89a7c27813b7a48864d4e0fb687f8
Reviewed-on: http://codereview.qt.nokia.com/2835
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoconfigure: fixed usage of rpath on mac
Rohan McGovern [Thu, 11 Aug 2011 03:14:14 +0000 (13:14 +1000)]
configure: fixed usage of rpath on mac

This logic should be used for all mac platforms.
Currently it is erroneously skipped for qpa on mac.

Change-Id: Ibc8e0bb38d4c08f48292639c614bc328c703b1bc
Reviewed-on: http://codereview.qt.nokia.com/2836
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoQLabel documentation: add warning about sanitizing input
Peter Hartmann [Tue, 2 Aug 2011 14:09:24 +0000 (16:09 +0200)]
QLabel documentation: add warning about sanitizing input

make users more aware of QLabel guessing the text format.

Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
(cherry picked from commit 31f7ecbdcdbafbac5bbfa693e4d060757244941b)

Change-Id: I681c7daf568a6107b01908fa85d2da2a7e4e228a
Reviewed-on: http://codereview.qt.nokia.com/2817
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoDon't print the "Configuration tests:" header if there aren't any.
Michael Goddard [Wed, 27 Jul 2011 00:38:16 +0000 (10:38 +1000)]
Don't print the "Configuration tests:" header if there aren't any.

Change-Id: Ie7f0022348aba90e240f5b68e838430ec4e43ae9
Reviewed-on: http://codereview.qt.nokia.com/2228
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoconfigure: fixed debug-and-release default for qpa on mac
Rohan McGovern [Wed, 10 Aug 2011 01:49:46 +0000 (11:49 +1000)]
configure: fixed debug-and-release default for qpa on mac

debug/release is always supposed to default on for platforms where
debug/release affects linkage (i.e. mac and windows).  Previously, it
did not correctly default on for qpa mac builds.

Change-Id: I8d3c418f3fb787136ab120872fdd4d2ebf82c90e
Reviewed-on: http://codereview.qt.nokia.com/2796
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agotest: mark tst_qfontdatabase qpa failures as expected
Rohan McGovern [Fri, 5 Aug 2011 01:44:39 +0000 (11:44 +1000)]
test: mark tst_qfontdatabase qpa failures as expected

Task-number: QTBUG-20754
Change-Id: Ibb57e7724d453b390a8e37e62f6e5cf2691f48f8
Reviewed-on: http://codereview.qt.nokia.com/2654
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: only QEXPECT_FAIL tst_qgraphicstransform in release mode
Rohan McGovern [Mon, 8 Aug 2011 01:55:35 +0000 (11:55 +1000)]
test: only QEXPECT_FAIL tst_qgraphicstransform in release mode

The floating point problem which causes this test to fail is not
triggered if Qt is compiled in debug mode.  Enable QEXPECT_FAIL more
narrowly.

Task-number: QTBUG-20661
Change-Id: I25f3260b516cd4fda9d8b711aa1140cbda821412
Reviewed-on: http://codereview.qt.nokia.com/2719
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: mark tst_qftp as insignificant
Rohan McGovern [Wed, 10 Aug 2011 01:45:02 +0000 (11:45 +1000)]
test: mark tst_qftp as insignificant

As virtually all of our tests which use the live qt-test-server, this
test is inherently unstable.

Change-Id: I27fc07a28b8dd6cd4dd3cb6414389e3cf41d0318
Reviewed-on: http://codereview.qt.nokia.com/2795
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoRemove all non-const operator==
Harald Fernengel [Tue, 9 Aug 2011 09:30:03 +0000 (11:30 +0200)]
Remove all non-const operator==

We had to leave the non-const operator== for binary compatibility.
Remove them all, just leave the const version in there. 100% source
compatible.

Change-Id: Ib7a70fb441fe51d5164d9cbf495cbeda0f48fafe
Reviewed-on: http://codereview.qt.nokia.com/2773
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
12 years agoSupport -qtnamespace and -qtlibinfix in qtbase examples
Liang Qi [Mon, 8 Aug 2011 14:27:02 +0000 (16:27 +0200)]
Support -qtnamespace and -qtlibinfix in qtbase examples

Task-number: QTBUG-19971
Change-Id: Ie20eb2fc133658dd34e1ec25a3b80c36f0f01aa3
Reviewed-on: http://codereview.qt.nokia.com/2754
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
12 years agoChange mouse and wheel QPA events to use QPointF.
Laszlo Agocs [Mon, 8 Aug 2011 10:07:56 +0000 (13:07 +0300)]
Change mouse and wheel QPA events to use QPointF.

At least QMouseEvent already uses QPointF so there is no reason to
restrict handleMouseEvent to integer positions.

Change-Id: I9c72d2e0e99518b40a1898aec9ad2b3421a3e9e2
Reviewed-on: http://codereview.qt.nokia.com/2739
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agotest: mark tst_qgraphicswidget as insignificant on qpa, xcb
Rohan McGovern [Mon, 8 Aug 2011 03:06:28 +0000 (13:06 +1000)]
test: mark tst_qgraphicswidget as insignificant on qpa, xcb

This autotest is unstable.

Task-number: QTBUG-20778
Change-Id: If862a64d2be2f3f66ea8435b0412bfb401f9aceb
Reviewed-on: http://codereview.qt.nokia.com/2721
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotests: handle many expected crashing tests on qpa, xcb
Rohan McGovern [Mon, 8 Aug 2011 01:13:58 +0000 (11:13 +1000)]
tests: handle many expected crashing tests on qpa, xcb

Mark all of these autotests as `insignificant' until the underlying
crash bug is fixed.

Task-number: QTBUG-20756
Change-Id: I18fb7038dd86ef2e9a5f37c8f26d7fe76032754e
Reviewed-on: http://codereview.qt.nokia.com/2714
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: fixed usage of QEXPECT_FAIL in tst_qglyphrun::initTestCase
Rohan McGovern [Mon, 8 Aug 2011 00:31:58 +0000 (10:31 +1000)]
test: fixed usage of QEXPECT_FAIL in tst_qglyphrun::initTestCase

The rest of this test gives unpredictable results if initTestCase fails.

Normally, a failure in initTestCase skips the rest of the test, but this
is not the case if QEXPECT_FAIL is used.  Adjust the test to ensure the
rest of it is still correctly skipped.

Change-Id: I8ba76161e788f10801029ef10693e9ac275a2897
Reviewed-on: http://codereview.qt.nokia.com/2713
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoadd qml related usage help message
Charles Yin [Mon, 8 Aug 2011 01:31:46 +0000 (11:31 +1000)]
add qml related usage help message

Change-Id: Ieabbca64793ba128746193786bac3d0213e8e746
Reviewed-on: http://codereview.qt.nokia.com/2716
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Charles Yin <charles.yin@nokia.com>
12 years agoFix fallbacksForFamily in QBasicUnixFontDatabase
Jiang Jiang [Fri, 5 Aug 2011 13:49:21 +0000 (15:49 +0200)]
Fix fallbacksForFamily in QBasicUnixFontDatabase

So that this function instead of the one in QPlatformFontDatabase
will be called.

Change-Id: Ifdb75ada27723c688e42067c7633b08391d66467
Reviewed-on: http://codereview.qt.nokia.com/2696
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agotest: mark tst_qgraphicseffect as insignificant for qpa
Rohan McGovern [Fri, 5 Aug 2011 05:21:01 +0000 (15:21 +1000)]
test: mark tst_qgraphicseffect as insignificant for qpa

This test unstably fails for qpa, xcb, so mark it as insignificant.

Task-number: QTBUG-20761
Change-Id: I0b4228c2803946ef87d7d11f4167017c2ffd0ad6
Reviewed-on: http://codereview.qt.nokia.com/2658
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: mark expected failures in tst_qglyphrun for qpa
Rohan McGovern [Fri, 5 Aug 2011 04:17:30 +0000 (14:17 +1000)]
test: mark expected failures in tst_qglyphrun for qpa

Task-number: QTBUG-20760
Change-Id: Id046abfc8dcce2c6d068e5febf8c2b8777b50f53
Reviewed-on: http://codereview.qt.nokia.com/2657
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: mark expected failures in tst_qfontmetrics for qpa
Rohan McGovern [Fri, 5 Aug 2011 04:12:16 +0000 (14:12 +1000)]
test: mark expected failures in tst_qfontmetrics for qpa

Task-number: QTBUG-20759
Change-Id: Idb9493f5bf4ce031d7800b2187bf7c15757eb963
Reviewed-on: http://codereview.qt.nokia.com/2656
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: blacklist crashing tst_qfontdialog for qpa, xcb
Rohan McGovern [Fri, 5 Aug 2011 01:56:45 +0000 (11:56 +1000)]
test: blacklist crashing tst_qfontdialog for qpa, xcb

Task-number: QTBUG-20756
Change-Id: I04b5ace4d357f756a3148597170b87a60b008cf5
Reviewed-on: http://codereview.qt.nokia.com/2655
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: fixed tst_qfont for qpa
Rohan McGovern [Fri, 5 Aug 2011 00:32:05 +0000 (10:32 +1000)]
test: fixed tst_qfont for qpa

Extend the QWS skip case to also cover QPA.

Change-Id: I2bb93b179a384cf4304284d4d550c0bf4b61f4ca
Reviewed-on: http://codereview.qt.nokia.com/2653
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: fixed tst_qabstractitemview for qpa
Rohan McGovern [Fri, 5 Aug 2011 00:30:55 +0000 (10:30 +1000)]
test: fixed tst_qabstractitemview for qpa

Test uses QCursor::setPos(), which is broken for QPA.

Task-number: QTBUG-20753
Change-Id: Ibeb1278f46dc5dec081c19ba25dd83cc8390aef3
Reviewed-on: http://codereview.qt.nokia.com/2652
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoFix weight parsing in QBasicUnixFontDatabase
Jiang Jiang [Fri, 5 Aug 2011 08:59:34 +0000 (10:59 +0200)]
Fix weight parsing in QBasicUnixFontDatabase

First check the usWeightClass in OS/2 font table, then check
the weight byte in panose structure because Nokia Pure Text
fonts only have that set correctly.

Change-Id: Idce2626c8df17ce74ba78b317846cb42c3f1fe84
Reviewed-by: Jørgen Lind
Reviewed-on: http://codereview.qt.nokia.com/2682
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agosupport xcb-icccm 3.8
Oswald Buddenhagen [Wed, 3 Aug 2011 19:16:10 +0000 (21:16 +0200)]
support xcb-icccm 3.8

this is a rather crude hack, but whatever.

Change-Id: I3fa363572842b207202d4aac8526951c0e16bf5b
Reviewed-on: http://codereview.qt.nokia.com/2602
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUse more numerically robust algorithm to compute QBezier::pointAt().
Alan Alpert [Tue, 2 Aug 2011 01:26:24 +0000 (11:26 +1000)]
Use more numerically robust algorithm to compute QBezier::pointAt().

QBezier::pointAt() could potentially return values outside the bezier's
bounds, even when the bezier was a straight horizontal line. For
example, with y = 0.5, it would produce y=0.5 or y=0.49999999999999 for
different values of t, which when rounded cause jittering in a QML
PathView.

Task-number: QTBUG-17007
Task-number: QTBUG-18133
Cherry-pick-of: 8b66982ec7b4b5d2071931c288973dce73dc9875
Change-Id: I4ecac7b9085aaaaaaaaaaaaaaaaaaaaaa7d7b0bc
Reviewed-on: http://codereview.qt.nokia.com/2467
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agotest: fixed tst_qundostack and removed CONFIG+=insignificant_test
Sergio Ahumada [Thu, 4 Aug 2011 10:41:32 +0000 (12:41 +0200)]
test: fixed tst_qundostack and removed CONFIG+=insignificant_test

This test had an invalid circular dependency: the test is in qtbase, and
it depends on lrelease in qttools, which depends on qtbase.

Change the test to skip if lrelease is not available or not working.

Change-Id: I4696f4a178a6f8c0f2e76b5c4ae7f60c4f953334
Reviewed-on: http://codereview.qt.nokia.com/2619
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAllow adding to @ignore_headers from sync.profile
Marius Storm-Olsen [Thu, 4 Aug 2011 20:54:50 +0000 (15:54 -0500)]
Allow adding to @ignore_headers from sync.profile

We need this to avoid syncing certain files in QtDeclarative on
Windows.

Change-Id: Ia9fc95262ac18bafc39efc038ea70a1b5d67cddd
Reviewed-on: http://codereview.qt.nokia.com/2641
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoQSslCertificate: deprecate alternateSubjectNames()
Peter Hartmann [Wed, 3 Aug 2011 16:36:55 +0000 (18:36 +0200)]
QSslCertificate: deprecate alternateSubjectNames()

... and add a new method subjectAlternativeNames() instead. This was
a typo in the API.

Change-Id: Id8704c387c9ff8e1af2b9a524ff628f5c053a294
Reviewed-on: http://codereview.qt.nokia.com/2618
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agotest: fixed tst_qundogroup and removed CONFIG+=insignificant_test
Rohan McGovern [Tue, 2 Aug 2011 02:35:01 +0000 (12:35 +1000)]
test: fixed tst_qundogroup and removed CONFIG+=insignificant_test

This test had an invalid circular dependency: the test is in qtbase, and
it depends on lrelease in qttools, which depends on qtbase.

Change the test to skip if lrelease is not available or not working.

Change-Id: I964ddaf9485a2afed5a1bd4f88d9bdccadf1cfca
Reviewed-on: http://codereview.qt.nokia.com/2472
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoSupport QImage and others in Wayland clipboard.
Laszlo Agocs [Thu, 4 Aug 2011 10:01:04 +0000 (13:01 +0300)]
Support QImage and others in Wayland clipboard.

The wayland plugin's clipboard implementation lacked support for data
set via QMimeData::setImageData, QClipboard::setPixmap, etc. because
everything was treated as a QByteArray. A variant having an image
cannot however be converted to a byte array. Therefore, to make these
convenience functions to work, the image is now encoded via
QImageWriter before sending it. On the receiving side QMimeData is
capable of decoding images from byte arrays, so no problem there.
The patch also renames an internal QWaylandMimeData class to a more
suitable clipboard-specific name as the functionality is clipboard
specific.

Change-Id: I77e7df903b8dbe9731613fdbb9693b2a37b05d18
Reviewed-on: http://codereview.qt.nokia.com/2616
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix the lifespan of the test CA cert used by the autotests.
Richard Moore [Tue, 2 Aug 2011 08:54:43 +0000 (10:54 +0200)]
Fix the lifespan of the test CA cert used by the autotests.

The test CA I used for the QSslCertificate autotests had a short
lifespan which meant that the tests now fail. See bug QTBUG-20582.
This change gives it a lifespan of 10 years matching the leaf
certificates.
In addition, remove the temporary QEXPECT_FAIL statements.

Change-Id: Ic1918e6e31f5cc755ec43d899663140ebe95a2a9
Merge-request: 37
Task-number: QTBUG-20582
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/2548
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoFix QString/QByteArray literals for MSVC2010 (compilation of tests).
Friedemann Kleint [Tue, 2 Aug 2011 13:58:48 +0000 (15:58 +0200)]
Fix QString/QByteArray literals for MSVC2010 (compilation of tests).

- Specify return type of QByteArrayLiteral/QStringLiteral lambdas.
- Define QT_UNICODE_LITERAL instead of QT_UNICODE_MARKER.

Change-Id: I8a53506887d2736b093798220b088f645f05e415
Reviewed-on: http://codereview.qt.nokia.com/2514
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agotest: mark tst_qtconcurrentfilter as insignificant on Linux
Rohan McGovern [Tue, 2 Aug 2011 06:41:47 +0000 (16:41 +1000)]
test: mark tst_qtconcurrentfilter as insignificant on Linux

This test fails pseudorandomly, which makes the result insignificant
for the purpose of detecting regressions.

Task-number: QTBUG-20688
Change-Id: I3274953841a553e35b4eb844702868f2f9ec0525
Reviewed-on: http://codereview.qt.nokia.com/2491
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: mark tst_qabstractnetworkcache as insignificant
Rohan McGovern [Tue, 2 Aug 2011 03:47:31 +0000 (13:47 +1000)]
test: mark tst_qabstractnetworkcache as insignificant

This test crashes pseudorandomly, which makes the result insignificant
for the purpose of detecting regressions.

Task-number: QTBUG-20686
Change-Id: I3079d935d46a4bcd2b119c2b9b452f0b69dccf21
Reviewed-on: http://codereview.qt.nokia.com/2479
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoMake failure messages from tst_QSslCertificate::verify much more useful
Rohan McGovern [Tue, 2 Aug 2011 07:06:34 +0000 (17:06 +1000)]
Make failure messages from tst_QSslCertificate::verify much more useful

Changes the failure message from the previously brief:

  '(errors.count() == 0)' returned FALSE.

To the vastly more useful:

  '(errors.count() == 0)' returned FALSE.
  (errors: [ "The certificate has expired" ])

Change-Id: I587cd8ddfd3c17e273220bc95691b3dc92390547
Reviewed-on: http://codereview.qt.nokia.com/2241
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoEliminate reference to Trolltech.
Jason McDonald [Tue, 2 Aug 2011 04:20:34 +0000 (14:20 +1000)]
Eliminate reference to Trolltech.

Task-number: QTBUG-19653

Change-Id: If3c822dd59ccbdd03037068acfe902ed9688a874
Reviewed-on: http://codereview.qt.nokia.com/2482
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotest: skip some tst_qtextscriptengine tests when fonts are missing
Rohan McGovern [Tue, 2 Aug 2011 01:35:01 +0000 (11:35 +1000)]
test: skip some tst_qtextscriptengine tests when fonts are missing

This autotest may fail depending on the version of fonts which are
installed on the system.  It has no way to verify if the correct fonts
are installed, and it's unclear from where the correct version of the
fonts may be obtained.

Therefore, disable the test by default unless the user has indicated
that they have a correct setup by setting QT_HAVE_TEST_FONTS=1.

Task-number: QTBUG-20682
Change-Id: I24174520f54af6a9b2c13c9c1347f46555bce3d4
Reviewed-on: http://codereview.qt.nokia.com/2469
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoIntroduced a CONFIG option that enables declarative debug services
Thorbjørn Lindeijer [Mon, 18 Apr 2011 15:20:49 +0000 (17:20 +0200)]
Introduced a CONFIG option that enables declarative debug services

This replaces the need for applications to explicitly make a call to
enable the debug services, and rather does it in declarative.h when the
'declarative_debug' CONFIG option is used.

Done-with: Kai Koehne
Reviewed-by: Martin Jones
Reviewed-by: Michael Brasser
(cherry-picked from commit 5517cc588c39814530b8bfd957821f55be42acf2)

Change-Id: If180d2b826879d6d02c7be4d3075917815ccf349
Reviewed-on: http://codereview.qt.nokia.com/2435
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agotest: remove CONFIG+=insignificant_test for tst_qgraphicstransform
Rohan McGovern [Mon, 1 Aug 2011 04:38:36 +0000 (14:38 +1000)]
test: remove CONFIG+=insignificant_test for tst_qgraphicstransform

This autotest failure is stable, so it should be marked with
QEXPECT_FAIL, not CONFIG+=insignificant_test.

Note that the test row naming had to be changed, as the test previously
created many rows of testdata with the same name, making it impossible
to skip only the broken rows.

Task-number: QTBUG-20661
Change-Id: Ie38f5dddafe7686e30eaa8ff3445310935d2cd9a
Reviewed-on: http://codereview.qt.nokia.com/2419
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agotest: fixed failure of tst_qicon
Rohan McGovern [Mon, 1 Aug 2011 06:44:09 +0000 (16:44 +1000)]
test: fixed failure of tst_qicon

This test unconditionally assumed that SVG support was available.
This is an invalid circular dependency: the test is in qtbase and
depends on qtsvg, which depends on qtbase.

Change the test so that it uses SVG support only if available.

Change-Id: Ia63ce74abdecd4bcf7a4e0714b8cb7c488e17495
Reviewed-on: http://codereview.qt.nokia.com/2426
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agotest: fixed crash of tst_qdialog and removed CONFIG+=insignificant_test
Rohan McGovern [Mon, 1 Aug 2011 23:13:38 +0000 (09:13 +1000)]
test: fixed crash of tst_qdialog and removed CONFIG+=insignificant_test

This test assumed that C++ exceptions could always be caught by the
event loop.  This is not the case when the Glib event loop is used.
Skip the relevant portion of the test in that case.

Change-Id: I6a6325c3590c810a5aba28ec98279581dcfaf55c
Reviewed-on: http://codereview.qt.nokia.com/2455
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: improved stability of tst_qiodevice on slow machines
Rohan McGovern [Mon, 1 Aug 2011 23:24:25 +0000 (09:24 +1000)]
test: improved stability of tst_qiodevice on slow machines

Increased network timeout from 5 to 30 seconds.

Change-Id: I4751dbfbb82c2091f1cec26150f06f913ffbe4c0
Reviewed-on: http://codereview.qt.nokia.com/2456
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: fixed tst_qimagereader and removed CONFIG+=insignificant_test
Rohan McGovern [Mon, 1 Aug 2011 23:44:09 +0000 (09:44 +1000)]
test: fixed tst_qimagereader and removed CONFIG+=insignificant_test

This test assumed that Qt's available image formats could be determined
at compile time.  This was never correct since the image formats are
loaded from plugins at runtime; in Qt5 it became a real problem since
one image format (svg) was moved out of qtbase into a separate module,
turning this into a circular dependency: this test in qtbase depends on
qtsvg, which depends on qtbase.

Always check the image formats at runtime instead.

Change-Id: I5e770c5b11276c39910e34f232a2fea0a7abaa8c
Reviewed-on: http://codereview.qt.nokia.com/2457
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: improved stability of tst_qwaitcondition
Rohan McGovern [Tue, 2 Aug 2011 00:22:08 +0000 (10:22 +1000)]
test: improved stability of tst_qwaitcondition

Increased thread wait timeout from 3 to 10 milliseconds, for slower or
heavily loaded machines.  (There was a previous attempt to improve
stability of this test some time ago by increasing the timeout from 1
to 3 milliseconds.)

Note that this increases the runtime of the wakeOne test from ~5 to ~14
seconds.

Change-Id: Ib556d4c949a6989fe71c11f5dc10feb2ec45c512
Reviewed-on: http://codereview.qt.nokia.com/2458
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: fixed tst_qmessagebox and removed CONFIG+=insignificant_test
Rohan McGovern [Tue, 2 Aug 2011 04:52:25 +0000 (14:52 +1000)]
test: fixed tst_qmessagebox and removed CONFIG+=insignificant_test

Removed some binary compatibility tests written specifically to test a
change introduced between Qt 4.1 and 4.2.  Qt 4 and 5 are not binary
compatible, the test no longer makes sense.

Change-Id: I3e8f9b6011105e504c20bedad51af8193b102552
Reviewed-on: http://codereview.qt.nokia.com/2464
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: fixed spelling errors in tst_qtextscriptengine
Rohan McGovern [Tue, 2 Aug 2011 01:12:47 +0000 (11:12 +1000)]
test: fixed spelling errors in tst_qtextscriptengine

couln't -> couldn't

Change-Id: I37e86ecea74db1114fcfac93423388fae81df63d
Reviewed-on: http://codereview.qt.nokia.com/2465
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agotest: replace CONFIG+=insignificant_test with QEXPECT_FAIL for tst_qftp
Rohan McGovern [Tue, 2 Aug 2011 04:46:15 +0000 (14:46 +1000)]
test: replace CONFIG+=insignificant_test with QEXPECT_FAIL for tst_qftp

This autotest failure is entirely stable, so QEXPECT_FAIL should be used
instead of insignificant_test.

Task-number: QTBUG-20687
Change-Id: I0444e725b436fe93d30cbe54edc673594ca9b9fe
Reviewed-on: http://codereview.qt.nokia.com/2486
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agotest: fixed tst_qfilesystemmodel and removed insignificant_test
Rohan McGovern [Mon, 1 Aug 2011 04:21:56 +0000 (14:21 +1000)]
test: fixed tst_qfilesystemmodel and removed insignificant_test

tst_qfilesystemmodel::sort uses some internal API to affect the sorting
behavior.  This means that part of the test must be disabled when
private symbols aren't available.

Change-Id: I2e7b9d7a33cb3e7032bc5380c03fa29ecc84e12c
Reviewed-on: http://codereview.qt.nokia.com/2413
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoFixed tst_qprocess, tst_qtcpserver when crashing is slow
Rohan McGovern [Mon, 1 Aug 2011 00:17:51 +0000 (10:17 +1000)]
Fixed tst_qprocess, tst_qtcpserver when crashing is slow

These tests assumed that a crashing program will always exit within
five seconds.  This is not true in some situations.  On our test macs,
enabling crash dumps can easily cause a process to take longer than
five seconds to crash.

Increased the timeout to 30 seconds.

Change-Id: Ifca240ac8d3da1346f33110653ac47de6ba2ab81
Reviewed-on: http://codereview.qt.nokia.com/2407
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoFix tst_qgraphicsview::task255529_transformationAnchorMouseAndViewportMargins
Olivier Goffart [Fri, 29 Jul 2011 08:44:30 +0000 (10:44 +0200)]
Fix tst_qgraphicsview::task255529_transformationAnchorMouseAndViewportMargins

If we do not process the event, q->underMouse may return false in
QGraphicsViewPrivate::centerView (as the QEvent::Enter has not been
received yet.)

It was working before if by luck, the window appears under the cursor.

Change-Id: I9b4497683eae20915680297013a9c21fd6275f4b
Reviewed-on: http://codereview.qt.nokia.com/2385
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoFix compilation with namespaced builds
Bradley T. Hughes [Fri, 29 Jul 2011 10:26:43 +0000 (12:26 +0200)]
Fix compilation with namespaced builds

Add QT_BEGIN_NAMESPACE and QT_END_NAMESPACE to src/corelib/tools/qfreelist.cpp

Change-Id: Ie01e74a3c2d9cd4de1f52a546d13398e1409c86b
Reviewed-on: http://codereview.qt.nokia.com/2390
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoSwitch to use floating point pixelSize in QRawFont completely
Jiang Jiang [Thu, 21 Jul 2011 13:09:24 +0000 (15:09 +0200)]
Switch to use floating point pixelSize in QRawFont completely

Reviewed-by: Eskil
(cherry picked from commit 500f8a4368be85a0ae8b7c46012deb0ab0c844ad)

Change-Id: I6cfebcbb68697c9bf7a5634e98a09a26928467d7
Reviewed-on: http://codereview.qt.nokia.com/2386
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoSimplify the mutexpool used in QObject.
Olivier Goffart [Tue, 26 Jul 2011 08:44:55 +0000 (10:44 +0200)]
Simplify the mutexpool used in QObject.

Since we now have QBasicMutex as a POD, we can simplify the mutexpool.
This remove the call the the Q_GLOBAL_STATIC and some others tests that
are taking CPU cycles when activating a signal.

The QMutexPool class itself can't be simplified because its mutex are
recursive mutexes, and the size is dynamic. also it is harder to get all
the mutexes initialized to 0.

Change-Id: Ie781655635907d2ad620eb189099cba14638414f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/2171
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
12 years agoQMutex is now just a pointer
Olivier Goffart [Sat, 2 Jul 2011 13:13:12 +0000 (15:13 +0200)]
QMutex is now just a pointer

And added a POD QBasicMutex. (QBasicMutex* can safely be
static_cast'ed to QMutex*)

The d pointer is not anymore always a QMutexPrivate.

If d == 0x0: the mutex is unlocked
If d == 0x1: the mutex is locked, uncontended

On linux:
if d == 0x3: the mutex is locked contended, waiting on a futex
If d is a pointer, it is a recursive mutex.

On non-linux platforms:
When a thread tries to lock a mutex for which d == 0x1, it will try to
assing it a QMutexPrivated (allocated from a freelist) in order to wait
for it.

Change-Id: Ie1431cd9402a576fdd9a693cfd747166eebf5622
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/2116
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
12 years agoFix off-by-one error in binary search
Jiang Jiang [Thu, 28 Jul 2011 12:51:54 +0000 (14:51 +0200)]
Fix off-by-one error in binary search

This one-line change makes the binary search in QTextEngine::findItem
behave consistently with the linear search that it replaced in commit
acf678e57ed088f3e56a551cac6c7c3322005750. The new behavior seems to
cause crashes in kword (and perhaps other applications) by triggering a
logClusters assert, although I have been unable to create a unit test
that reproduces this.

Task-number: QTBUG-17209
Done-by: Dr. Robert Marmorstein <robert@narnia.homeunix.com>
Change-Id: I68b79f024e9836e1cc8b0f3514889120541eb2ea
Reviewed-on: http://codereview.qt.nokia.com/2343
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoFlag meta objects generated by QtDBus
Aaron Kennedy [Fri, 29 Jul 2011 03:03:52 +0000 (13:03 +1000)]
Flag meta objects generated by QtDBus

QtDBus requires a QVariant argument to be passed to property reads and
writes.  For performance reasons QtDeclarative does not do this.  By
flagging the meta object as requiring this, QtDeclarative can do so only
required.

Task-number: QTBUG-15052

Change-Id: I032c946f079523f5f10217ed56642fb315265d9f
Reviewed-on: http://codereview.qt.nokia.com/2365
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd notify signals for QIntvalidator, QDoubleValidator, QRegExpValidator
Charles Yin [Tue, 26 Jul 2011 03:46:54 +0000 (13:46 +1000)]
Add notify signals for QIntvalidator, QDoubleValidator, QRegExpValidator

Task-number:QTBUG-19956
Change-Id: I5ab5e4494189ece5b0eb1f63e73e49cb2c4e9656
Reviewed-by:Michael Brasser
Reviewed-on: http://codereview.qt.nokia.com/2147
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
12 years agoMake it possible to update a related table after an external update
Andy Shaw [Fri, 3 Jun 2011 06:17:40 +0000 (08:17 +0200)]
Make it possible to update a related table after an external update

When a table that is related to in a QSqlRelationalTableModel gets
updated in some way (e.g. a new row, or the data is changed) then the
related model could not be updated without recreating the
QSqlRelationalTableModel.

Now, to get around this, select() can be called on the related model to
get it to be updated.

Task-number: QTBUG-7885
Reviewed-by: Charles Yin
Reviewed-by: Michael Goddard
Change-Id: Ic589e840234f3a809bcb112a807a87afe0bc25ca
(cherry picked from commit 2c60a4f67f9fb02f3b711fe749b2f293a07b4e02)
Reviewed-on: http://codereview.qt.nokia.com/2224
Reviewed-by: Charles Yin <charles.yin@nokia.com>
12 years agoAdded meta type info for Q[Explicitly]SharedDataPointer
Denis Dzyubenko [Mon, 25 Jul 2011 12:38:24 +0000 (14:38 +0200)]
Added meta type info for Q[Explicitly]SharedDataPointer

Change-Id: I1269630ae5154f7318e1c7ae9fa2014a15234bf4
Reviewed-on: http://codereview.qt.nokia.com/2110
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
12 years agoGet rid of compiler warnings with MSVC
Olivier Goffart [Wed, 27 Jul 2011 17:01:15 +0000 (19:01 +0200)]
Get rid of compiler warnings with MSVC

Change-Id: Ibd027c502a5b8bcbfc6dae71c4f244f1080d4064
Reviewed-on: http://codereview.qt.nokia.com/2303
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoEmit selectionChanged signals when input method alters selection.
Andrew den Exter [Mon, 25 Jul 2011 06:58:46 +0000 (16:58 +1000)]
Emit selectionChanged signals when input method alters selection.

Mark the selection as dirty if an input method event contains a
selection and emit selectionChanged() if it's not emitted by
finishChange().

Task-number: QTBUG-19731

Change-Id: Ief6f06f40071f64dae4db0ba365676c059a39c7e
Reviewed-on: http://codereview.qt.nokia.com/2081
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoFix typo in padnavigator example docs
Jason McDonald [Tue, 26 Jul 2011 05:22:37 +0000 (15:22 +1000)]
Fix typo in padnavigator example docs

Change-Id: Ifde02273107441add4eb77d8fc092eac2cc2c798
Reviewed-on: http://codereview.qt.nokia.com/2150
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix obsolete contact email
Jason McDonald [Tue, 26 Jul 2011 06:11:03 +0000 (16:11 +1000)]
Fix obsolete contact email

Replace the old Trolltech contact email address with the current Qt
contact email address.

Task-number: QTBUG-20370
Change-Id: If5b9c3a044e1ee46264548eea456c704ced8e363
Reviewed-on: http://codereview.qt.nokia.com/2153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoconfigure: fixed setting of CFG_MAC_ARCHS for mac qpa builds
Rohan McGovern [Thu, 28 Jul 2011 01:48:28 +0000 (11:48 +1000)]
configure: fixed setting of CFG_MAC_ARCHS for mac qpa builds

Previously, the mac arch was only put into qconfig.pri for carbon
and cocoa builds.  Make sure it is also available for qpa builds.
This is needed for projects which need to select architecture-specific
sources in their .pro file.

Change-Id: I5f72e3b699b11dafc4dae052620913f2b9b81d0a
Reviewed-on: http://codereview.qt.nokia.com/2313
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoMark tst_qsslcertificate::verify with QEXPECT_FAIL
Rohan McGovern [Wed, 27 Jul 2011 22:41:50 +0000 (08:41 +1000)]
Mark tst_qsslcertificate::verify with QEXPECT_FAIL

Test started to fail, complains about outdated SSL certificate.

Task-number: QTBUG-20582
Change-Id: I2622375d9bc7b446dbbc18f72403896c60a8dee1
Reviewed-on: http://codereview.qt.nokia.com/2307
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
12 years agoRevert "test: unmark tst_QWidget::getSetCheck() as "insignificant" for Linux"
Michael Goddard [Tue, 26 Jul 2011 10:10:01 +0000 (12:10 +0200)]
Revert "test: unmark tst_QWidget::getSetCheck() as "insignificant" for Linux"

This reverts commit 33cb4ff4d45ddf389a7c676b36ddaf45f20b2f37

Test still seems unstable :(

Change-Id: I20d9c393e1553abba2a335532bee4e3ba716d8ce
Reviewed-on: http://codereview.qt.nokia.com/2179
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
12 years agoTry to make sure the config test script is installed.
Michael Goddard [Mon, 25 Jul 2011 12:07:54 +0000 (22:07 +1000)]
Try to make sure the config test script is installed.

And try to fail a bit more gracefully if it isn't.

Change-Id: I62e01c0536aa0a032940d6a9a5ccf5edcfeef221
Reviewed-on: http://codereview.qt.nokia.com/2109
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
12 years agoTighten up the config test success checking.
Michael Goddard [Mon, 25 Jul 2011 00:10:54 +0000 (10:10 +1000)]
Tighten up the config test success checking.

Try a lot harder to remove the old $TARGET output, since make
clean isn't sufficient.  Also fix a bug in program invocation
that was hidden because of the stale files.

Change-Id: I0a365409d81efb74c5836eaf9f129fd9b2cca77e
Reviewed-on: http://codereview.qt.nokia.com/2052
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUse QFreeList for timer id allocation
Bradley T. Hughes [Tue, 19 Jul 2011 14:27:42 +0000 (16:27 +0200)]
Use QFreeList for timer id allocation

The timer id allocator doesn't need a paylod (hence T=void), but we want
to tune the allocation 'strategy.' We allocate a maximum of 6 blocks
(like before), but the first block is twice as large as before and is
not static writable anymore. The initial value is 1 (0 is not a valid
timer id), but otherwise the constants are the same as the defaults.

Change-Id: Ied49ff4d7a6a8d69bc8c7bfa5475e4111446659f
Reviewed-on: http://codereview.qt.nokia.com/2161
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
12 years agoAdd QFreeList as an internal class
Bradley T. Hughes [Tue, 19 Jul 2011 13:53:32 +0000 (15:53 +0200)]
Add QFreeList as an internal class

This is a generic implementation of the lock-free free list found in
qabstracteventdispatcher.cpp. Use next() to get the next free entry in
the list, and release(id) when done with the id.

This version is templated and allows having a payload which can be
accessed using the id returned by next(). The payload is allocated and
deallocated automatically by the free list, but *NOT* when calling
next()/release(). Initialization should be done by code needing it after
next() returns. Likewise, cleanup should happen before calling
release(). It is possible to have use 'void' as the payload type, in
which case the free list only contains indexes to the next free entry.

Autotest included.

Change-Id: Ifd12a961d47f3d76593c45061f72e55c9b80a43b
Reviewed-on: http://codereview.qt.nokia.com/2160
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
12 years agoMake QTabWidget::tabBar() public.
David Faure [Tue, 26 Jul 2011 09:40:18 +0000 (11:40 +0200)]
Make QTabWidget::tabBar() public.

This is very much useful to be able to write things like
myTabWidget->tabBar()->setSelectionBehaviorOnRemove( QTabBar::SelectPreviousTab );
without subclassing QTabWidget.

Change-Id: Ic7c42709ea1086631d37f90f184b058c4b6e9601
Merge-request: 3
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/2172
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoWindows: fixed qtmain.lib not going to `lib' directory
Rohan McGovern [Tue, 26 Jul 2011 00:06:45 +0000 (10:06 +1000)]
Windows: fixed qtmain.lib not going to `lib' directory

`load(qt_module_config)' clobbers DESTDIR.
Rearrange the order so that our setting of DESTDIR works as intended.

Change-Id: Id6f02e9fb55069fae9b2a75c9d0f51578b84f4d1
Reviewed-on: http://codereview.qt.nokia.com/2130
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
12 years agoImprove doc to avoid row vs col major confusion.
Sarah Smith [Mon, 25 Jul 2011 04:38:08 +0000 (14:38 +1000)]
Improve doc to avoid row vs col major confusion.

There has been a few reports of user confusion from the fact that the
constData and data functions return results in column-major format.
There is nothing in the doc anywhere that states this, and nothing
states that the class is especially for OpenGL which would give a clue
at least.

Change-Id: I3a9afde0fbeb8b9d2bcba6a387620b60a56774b9
Reviewed-on: http://codereview.qt.nokia.com/2066
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Julian de Bhal <julian.debhal@nokia.com>
12 years agoEmit selectionChanged signals when input method alters the selection.
Andrew den Exter [Mon, 25 Jul 2011 05:48:01 +0000 (15:48 +1000)]
Emit selectionChanged signals when input method alters the selection.

Check if the input method removes the selection and force emit
selectionChanged if it sets a new selection.

Task-number: QTBUG-19727
Reviewed-by: Martin Jones
Change-Id: Ic8ea1044d0917aac4e52368f431ac9e5c7db7c56
Reviewed-on: http://codereview.qt.nokia.com/2076
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agoUpdate cursor position when selection is reversed.
Andrew den Exter [Mon, 25 Jul 2011 06:28:07 +0000 (16:28 +1000)]
Update cursor position when selection is reversed.

A reversed selection will have the same resolved start and end
positions but a different cursor position so testing the end points
alone doesn't guarantee the selection is the same.

Task-number: QTBUG-19456
Reviewed-by: Martin Jones
Change-Id: I516e5a501ec878d673f21e54d688fd2d21b624ef
Reviewed-on: http://codereview.qt.nokia.com/2080
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
12 years agotest: unmark tst_QWidget::getSetCheck() as "insignificant" for Linux
Sergio Ahumada [Mon, 25 Jul 2011 18:32:45 +0000 (20:32 +0200)]
test: unmark tst_QWidget::getSetCheck() as "insignificant" for Linux

Change-Id: I86570148f1fcbf2932c6314b0a6c666c02a3554f
Reviewed-on: http://codereview.qt.nokia.com/2127
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoAdd the missing function in bootstrap
Olivier Goffart [Mon, 25 Jul 2011 11:12:00 +0000 (13:12 +0200)]
Add the missing function in bootstrap

(required for the metatype changes)

Change-Id: I0e3c73e7828493b4f03ec6439ec80b1c8c2bf377
Reviewed-on: http://codereview.qt.nokia.com/2105
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agotestlib: fix include of `qttestversion.h' in testlib.pro
Sergio Ahumada [Sun, 24 Jul 2011 14:10:33 +0000 (16:10 +0200)]
testlib: fix include of `qttestversion.h' in testlib.pro

The actual file defined in `sync.profile' and generated
by 'syncqt' is `qttestversion.h' instead of `qttestlibversion.h'

Change-Id: I90ed2d5b7cd9f98855a878c97afceced01e7e8b0
Reviewed-on: http://codereview.qt.nokia.com/2050
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd initial support for bitmap version 4/5 headers.
Ilya Konkov [Fri, 22 Jul 2011 11:25:46 +0000 (13:25 +0200)]
Add initial support for bitmap version 4/5 headers.

The headers are just skipped, information stored in them is ignored.

Merge-request: 824

Change-Id: I48f37757114ed83cd5c92cb3d5a43eeaca4b91b3
Reviewed-on: http://codereview.qt.nokia.com/2108
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoChanged QLibrary::resolve() to return a function pointer.
Kim Motoyoshi Kalland [Thu, 21 Jul 2011 16:47:26 +0000 (18:47 +0200)]
Changed QLibrary::resolve() to return a function pointer.

According to the C++ standard, there is no guarantee that
you can cast between function pointers and void pointers
without data loss (section 5.2.10-6).

Change-Id: I27f4d835e4c8ca8ecca0d76cfea9ce34491956bd
Reviewed-on: http://codereview.qt.nokia.com/1995
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoMaking cached glyphs drawing check clearer
Jiang Jiang [Mon, 25 Jul 2011 08:52:48 +0000 (10:52 +0200)]
Making cached glyphs drawing check clearer

Putting the logic inside supportsTransformation() is a bit confusing and
that name is misleading.

Also move the same check in GL2 paint engine to the same place.

Change-Id: I182500a0ff375122e6be966b7ce2495c84d113d0
Reviewed-on: http://codereview.qt.nokia.com/2096
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoDelay masking the last character in Password echo mode.
Andrew den Exter [Mon, 25 Jul 2011 03:25:15 +0000 (13:25 +1000)]
Delay masking the last character in Password echo mode.

If QT_GUI_PASSWORD_ECHO_DELAY is defined in qplatformdefs.h with an
integer value in milliseconds, QLineEdit and TextInput will display
the last character entered unmasked for that delay period and then
mask the character as normal.  If QT_GUI_PASSWORD_ECHO_DELAY is
not defined then the behaviour is unchanged.

Task-number: QTBUG-17003
Reviewed-by: Martin Jones
(cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971)

Conflicts:

src/declarative/graphicsitems/qdeclarativetextinput.cpp
tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp

Change-Id: I3683223189b7176e4ef5081ee315c95a0efb9cfe
Reviewed-on: http://codereview.qt.nokia.com/2060
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
13 years agoUse QUuid::toByteArray() instead of QUuid::toString().toAscii()
liangqi [Fri, 22 Jul 2011 12:19:44 +0000 (14:19 +0200)]
Use QUuid::toByteArray() instead of QUuid::toString().toAscii()

This is a cheaper way.

Change-Id: Ibfc67e0ac46a77e95b2ef32cd6f28c7409c42d63
Reviewed-on: http://codereview.qt.nokia.com/2037
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoAdd rudimentary config.test support when configuring modules.
Michael Goddard [Thu, 30 Jun 2011 04:51:16 +0000 (14:51 +1000)]
Add rudimentary config.test support when configuring modules.

An extra script is added (qtmodule-configtests) which is currently
invoked from syncqt (with some derived parameters passed to it).

The module can optionally have an entry in the module's sync.profile
file in the form of a perl map of "test name" => parameters.  Tests
can print an advisory message if they fail (e.g. "Install this
SDK/dev package"), or abort the syncqt process (e.g. mandatory
prereq missing).  Also, if the test has a "requires(foo)" line
that results in it being skipped, this is also supported.

Change-Id: Ic3c820a488a0992c944994d4d7dc283da36742d6
Reviewed-on: http://codereview.qt.nokia.com/928
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoQAbstractConcatenable::convertFromAscii: make len the actual length
Olivier Goffart [Thu, 21 Jul 2011 14:39:55 +0000 (16:39 +0200)]
QAbstractConcatenable::convertFromAscii: make len the actual length

Before, it was the length + 1, to include the ending \0 (for historical
reasons)
Having it the actual length is more intuitive and less error prone

Also added QT_ASCII_CAST_WARN to QConcatenable<QByteArray>::appendTo
to show the warnig that convertion from ascii to qstring occurs.

Change-Id: Ie7c8552b6b4e7ccb393cb09f5f0ca9b00336c714
Reviewed-by: thiago
Reviewed-on: http://codereview.qt.nokia.com/1988
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoremove Qt3 leftovers
Ritt Konstantin [Thu, 21 Jul 2011 08:20:06 +0000 (10:20 +0200)]
remove Qt3 leftovers

Merge-request: 22
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Change-Id: I5d25fb05894d9baa645f97946e1f9aaa1622c876
Reviewed-on: http://codereview.qt.nokia.com/1925
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoOptimize QMetaObject::property().
Martin Jones [Fri, 22 Jul 2011 01:02:19 +0000 (11:02 +1000)]
Optimize QMetaObject::property().

Avoid using QByteArray.

Change-Id: I7216bc88efdd6e4e57d84b8c45e7c38119dc7092
Reviewed-on: http://codereview.qt.nokia.com/2000
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
13 years agoAdd unit tests to QStringLiteral and QByteArrayLiteral with operator %
Thiago Macieira [Thu, 21 Jul 2011 14:33:40 +0000 (16:33 +0200)]
Add unit tests to QStringLiteral and QByteArrayLiteral with operator %

This requires a fix for QByteArrayLiteral to work too.

Change-Id: I3c2a50ad431d5b0c014a341e675fa54e7b206e70
Merge-request: 27
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1967
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
13 years agoSilence expected warnings from QObject::connect()/disconnect()
David Faure [Thu, 21 Jul 2011 14:56:56 +0000 (16:56 +0200)]
Silence expected warnings from QObject::connect()/disconnect()

Merge-request: 4
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Change-Id: Ibee937140d0d81377c6adf74fce7856c4655b924
Reviewed-on: http://codereview.qt.nokia.com/1990
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoFix the timeout calculation again.
Thiago Macieira [Thu, 21 Jul 2011 15:10:30 +0000 (17:10 +0200)]
Fix the timeout calculation again.

The commit 412ef92162f8874a1585221125c31ef5f8ccc9cb introduced a fix, but the
fix was incomplete. Fix it for good.

Change-Id: I3e7fbdb294f8e960fbbf2e830790750240ed813a
Merge-request: 30
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/1991
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
13 years agotest: unmark tst_QNetworkAddressEntry::prefixAndNetmask as "insignificant"
Sergio Ahumada [Thu, 21 Jul 2011 19:04:32 +0000 (21:04 +0200)]
test: unmark tst_QNetworkAddressEntry::prefixAndNetmask as "insignificant"

It was fixed by cfbdb4cc8a3a1f9e0036ec387cbc00d2058ee6e7

Change-Id: I2cd1216235c77c6f2521a6d899e81e7e442758cd
Reviewed-on: http://codereview.qt.nokia.com/1997
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoPrefix each output line with the library being processed
Marius Storm-Olsen [Thu, 7 Jul 2011 18:48:02 +0000 (18:48 +0000)]
Prefix each output line with the library being processed

Makes it easier to track which library output is coming from,
when building Qt with -j > 1.

Change-Id: I9acda04e84014dc441e409a0b24b2f78762dcc1c
Reviewed-on: http://codereview.qt.nokia.com/1765
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
13 years agoMake syncqt output more compact by default, and add verbosity level
Marius Storm-Olsen [Thu, 7 Jul 2011 18:05:49 +0000 (18:05 +0000)]
Make syncqt output more compact by default, and add verbosity level

By default, syncqt will now compress the console output of what it's
doing. Increasing the verbosity level will make syncqt output the same
as before

Change-Id: I542072504f022f87997b4036eda5747a5da88839
Reviewed-on: http://codereview.qt.nokia.com/1764
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoClose filehandle when done
Marius Storm-Olsen [Mon, 18 Jul 2011 12:08:12 +0000 (07:08 -0500)]
Close filehandle when done

Also add a fixme, since the version headers are currently
being created in the source directory.

Change-Id: If6e9eeba854a1f35561b69518eb8739dc28a58be
Reviewed-on: http://codereview.qt.nokia.com/1763
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
13 years agoMake sure we qtPrepareTool moc, uic and rcc too
Marius Storm-Olsen [Tue, 12 Jul 2011 18:01:03 +0000 (13:01 -0500)]
Make sure we qtPrepareTool moc, uic and rcc too

Their paths may vary depending on configuration and
build/install state going forward.

Change-Id: I60c8bcd1dc6c2fb729bf84d211875a3d910d5e4a
Reviewed-on: http://codereview.qt.nokia.com/1761
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoFix non-installed library detection
Marius Storm-Olsen [Tue, 12 Jul 2011 18:19:01 +0000 (13:19 -0500)]
Fix non-installed library detection

Change-Id: I1eb8337bebb524b9f02aef63cd42efcb4a9211bc
Reviewed-on: http://codereview.qt.nokia.com/1759
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoMake sure we only run syncqt for the non-buildpass cases
Marius Storm-Olsen [Sat, 16 Jul 2011 12:13:16 +0000 (07:13 -0500)]
Make sure we only run syncqt for the non-buildpass cases

In debug_and_release builds, we have three passes, the glue
pass, and a pass for each build type. We only need to run
syncqt when we are in a glue pass, which is when
'build_pass' is not set. In non-debug_and_release builds,
build_pass is never set, so this condition works for all
build types, with multiple configurations or not.

Change-Id: I191da0df3ad422bb5fb8994391c2b2d2e23efc32
Reviewed-on: http://codereview.qt.nokia.com/1717
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>