profile/ivi/qtbase.git
12 years agoCocoa: Accept mouse clicks that activates windows.
Morten Johan Sorvig [Fri, 16 Dec 2011 13:32:47 +0000 (14:32 +0100)]
Cocoa: Accept mouse clicks that activates windows.

Events for mouse clicks that active windows are by
default suppressed. Qt needs to see all events in
order to properly close popup windows.

Wether or not the event should be sent to the
target needs to be implemented later on - in the
QWidget world this is controlled by WA_MacNoClickThrough

Change-Id: I4b96d33978ed2b3cb793f52bb5b6fef234190a00
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMove proxy and selection models to QtCore.
Stephen Kelly [Sat, 10 Dec 2011 18:13:51 +0000 (19:13 +0100)]
Move proxy and selection models to QtCore.

Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQNetworkAccessManager: delay IPv4 connection with Happy Eyeballs
Martin Petersson [Fri, 16 Dec 2011 09:44:24 +0000 (10:44 +0100)]
QNetworkAccessManager: delay IPv4 connection with Happy Eyeballs

Incase we have both IPv4 and IPv6 available after the host lookup
we should delay the connection attempt to IPv4.

Task-number: QTBUG-23066
Change-Id: I8c0177cf125c9daae314ada73cacef790a39b856
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoAvoid qDebug in verbose benchmark test output.
Jason McDonald [Thu, 15 Dec 2011 07:17:12 +0000 (17:17 +1000)]
Avoid qDebug in verbose benchmark test output.

Use QTestLog::info() rather than qDebug() to output informational
messages from testlib.  Source file and line are deliberately omitted as
they would come from testlib rather than from a test program.

Change-Id: I7b479bba4d3d553c6fa846d8d5ea2c29a8ef42b8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSwitch off signal dumper when testing is completed.
Jason McDonald [Thu, 15 Dec 2011 05:03:08 +0000 (15:03 +1000)]
Switch off signal dumper when testing is completed.

Previously, if the signal dumper was switched on with the -vs
command-line switch, it would never be switched off again.

Change-Id: I192e188010471525723fad0844ff33e9482128ea
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImproved path filling performance in the raster paint engine.
Kim Motoyoshi Kalland [Mon, 12 Dec 2011 11:57:08 +0000 (12:57 +0100)]
Improved path filling performance in the raster paint engine.

Convert bezier curves to polylines before rasterizing with gray
raster.

Change-Id: I353debd4338f2a3ce2fa1cfa1bff9dd2e36f05ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoCocoa: Update geometry on window move.
Morten Johan Sorvig [Wed, 14 Dec 2011 11:05:56 +0000 (12:05 +0100)]
Cocoa: Update geometry on window move.

Call [QNSView updateGeometry] directly. We can't
got through the frameDidChange notification since
we are not actually changing the QNSView frame.

Rename frameDidChangeNotification -> updateGeometry
sine it now handles updates from two different sources.

Change-Id: I848e558294093cd51d97778734b5cf872435266a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Don't set window size in propagateSizeHints
Morten Johan Sorvig [Wed, 14 Dec 2011 10:19:33 +0000 (11:19 +0100)]
Cocoa: Don't set window size in propagateSizeHints

Unless QWindow:baseSize returns a valid value.
Setting the size caused lots of window geometry
instability in Creator.

Change-Id: Iab45e88b47207db900c7655c217959391d84a1bb
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Add version check for convertRectToScreen.
Morten Johan Sorvig [Mon, 12 Dec 2011 09:32:03 +0000 (10:32 +0100)]
Cocoa: Add version check for convertRectToScreen.

convertRectToScreen was added in 10.7, use
convertBaseToScreen on 10.6

Change-Id: Ica1ee0f62e1fc9b0d5ccf463419496684da779b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQTestlib-Selftest: Add initTestCase() setting the directory.
Friedemann Kleint [Tue, 13 Dec 2011 16:08:45 +0000 (17:08 +0100)]
QTestlib-Selftest: Add initTestCase() setting the directory.

Required for launching the sub-processes. The test worked only
when launched locally, not from 'make check'.

Change-Id: I42c9202a7726c3135f94445fb336b2b8241535a4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRename QEventDispatcherQPA to QUnixEventDispatcherQPA.
Robin Burchell [Sat, 10 Dec 2011 16:24:14 +0000 (17:24 +0100)]
Rename QEventDispatcherQPA to QUnixEventDispatcherQPA.

This removes confusion when we add a Linux-specific QPA dispatcher, and is
technically more accurate, as QEDQPA was not 'the' QPA event dispatcher in the
first place.

Change-Id: I2a41d425f284522ee76ef86782d5eb2bdd805120
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMerge integrity support into unix.
Robin Burchell [Sat, 10 Dec 2011 15:01:05 +0000 (16:01 +0100)]
Merge integrity support into unix.

Since integrity was pulling in all the same code (except the glib-in-QT_CONFIG
branch), we can just merge this in.

This shouldn't break integrity unless they somehow magically inject glib into
QT_CONFIG without actually having glib, but the removal of redundancy makes this
worthwhile.

Change-Id: I527b5e60bea4452fdca5eedfe729214f16519234
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoQLocalSocket/Win: eliminate checkReadyRead()
Joerg Bornemann [Tue, 13 Dec 2011 11:22:40 +0000 (12:22 +0100)]
QLocalSocket/Win: eliminate checkReadyRead()

Change-Id: I459c0ba42d3e5b0da57884f5cdfc6f44a11600f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQLocalSocket/Win: make emitReadyRead timer persistent
Joerg Bornemann [Tue, 13 Dec 2011 11:09:45 +0000 (12:09 +0100)]
QLocalSocket/Win: make emitReadyRead timer persistent

This saves us from creating a single shot timer every time we emit
readyRead and eliminates the parallel pendingReadyRead flag.

Done-with: ossi

Change-Id: I1de7f07b83b583b9d60dd8862d6a9f7865b5b891
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQLocalSocket/Win: fix behaviour on broken pipe
Joerg Bornemann [Wed, 14 Dec 2011 13:44:08 +0000 (14:44 +0100)]
QLocalSocket/Win: fix behaviour on broken pipe

We must not close the QIODevice, if we detect a broken pipe.
We still can have data in our read buffer that can be read by the user.

Autotest: tst_QLocalSocket::threadedConnection

Change-Id: Ibe823c006516acb27f51a06ca0bbe5555dbd88f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove Symbian support from /src/corelib/kernel/.
Robin Burchell [Sat, 10 Dec 2011 15:00:15 +0000 (16:00 +0100)]
Remove Symbian support from /src/corelib/kernel/.

Change-Id: Ic4a1b4f074d2ffd4cdfcb44e47c9bfccc2378760
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoQHeaderView - remove stupid if
Thorbjørn Lund Martsum [Thu, 15 Dec 2011 06:32:15 +0000 (07:32 +0100)]
QHeaderView - remove stupid if

Not only is this extra if unnecesary - it is confusing.
oldSize is different from size.
(otherwise we would have returned less than 10 lines above)

Change-Id: Ie911414f679df2be7b5c8bc2670225d46e986b32
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agofix QMutex warning in tst_QLocalSocket::threadedConnection
Joerg Bornemann [Tue, 13 Dec 2011 16:04:32 +0000 (17:04 +0100)]
fix QMutex warning in tst_QLocalSocket::threadedConnection

Change-Id: I5728af1944e44bd976e51d4f0c0a923deacbeea0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQHeaderView - no big update work if updates are disabled
Thorbjørn Lund Martsum [Wed, 14 Dec 2011 20:26:49 +0000 (21:26 +0100)]
QHeaderView - no big update work if updates are disabled

There is no reason to find out where to update the headerview
if updates aren't enabled.  Another approch I considered to skip the
whole calculation and just call update. I seriosly doubt that this
calculation and update of a particular QHeaderView rect will normally(*)
be faster than just updating everything.

However to be safe I have done the conservative fix.

(*) Normally but with many/fragmented spans in the headerview.

Change-Id: Ia812a747ee825653db0345cdc34f9d2f7155ea01
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoSplit timer handling out of QEventDispatcherUnix.
Robin Burchell [Tue, 25 Oct 2011 07:51:19 +0000 (09:51 +0200)]
Split timer handling out of QEventDispatcherUnix.

This makes it easier to see the guts of the unix event dispatcher, and to
experiment with it.

Change-Id: I715bb68c4de6798e10bc55304a128b88e0249c63
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoRemove unused ownObjectName field from QObjectData
Bradley T. Hughes [Tue, 13 Dec 2011 12:16:09 +0000 (13:16 +0100)]
Remove unused ownObjectName field from QObjectData

This field isn't used at all in qtbase, nor in any of the qt5
submodules.

Change-Id: If57d389935593f797818506a220c6a3cc04b6078
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove QT_JAMBI_BUILD code
Bradley T. Hughes [Tue, 13 Dec 2011 12:15:28 +0000 (13:15 +0100)]
Remove QT_JAMBI_BUILD code

Change-Id: Ic9231b11293af4352f11cf075893175f0c9a471f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCorrect sizeof(QObjectData) after out-of-order cherry-picks by Gerrit
Bradley T. Hughes [Tue, 13 Dec 2011 11:51:06 +0000 (12:51 +0100)]
Correct sizeof(QObjectData) after out-of-order cherry-picks by Gerrit

Commits a6ae75f92a8628c727a9c5a9961fa91c583c008e and
6f0f9f69288925ef423c542ef5eb7302a5431867 were cherry-picked in the wrong
order (despite the dependencies shown in Gerrit), causing the
QObjectData::unused bitfield to be too large.

Change-Id: I65acaa8b507f7f6f2c5735f45bd0ad8343abea54
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove Qt5 comment from qsignalspy.h.
Jason McDonald [Thu, 15 Dec 2011 04:04:50 +0000 (14:04 +1000)]
Remove Qt5 comment from qsignalspy.h.

The removed comment refers to a task in a bug tracker that no longer
exists.  The comment also mentions making (part of) testlib use Qt's
regular binary compatibility mechanisms, which is desirable in the long
term but not in scope for Qt 5.

Change-Id: I6f23a9a2c8a84e30afe2aeb5c53ea93c25ba6f11
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix incorrect function name in assertion.
Jason McDonald [Thu, 15 Dec 2011 03:52:56 +0000 (13:52 +1000)]
Fix incorrect function name in assertion.

Change-Id: I3eb8e7afe3f7ca514dd4839e603612b56c7d8082
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove QTest::qt_snprintf() from testlib API.
Jason McDonald [Mon, 12 Dec 2011 02:43:18 +0000 (12:43 +1000)]
Remove QTest::qt_snprintf() from testlib API.

This was an internal function that used to act like qsnprintf() but also
filtered unprintable characters out of the test output.  The filtering
has been moved somewhere more appropriate and this function is no longer
used by testlib.

Unfortunately, the function was exposed in the public API due to its
former use in the implementation of a public macro.

In the unlikely event that any code outside testlib calls this function,
the call should be replaced by calling qsnprintf(), which comes from the
QtCore/QByteArray header.

Change-Id: Iddc17b4361d16ebddd19346ae7d1064951dd7738
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix typos in QObject::(dis)connect warnings
Giuseppe D'Angelo [Wed, 14 Dec 2011 23:35:12 +0000 (23:35 +0000)]
Fix typos in QObject::(dis)connect warnings

For some strange reason "Object::method ..." was printed, without
the leading Q.

Change-Id: I10b99e8aa8730e4020d15b3e04a01004bade76c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix qimagereader, qmovie and qmake unittest to work in shadow build.
Kurt Korbatits [Wed, 14 Dec 2011 23:34:50 +0000 (09:34 +1000)]
Fix qimagereader, qmovie and qmake unittest to work in shadow build.

Changed to use QFINDTESTDATA and TESTDATA.

Change-Id: I8684bc191cf8ffb8b531456e32047d582ebc018c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoApplication-test: Fix location of sub-executables.
Friedemann Kleint [Wed, 14 Dec 2011 08:27:33 +0000 (09:27 +0100)]
Application-test: Fix location of sub-executables.

Use QFINDTESTDATA to set the working directory
and change the profiles accordingly (as in
the qprocess-test).

Change-Id: I332038728c64214f73ced448e1466ad96c11b3b3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove QTest::keyClick documentation.
Jason McDonald [Wed, 14 Dec 2011 07:54:13 +0000 (17:54 +1000)]
Improve QTest::keyClick documentation.

Make it clear that the delay is applied before each key-click is
simulated.

Change-Id: Id100f1f2db1a5b1651c3046905719d7eb06ec1a0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUpdate documentation of QTEST_MAIN macro.
Jason McDonald [Wed, 14 Dec 2011 07:31:15 +0000 (17:31 +1000)]
Update documentation of QTEST_MAIN macro.

Update the docs to describe the behaviour that resulted from moving the
traditional Qt widgets into a separate library from the rest of GUI
classes.

Change-Id: Ibd0ef05cc871b8f5a6700e421aa41bdf64c1210b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove QCOMPARE for QStringList
Jason McDonald [Wed, 14 Dec 2011 06:36:10 +0000 (16:36 +1000)]
Improve QCOMPARE for QStringList

After establishing that both lists are the same size, there is no need
to calculate the minimum of the list sizes.  Also, use sizeof() instead
of hard-coded values when calling qsnprintf().

Change-Id: I2396cf3f941770229e1cef6422aeddbe549c51fc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQThread-test: Fix test on Windows (timer inaccuracy).
Friedemann Kleint [Mon, 12 Dec 2011 15:54:09 +0000 (16:54 +0100)]
QThread-test: Fix test on Windows (timer inaccuracy).

- Tolerate WaitTime - 1 (799ms when expecting 800ms).
- Remove commented-out code.

Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Change-Id: Ibe246d47ab7667692386b0f9333150c195948282
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoDisable warnings when building mkv8snapshot
Bradley T. Hughes [Mon, 12 Dec 2011 11:48:49 +0000 (12:48 +0100)]
Disable warnings when building mkv8snapshot

Like in commit 5341cf783102dfab9e1ee2c13aae063d1ab2e75b, do not enable
warnings when building V8 code.

Change-Id: I447db52d546b50aea1c3afc88db7ce6923a5e310
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMake QCocoaWindow independent of NSWindow.
Morten Sorvig [Tue, 6 Dec 2011 11:59:21 +0000 (12:59 +0100)]
Make QCocoaWindow independent of NSWindow.

QCocoaWindow now gets resize events from QNSViev
and does not require a NSWindow. QWindow instances
can now be inserted in NSView hierarchies. This is
useful for Qt-as-a-plugin use cases and is needed to
implement QMacNativeWidget for Qt 5.

Change-Id: Ia95ea9c22a15a3e62d1e6543466cff07390c70a2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Add window debug output
Morten Johan Sorvig [Wed, 14 Dec 2011 10:17:23 +0000 (11:17 +0100)]
Cocoa: Add window debug output

Add logging for setGeometry/setVisible/propagateSizeHints.

Change-Id: I3590caed586d36f789dd67b1951e8152f923a407
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQIBusPlatformInputContext: Fix a crash in tst_qinputpanel::update.
Friedemann Kleint [Mon, 12 Dec 2011 14:32:59 +0000 (15:32 +0100)]
QIBusPlatformInputContext: Fix a crash in tst_qinputpanel::update.

Change-Id: If50c442958b6f25f17325f7792bb3f882e4b13e7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoQPlatformDialogHelpers: Reduce dependency on QDialog.
Friedemann Kleint [Wed, 23 Nov 2011 11:04:01 +0000 (12:04 +0100)]
QPlatformDialogHelpers: Reduce dependency on QDialog.

For each QDialog-derived class, introduce a Q[X]Options class
containing the options of the dialog. An instance is shared
between the QDialog (or dialog desktop component) and the
helper.

Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQHeaderView::ResizeToContents slow hide fix
Thorbjørn Lund Martsum [Sun, 11 Dec 2011 19:28:01 +0000 (20:28 +0100)]
QHeaderView::ResizeToContents slow hide fix

I have been a bit confused about what QHeaderView::ResizeToContents
does good. It only sizes depending of the visible part.

However in hide it goes crazy and checks calculates size hints
for every row. At first I considered to solve it in QTableView.
It could be made to calculate the maximum height of the maximum
screen - however I decided not to touch it since I was not
certain that it wouldn't have any unexpected side effects.

Therefore I instead made this patch which is more simple and seems
to be safer. The logic is that when a QHeaderView is hidden we actually
only want to recalculate sizes if the headerview has a visible parent.

Task-number: QTBUG-14234

Change-Id: I186ab6afa95aed43022f2bb7c36e3fd008355d9b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoUpdate V8 to match current patchset
Aaron Kennedy [Wed, 14 Dec 2011 14:35:37 +0000 (14:35 +0000)]
Update V8 to match current patchset

Change-Id: Ib3a093129b1f8bbe66fc870af8871dea3f58c081
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
12 years agoUpdate V8
Aurindam Jana [Tue, 13 Dec 2011 13:05:13 +0000 (14:05 +0100)]
Update V8

Update V8 with fix for Issue 1853
(http://code.google.com/p/v8/issues/detail?id=1853)

Change-Id: I10f652228ab1421b280b433eb2a59aeb83a7699f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoRemove redundant touch processing in QtGui and widgets.
Laszlo Agocs [Sat, 10 Dec 2011 14:30:18 +0000 (16:30 +0200)]
Remove redundant touch processing in QtGui and widgets.

The duplicated hash tables in QGuiApplicationPrivate and
QApplicationPrivate are now unified into one single hash table in
QGuiApplicationPrivate. This also reduced the number of lookups.

The extra processing needed to keep the touch points' first/lastPos
values in sync is now done only once, in QGuiApplication. This
eliminates the performance penalty (for widget-based apps) that was
introduced during the QPA migration.

As an added bonus the patch adds support for touch events arriving
simultaenously from multiple devices. This was broken before: As there
is no guarantee that two devices/drivers will not send touch points
with the same ID, using structures with only the ID as key is
wrong. The proper key is composed of the device ID (that is, a
QTouchDevice pointer) and the touch point ID.

The exported internal function qt_translateRawTouchEvent() has been
removed. This function cannot work properly in the QPA world: It
injected touches into the widget subsystem (QApplication) only which
is wrong, and would result in half-filled touch events due to not
routing the injected data through QGuiApplication. Autotests using
this function are migrated to
QWindowSystemInterface::handleTouchEvent().

Change-Id: I7632781d77f9e0ac4626fd7c9933511c94492156
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove QAlphaPaintEngine::drawImage()
Bradley T. Hughes [Tue, 13 Dec 2011 09:12:44 +0000 (10:12 +0100)]
Remove QAlphaPaintEngine::drawImage()

It was not a proper reimplementation of QPaintEngine::drawImage(), which
takes 4 arguments, not 3 as declared in QAlphaPaintEngine. Remove the
code, since it is not being called.

Change-Id: Ia125a9c7e8a2e05ec2ca11b859c01ccbf4d55af5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove incorrect information from QCOMPARE documentation.
Jason McDonald [Wed, 14 Dec 2011 06:23:43 +0000 (16:23 +1000)]
Remove incorrect information from QCOMPARE documentation.

The documentation stated that QStringList objects would be compared
starting from the end of the lists.  The implementation in qtest.h
actually starts at the beginning of the list, and always has done since
qtestlib became part of Qt.

Change-Id: I056f584564d46402ba23fc6a89c801cb5c3c6262
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCocoa: Use new 10.7 mouse wheel API.
Morten Johan Sorvig [Mon, 12 Dec 2011 09:55:37 +0000 (10:55 +0100)]
Cocoa: Use new 10.7 mouse wheel API.

Silence "deprecated" warnings. Use the old API
on 10.6.

Change-Id: I0cfa3a083108618023b491589a85ddfc268f990b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoRemove -graphicssystem (and -runtimegraphicssystem) options from configure.
Robin Burchell [Wed, 7 Dec 2011 14:17:30 +0000 (15:17 +0100)]
Remove -graphicssystem (and -runtimegraphicssystem) options from configure.

In a Qt 5 world, these have no relevance, so remove them.

Task-number: QTBUG-23022
Change-Id: I2f52c7aa1fcb8234046dd95b4d702791d20514fa
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix testlib selftests on shadow build.
Kurt Korbatits [Tue, 13 Dec 2011 05:19:39 +0000 (15:19 +1000)]
Fix testlib selftests on shadow build.

Changed to use QT_INSTALL_TESTS to install subtests.

Change-Id: I4a2a7bd2d3e7d6da34dbb922bf377bee98cdedb0
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQObject-test: Reorganize subprocess.
Friedemann Kleint [Mon, 12 Dec 2011 15:28:30 +0000 (16:28 +0100)]
QObject-test: Reorganize subprocess.

On Windows, the signalbug.exe could not be launched since it is
not next to tst_qobject.exe, which is in one of the
'release', 'debug' subfolders.

Introduce a subdirectory structure similar to that of
the QProcess test and use QFINDTESTDATA to locate it.

Change-Id: Ie8f2ede8cb76f22a908cb77517a74076be11fbb7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove QStringList test in cmptest selftest.
Jason McDonald [Tue, 13 Dec 2011 08:20:36 +0000 (18:20 +1000)]
Improve QStringList test in cmptest selftest.

The old test only verified the behaviour of QCOMPARE when comparing
lists that were different.  Add data rows for comparing empty lists and
non-empty lists that are equal.

Note that testlib currently does not report passing data rows (only
failing rows and completely passing test functions), so the new data
rows do not cause any change in the expected test output.

Change-Id: I137650ce0ca6250cee36bd9cb74b01f8abd4e89c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoGive names to data rows in cmptest selftest.
Jason McDonald [Tue, 13 Dec 2011 08:02:46 +0000 (18:02 +1000)]
Give names to data rows in cmptest selftest.

Change-Id: Ia362f0651c8d32602fa13d6639fb8386fe8d9e0b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd testlib selftest for QStringList comparison.
Jason McDonald [Tue, 13 Dec 2011 07:26:36 +0000 (17:26 +1000)]
Add testlib selftest for QStringList comparison.

The (disabled) alive selftest contained a test for the QStringList
specialization of the QTest::qCompare template.  This test is unrelated
to the rest of the alive selftest, so move it to the cmptest selftest,
where QCOMPARE is tested.

Change-Id: Ic6f0e491dd3b3ce8b4ca1d49666a099815575eaa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix possible jump in animation timer.
Michael Brasser [Wed, 14 Dec 2011 00:29:34 +0000 (10:29 +1000)]
Fix possible jump in animation timer.

When starting new animations with existing animations running, ensure
we force an update to the timer first, so that the new animations can't
mistakenly start with a very large delta.

This fixes tst_qdeclarativeanimations::alwaysRunToEndRestartBug failure
on slow machines.

Change-Id: Ida4e5dcf0ff792e6bfe0d244b6e969d04d0b20fa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoAdd specialization for QTypeInfo<void>
Jędrzej Nowacki [Tue, 13 Dec 2011 09:14:23 +0000 (10:14 +0100)]
Add specialization for QTypeInfo<void>

QTypeInfo uses sizeof which is illegal operation for void type.

Change-Id: Idf43551bdfafbb76e32f4f2785af5f4291981e73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix Memory leak related to Content Menu
Debao Zhang [Fri, 18 Nov 2011 14:40:47 +0000 (22:40 +0800)]
Fix Memory leak related to Content Menu

From Qt4.7 on, the contextmenu of
QTextEdit/QPlainTextEdit/QLineEdit/QLabel/QMainWindow etc using
QMenu::popup() instead of QMenu::exec(), but the
setAttribute(Qt::WA_DeleteOnClose) does not work, as QMenu::close()
isn't called when the menus disapper. And this causes a memory leak.

This is a side effect of b7af368e86874d71ffc9071c9ef009814d6a3467

Task-number: QTBUG-22817
Task-number: QTBUG-19592
Change-Id: I4c2c3edb3f63ce914b7b57cd0fbcec20488c8315
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFinish removing virtual child integers
Bradley T. Hughes [Tue, 13 Dec 2011 09:17:22 +0000 (10:17 +0100)]
Finish removing virtual child integers

Finish the work started by commit
beb72b2fbf17a20b4a9d51d75d79f9c3c69bb357. This silences warnings found
by -Woverloaded-virtual.

Change-Id: Ic6f5e77e324463ade8349f23f272b41b509d87e4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix debug output in eglfs with QEGL_EXTRA_DEBUG enabled
Johannes Zellner [Tue, 13 Dec 2011 10:00:56 +0000 (11:00 +0100)]
Fix debug output in eglfs with QEGL_EXTRA_DEBUG enabled

Change-Id: I615a953b52184d01c5b1b78d1cff283f94c458d9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImproved performance of large text when parts are outside view.
Kim Motoyoshi Kalland [Mon, 12 Dec 2011 12:02:13 +0000 (13:02 +0100)]
Improved performance of large text when parts are outside view.

Avoid generating paths for the parts of the text that are outside
the viewport in the raster paint engine.

Task-number: QTBUG-22687
Change-Id: I06159bc4c1aa82a07606f4b2f0336cb25dfd56d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix QPA xlib plugin handling of setParent(0).
Bradley Smith [Tue, 13 Dec 2011 05:47:03 +0000 (21:47 -0800)]
Fix QPA xlib plugin handling of setParent(0).

Dereference of the parent argument did not check for nullptr. For
example, the hellogl example would crash. Now if the parent
argument is null, the screen's root window is used.

Change-Id: Ib06181c9ab9794d577722f1c1dd5ee92e4edaee5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQImageReader-test: Make more verbose, use QTemporaryDir.
Friedemann Kleint [Mon, 12 Dec 2011 10:16:43 +0000 (11:16 +0100)]
QImageReader-test: Make more verbose, use QTemporaryDir.

- Add some QVERIFY to check for isNull().
- Use QTemporaryDir to avoid spurious failures in the format
  extension-ignore test (cannot copy to '/tmp/black.jpg').

Change-Id: Ia57ea4daa6b8686d1111c9c27a47666265fa9781
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix failing unit tests.
Sarah Smith [Thu, 17 Nov 2011 05:06:17 +0000 (15:06 +1000)]
Fix failing unit tests.

The test that was failing was the readFromDevice one - where the
extension is not known.

Looks as though image detection is required in a positive way, that is
it is not enough to say I think I can read this file, and then fail if
the format is "corrupt", you must be certain that the file was intended
to be that format.

In the case of TGA the original format has no magic byte header, and no
consistent way to check if it really is a TGA file.  With 2.0 the footer
was added at the end, so that can be checked for confirming the file is
TGA.  However rejecting files which do not have this means that old TGA
files will not be read.

On a quick survey TGA files that have been used in applications so far
all seem to be 2.0 TrueVision, so for now, lets just reject earlier
files and see how it goes.

Also add reading the tga test file to the readFromDevice test.

(cherry picked from commit 665bc3951709f0d726cb82501a5bca684f3347a5)
Change-Id: I665bc3951709f0d726cb82501a5bca684f3347a5
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
12 years agoQClipboard-test: Fix test
Friedemann Kleint [Fri, 9 Dec 2011 16:14:52 +0000 (17:14 +0100)]
QClipboard-test: Fix test

- Use QFINDTESTDATA to locate sub-executables
- Remove dependency on QtWidgets, use QGuiApplication everywhere.
- Improve error handling when running sub-executables, prevent
  hangs (Windows)

Change-Id: If8e3be82f855c8be6bdbfc9f9728e8490ed181f3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix qfile unit test failing on shadow build.
Kurt Korbatits [Tue, 13 Dec 2011 01:08:41 +0000 (11:08 +1000)]
Fix qfile unit test failing on shadow build.

Updated three instances were not using QFINDTESTDATA.

Change-Id: Ibd0f6734791fc5d98ebeb65ac3bd80aa1c076414
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd missing assertion to QAbstractTestLogger.
Jason McDonald [Mon, 12 Dec 2011 07:32:48 +0000 (17:32 +1000)]
Add missing assertion to QAbstractTestLogger.

If passed an empty string, QAbstractTestLogger::outputString() would
crash, so add a QTEST_ASSERT to make the cause of any crashes more
obvious.

Change-Id: I00afe2e73120b87e211f858402d441f345dddd08
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: fixed actual, expected order in QTest::compare_helper
Rohan McGovern [Tue, 13 Dec 2011 00:20:11 +0000 (10:20 +1000)]
testlib: fixed actual, expected order in QTest::compare_helper

These two parameters were written in the opposite order in the
function's declaration and definition.  Harmless to the compiler,
but confusing to developers and reviewers.

Change-Id: I1d4cb0a41b465b5f918daa76756677fe0cfe0a59
Reviewed-by: Jason McDonald
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoStop animation driver in the appropriate place.
Michael Brasser [Mon, 12 Dec 2011 04:51:15 +0000 (14:51 +1000)]
Stop animation driver in the appropriate place.

Calling stop from restartAnimationTimer was incorrect (it was initially
added as a fix after the introduction of QAnimationDriver, but this is
a better location for the fix).

Change-Id: I2507096b846ada061e36a9ece6aa814d801ddd53
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoOnly call profiler callback once per animation tick.
Michael Brasser [Mon, 12 Dec 2011 04:40:35 +0000 (14:40 +1000)]
Only call profiler callback once per animation tick.

Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
12 years agoCleanup pause timer handling in QUnifiedTimer.
Michael Brasser [Mon, 12 Dec 2011 04:30:11 +0000 (14:30 +1000)]
Cleanup pause timer handling in QUnifiedTimer.

The animationTimer is now only used for pauses, so can be renamed to
pauseTimer, and directly queried for whether it is active.

Change-Id: I3d9319b6ee76158e875ab43657126a0aa0a1cf2e
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoFix possible jump in animation timer.
Michael Brasser [Fri, 9 Dec 2011 02:39:53 +0000 (12:39 +1000)]
Fix possible jump in animation timer.

If both a stop and start happen within an event loop, ensure they are
processed in order.

Based on a patch from Charles Yin.

Task-number: QTBUG-22865
Change-Id: I6131bd43a6ba5ad4fa37c863a9f4598bf2ac0e01
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
12 years agoMove QAbstractItemModel into a separate directory.
Stephen Kelly [Sat, 10 Dec 2011 01:22:06 +0000 (02:22 +0100)]
Move QAbstractItemModel into a separate directory.

Change-Id: Ib505520dd5b52743634befbf3f148d7f8c21ec44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCompile fix - qxcbconnection.cpp (‘Display’ was not declared)
Thorbjørn Lund Martsum [Thu, 8 Dec 2011 06:47:40 +0000 (07:47 +0100)]
Compile fix - qxcbconnection.cpp (‘Display’ was not declared)

To avoid getting
qxcbconnection.cpp:89:29: error: ‘Display’ was not declared in this scope

Platform linux - configured with
./configure -nokia-developer -nomake examples -nomake demos -nomake tests -no-gtkstyle -no-v8

Change-Id: Ief7315bb8aa67c6454cdeddb1c02e60ea79801b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUse QVarLengthArray in QXcbConnection.
Robin Burchell [Wed, 7 Dec 2011 19:58:04 +0000 (20:58 +0100)]
Use QVarLengthArray in QXcbConnection.

There's no need in using a QList here, since it's never passed around anywhere;
the reference counting is just unnecessary overhead.

Change-Id: I92107c69f7338acc396e2ac4a69123c6a2becaed
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd the .exe suffix to executables on Windows.
Stephen Kelly [Mon, 12 Dec 2011 11:57:17 +0000 (12:57 +0100)]
Add the .exe suffix to executables on Windows.

Change-Id: I257bb7d62ae18ea529df6b10694fcf25eedc83f4
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake QApplication::type() set by QGuiApplication.
Frederik Gladhorn [Mon, 12 Dec 2011 13:12:15 +0000 (14:12 +0100)]
Make QApplication::type() set by QGuiApplication.

QApplication::type used to be static and set by the
QApplicationPrivate constructors.

In QCoreApplication we have the new application_type that should take its place.
QApplication::GuiServer is deprecated (since it doesn't have any functionallity
any more with QWS being removed).

This change prepares QStyle to be called from a QQuickCanvase based application
that does not inherit the QWidget version of QApplication.

Change-Id: Ifbe992e25f1e5821fa047b6eb915f75fa675ab97
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
12 years agov8: give sensible error message if v8 sources are not checked out
Rohan McGovern [Mon, 12 Dec 2011 00:26:22 +0000 (10:26 +1000)]
v8: give sensible error message if v8 sources are not checked out

A common error for developers attempting to build qtbase for the first
time is to miss cloning the v8 submodule.

Let qmake check for existence of the sources so we get a sensible error
at qmake time, rather than a relatively inscrutable error at make time.

Change-Id: I70b478e63c962263dac4f2ddccb377b4c9777ceb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd a wayland-scanner rule to qmake
Jørgen Lind [Mon, 12 Dec 2011 11:55:23 +0000 (12:55 +0100)]
Add a wayland-scanner rule to qmake

Change-Id: I142ca2ba2a817745b818d2740d9ae8e0eaf3b797
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoAdd touchEvent() virtual to QWindow.
Laszlo Agocs [Mon, 12 Dec 2011 15:24:33 +0000 (17:24 +0200)]
Add touchEvent() virtual to QWindow.

Unlike keyPressEvent(), mousePressEvent(), etc. the touch events had
no equivalent so one had to fall back to reimplementing event() or
using an event filter. This is now corrected by introducing
touchEvent(). Touch events are finally becoming a first-class citizen
in Qt 5.

Change-Id: Ia2044030154fd5b1b5384f08a3cb1749b798435f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove symbian cases from library and plugin loading code.
Stephen Kelly [Mon, 12 Dec 2011 12:56:56 +0000 (13:56 +0100)]
Remove symbian cases from library and plugin loading code.

Change-Id: I381873449b1520152cd2a7aede9c7253e110ef7a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoCocoa: Add autorelease pools.
Morten Johan Sørvig [Mon, 12 Dec 2011 08:52:40 +0000 (09:52 +0100)]
Cocoa: Add autorelease pools.

A couple of cases where we call Cococa APIs without
having an autorelease pool in place surfaced after
removing the global autorelease pool in 1a218a7.
(This happens when when Qt API is called before
app.exec() has started the Cocoa event loop.)

Add local autorelease pools to prevent memory leaks.

Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoAdd QVarLengthArray::length().
Robin Burchell [Fri, 9 Dec 2011 16:21:12 +0000 (17:21 +0100)]
Add QVarLengthArray::length().

This also adds a unit test for length()/count()/size(), since there wasn't one
testing it explicitly.

Change-Id: Ifb7f113aa97beef5f76e5fb246eb38495344b0ad
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Marco Schmidt <Marco.Schmidt@Taugamma.de>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove unused member variables from private class.
Richard Moore [Sun, 11 Dec 2011 20:17:12 +0000 (20:17 +0000)]
Remove unused member variables from private class.

These aren't used, and so they shouldn't be there.

Change-Id: Id4a08d90836c45c140d811b8eca07756e14c56e5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRemove template <class T> class QRingBuffer
João Abecasis [Mon, 12 Dec 2011 12:37:51 +0000 (13:37 +0100)]
Remove template <class T> class QRingBuffer

.. as it is declared and defined in .cpp file but never used.

Change-Id: I7b72daf62712b4ec25717afbe2b7f0792ffa2a85
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoWindows-DnD: Fix cursors.
Friedemann Kleint [Mon, 12 Dec 2011 14:06:23 +0000 (15:06 +0100)]
Windows-DnD: Fix cursors.

Re-add pixmaps that were removed from QGuiApplication.

Change-Id: I9936da115e494cf816116159419d40840176afd5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindows: Fix clipboard test.
Friedemann Kleint [Mon, 12 Dec 2011 13:38:45 +0000 (14:38 +0100)]
Windows: Fix clipboard test.

Return the QMimeData set on the Ole object if we own it.

Change-Id: I08de0968e04a7356fed1255feb495f7b85e7a6f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoSilence -Woverloaded-virtual warnings in QRasterPaintEngine
Bradley T. Hughes [Mon, 12 Dec 2011 14:00:30 +0000 (15:00 +0100)]
Silence -Woverloaded-virtual warnings in QRasterPaintEngine

The QRasterPaintEngine::updateState() is not a reimplementation of
QPaintEngineEx::updateState(const QPaintEngineState &state). Rename the
updateState() function to updateRasterState(), and ensureState() to
ensureRasterState(). These names were chosen to match the class name
QRasterPaintEngineState on which these functions operate.

../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengine_raster_p.h:271:10:
warning: 'QRasterPaintEngine::updateState' hides overloaded virtual
function [-Woverloaded-virtual]
    void updateState();
         ^
../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengineex_p.h:202:18:
note: hidden overloaded virtual function 'QPaintEngineEx::updateState'
declared here
    virtual void updateState(const QPaintEngineState &state);
                 ^

Change-Id: Ie9ff0230019b383d53757029c6b2194dfc6a2664
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoSilence -Woverloaded-virtual warnings in QBlitterPaintEngine
Bradley T. Hughes [Mon, 12 Dec 2011 13:48:21 +0000 (14:48 +0100)]
Silence -Woverloaded-virtual warnings in QBlitterPaintEngine

QPaintEngineEx declares several virtual clip() overloads, but clip()
with no argument does not reimplement any of these. Rename it to
clipData() (to make the name of the return value more closely).

../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengine_blitter_p.h:104:29:
warning: 'QBlitterPaintEngine::clip' hides overloaded virtual function
[-Woverloaded-virtual]
    inline const QClipData *clip(){return raster()->d_func()->clip();}
                            ^
../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengineex_p.h:157:18:
note: hidden overloaded virtual function 'QPaintEngineEx::clip' declared
here
    virtual void clip(const QPainterPath &path, Qt::ClipOperation op);
                 ^

Change-Id: Ifd7c494e2c999d743216cfb4c27a9c3ccf66f2a9
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoFix NTLM authentication with email address
Shane Kearns [Fri, 9 Dec 2011 12:06:04 +0000 (12:06 +0000)]
Fix NTLM authentication with email address

When using "user@dns-domain" for NTLM authentication, the whole string
should be sent as the username, and the domain should be set to an
empty string.
The domain sent by the server is still reflected if the username
does not contain an '@' character.

Manually tested using MS IIS on a domain-joined PC.

Task-number: QTBUG-19894
Task-number: ou1cimx1#949951
Change-Id: Ie1f81172e71cb7cce7b8c909062be990c24aea47
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agoFix null pointer dereference in NTLM authentication
Shane Kearns [Fri, 9 Dec 2011 11:49:50 +0000 (11:49 +0000)]
Fix null pointer dereference in NTLM authentication

If NTLM authentication is required for the URL with an empty path,
then QNetworkAuthenticationCache::findClosestMatch(url.path()) returns 0.
e.g. "http://10.1.2.3".
Return a default constructed credential in this case.

Change-Id: I84ad3b308ee3f74fbbac9ad0f11dbdc66047b50b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@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
Task-number: QTBUG-20719
Reviewed-by: Martin Jones
(cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971)

Change-Id: If69b384636e3775ad7898b8ffc441011c21abe98
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoFix TextInput test failures.
Andrew den Exter [Mon, 5 Sep 2011 07:42:08 +0000 (17:42 +1000)]
Fix TextInput test failures.

emitCursorPositionChanged won't emit cursorPositionChanged if the
cursor position hasn't changed but that doesn't mean the micro focus
hasn't changed, so emit updateMicroFocus changed when
cursorPositionChanged isn't.

Task-number: QTBUG-21017
Task-number: QTBUG-21011
Task-number: QTBUG-20719
Change-Id: I86344621151dbeba0eebc67fbc786a8da76b7021
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoMove cursorDelegate with the mouse selection of read only text input.
Andrew den Exter [Thu, 4 Aug 2011 00:58:26 +0000 (10:58 +1000)]
Move cursorDelegate with the mouse selection of read only text input.

Task-number: QTBUG-20719
Task-number: QTBUG-19109
Reviewed-by: Martin Jones
Change-Id: I2cec51eb5b01dc5750614edf5b39d6a3da661fc6
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoMake it easier to select words at the start of a line.
Andrew den Exter [Wed, 24 Aug 2011 01:26:29 +0000 (11:26 +1000)]
Make it easier to select words at the start of a line.

QTextControl's word selection will only include a word if the cursor
position is past the mid point of the word. This can make it
difficult to select words near the edges of the screen on touch
devices.  For the TextEdit word selection mode select a word ignore
the relative position within a word.

Task-number: QT-5206
Task-number: QTBUG-20719
Change-Id: I77e71e01d8021d66ada785cf894ba876faccefdf
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoUpdate .gitignore for tests/auto/corelib/io/qresourceengine
Bradley T. Hughes [Mon, 12 Dec 2011 08:03:08 +0000 (09:03 +0100)]
Update .gitignore for tests/auto/corelib/io/qresourceengine

The test generates the runtime_resource.rcc data file at build time. Add
this to .gitignore.

Change-Id: Ief4057072b28499049147b86f166523b71afe269
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoStore the primary status in the touch point flags.
Laszlo Agocs [Wed, 30 Nov 2011 17:19:27 +0000 (19:19 +0200)]
Store the primary status in the touch point flags.

For some reason the primary bit has previously been encoded in the
touch point state, even though it has nothing to do with the regular
states like Pressed, Released, etc.

The value is now stored in the recently introduced flags member of the
touch points. This also reduces the need for error-prone internal
masking of the state value.

The structure used by QWindowSystemInterface::handleTouchEvent also
becomes cleaner because the primary status can now be set in the flags
member and the isPrimary bool can be dropped.

Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCheck driver validity before using it
Honglei Zhang [Thu, 8 Dec 2011 13:38:25 +0000 (15:38 +0200)]
Check driver validity before using it

Even though it is stated in the documentation that the SQL driver must
remain valid during the life time of QSqlQuery, there are users who don't
follow the rule. It's common that the destructor of QSqlQuery is called
after the driver is already deleted. This fix checks the validity of
the SQLite driver before QSqliteResult uses it in destructor.

Task-number: QTBUG-16967
Change-Id: If0f52113f12e14102da1671cd6e12bdaa267114f
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoRevert "Remove unused overload of QTest::qExec."
Friedemann Kleint [Fri, 9 Dec 2011 15:16:46 +0000 (16:16 +0100)]
Revert "Remove unused overload of QTest::qExec."

The overload is used in Qt Creator
(see src/libs/extensionsystem/pluginmanager.cpp).
The use case here is an application whose internal
QObjects can be tested by passing a command line parameter.

For this use case, it is inconvenient to have to allocate
memory and create a char argv[]- array.

This reverts commit ad80d42f8eefd72d9297c272139acc70e24bfa13.

Change-Id: I2a2f91e2840100fd62743f6d03b33005d67b18f8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSilence -Woverloaded-virtual warnings in QFileDialog
Bradley T. Hughes [Fri, 9 Dec 2011 13:36:33 +0000 (14:36 +0100)]
Silence -Woverloaded-virtual warnings in QFileDialog

The QPaintDevice::init() virtual, reimplemented in QWidget, is hidden by
these declarations, and clang (and gcc with -Woverloaded-virtual) warns
about this. There is no need to overload the init() name, use more
descriptive names instead.

dialogs/qsidebar_p.h:124:10: warning: 'QSidebar::init' hides overloaded
virtual
      function [-Woverloaded-virtual]
    void init(QFileSystemModel *model, const QList<QUrl> &newUrls);
         ^
dialogs/qfiledialog_p.h:303:10: warning: 'QFileDialogLineEdit::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
         ^
dialogs/qfiledialog_p.h:314:10: warning: 'QFileDialogComboBox::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:330:10: warning: 'QFileDialogListView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:342:10: warning: 'QFileDialogTreeView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
kernel/qwidget.h:682:10: note:
      hidden overloaded virtual function 'QWidget::init' declared here
    void init(QPainter *painter) const;
         ^

Change-Id: I7a317a551b92fde966e61958dcaf25dea94d69b4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove -keyevent-verbose option for autotests.
Jason McDonald [Mon, 12 Dec 2011 05:55:42 +0000 (15:55 +1000)]
Remove -keyevent-verbose option for autotests.

This option does nothing -- the only function that checks if the option
has been set is never called.  This appears to have been the case ever
since testlib was imported into the Qt repository in October 2005.

Change-Id: I837aa957e2d8bd47c3d1c551f1b94d4374daa25e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoStop using QTest::qt_snprintf() in testlib.
Jason McDonald [Mon, 12 Dec 2011 02:23:02 +0000 (12:23 +1000)]
Stop using QTest::qt_snprintf() in testlib.

After the previous commit, QTest::qt_snprintf() is equivalent to
qsnprintf(), so just use that instead.

Change-Id: I89ad6e3749ba5efb1926b0b618a904e8baca9f52
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImprove definition of QTEST_NO_SPECIALIZATIONS
Jason McDonald [Mon, 12 Dec 2011 05:22:02 +0000 (15:22 +1000)]
Improve definition of QTEST_NO_SPECIALIZATIONS

Remove the part of the definition that applies to gcc versions <= 2.x
as these versions are not supported by Qt5.

Change-Id: Icee6b51ffe78fa30fd7193ef96b6ce0484b8fcae
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFilter unprintable chars out of all test output.
Jason McDonald [Mon, 12 Dec 2011 01:46:45 +0000 (11:46 +1000)]
Filter unprintable chars out of all test output.

Previously, unprintable characters were filtered out of test output
while the output strings were being formatted by either qt_snprintf() or
qt_asprintf().  Any strings not formatted by one of those functions
weren't filtered at all, and any strings passed more than once would be
filtered more than once.

This commit separates the filtering of output strings from their
formatting, leaving the filtering until just before the strings are
written to the output stream.  For now, the filtering is done by a
protected method of QAbstractTestLogger, but this could easily be
changed to a virtual method in future to allow different filtering
for loggers with different output character sets.

Change-Id: Ia4bb49cd10d37c84af75d2cf58325d27f0e16d99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>