profile/ivi/qtbase.git
12 years agoFix warning caused by putting .mm files in SOURCES
Tor Arne Vestbø [Thu, 15 Sep 2011 10:43:22 +0000 (12:43 +0200)]
Fix warning caused by putting .mm files in SOURCES

They should live in OBJECTIVE_SOURCES instead.

Change-Id: Iaf3f6ae4d8b71600c8ea91e33cf860b326855988
Reviewed-on: http://codereview.qt-project.org/4971
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoFix possible assert in QFontEngineFT
Eskil Abrahamsen Blomfeldt [Mon, 26 Sep 2011 12:34:15 +0000 (14:34 +0200)]
Fix possible assert in QFontEngineFT

This is a regression caused by 070d9c00. If the defaultFormat
is set to Format_None, we should default to Format_A8 like before
the change.

Change-Id: I8ad07abff96fc1dfa03c0c5b49d13beb36b9de70
Reviewed-on: http://codereview.qt-project.org/5540
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoAdd some enablers to QTextDocumentLayout
Eskil Abrahamsen Blomfeldt [Fri, 23 Sep 2011 10:50:44 +0000 (12:50 +0200)]
Add some enablers to QTextDocumentLayout

Required to access internals used in the layout process, so that
we can present the layout in the scenegraph. For instance, the
frameBoundingRect() for tables will be the internal bounding rect
of the cells. To avoid regressions, I've added a separate function
for the outer bounding rect. For now, this is private API, but if
it turns out to be useful, the functions can easily be added as
virtual to QAbstractTextDocumentLayout.

Task-number: QTBUG-20917
Change-Id: I04e07d3850b21f9f0704bf8c8a3ffe97ee5c3fda
Reviewed-on: http://codereview.qt-project.org/5539
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoFix possible crash in QFontEngineFT
Eskil Abrahamsen Blomfeldt [Mon, 26 Sep 2011 10:18:46 +0000 (12:18 +0200)]
Fix possible crash in QFontEngineFT

Avoid crash if set pointer is null.

Task-number: QTBUG-21647
Reviewed-by: Jiang Jiang
(cherry picked from commit e05734987594f0e54f58a2ab3037cdf4956e9036)

Change-Id: I49fde194ef6be5485a43c5d09fc43170ab9d4d6b
Reviewed-on: http://codereview.qt-project.org/5532
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoMake QVectorData::shared_null const
Bradley T. Hughes [Fri, 9 Sep 2011 09:07:48 +0000 (11:07 +0200)]
Make QVectorData::shared_null const

Similar to QByteArray and QString, keep the shared_null in shareable
memory and never modify it.

Since QRegion uses the internals of QVector, we need to make sure that
QRegion also never modifies the shared_null.

Change-Id: I809e5873fe414138f97d501e05458b73c04b18fb
Reviewed-on: http://codereview.qt-project.org/4529
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed tst_QWidget::updateWhileMinimized()
Samuel Rødal [Thu, 22 Sep 2011 08:43:52 +0000 (10:43 +0200)]
Fixed tst_QWidget::updateWhileMinimized()

The QBackingStore::sync() call after the first expose when the widget is
un-minimized is discarded due to Qt::WA_Mapped being false. Since there
might be backing store syncs pending on Qt::WA_Mapped being set we
should also call syncBackingStore() when we get the map event.

Change-Id: I762545dc0522a99f0b36ce9a2cd2f45894cb40a5
Reviewed-on: http://codereview.qt-project.org/5377
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoTidy and sort the list of selftests
Jason McDonald [Fri, 23 Sep 2011 01:41:16 +0000 (11:41 +1000)]
Tidy and sort the list of selftests

Change-Id: I123a775e2d56fc0c64d43e98a1d2e3ab68394076
Reviewed-on: http://codereview.qt-project.org/5492
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUse placeholder for Qt version in expected output
Jason McDonald [Thu, 22 Sep 2011 07:40:45 +0000 (17:40 +1000)]
Use placeholder for Qt version in expected output

The selftests already used the @INSERT_QT_VERSION_HERE@ placeholder
in place of the real Qt and QTestlib versions in the expected test
output of the subtests.  For unknown reasons, the same was not true for
the expected plain text output.  In the past, this has caused Release
Managers to waste time incrementing the version numbers in these files.

Change-Id: I52f7870486fce128c04d53ff06978afa947474fd
Reviewed-on: http://codereview.qt-project.org/5375
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRe-enabled test that was marked insignificant and passes
Holger Ihrig [Thu, 22 Sep 2011 14:36:20 +0000 (16:36 +0200)]
Re-enabled test that was marked insignificant and passes

Added comment why QVariant Autotest is marked insignificant

Task-number: QTBUG-21424

Change-Id: I5b911bd36e376ad529342055180ff9c5de19de67
Reviewed-on: http://codereview.qt-project.org/5399
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake QMapData::shared_null const
Bradley T. Hughes [Fri, 9 Sep 2011 09:08:25 +0000 (11:08 +0200)]
Make QMapData::shared_null const

Similar to QVector, QByteArray and QString, keep the shared_null in
shareable memory and never modify it.

Change-Id: I062825684b79f2b01ec7ce65e0cf74f417b760b8
Reviewed-on: http://codereview.qt-project.org/4530
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake QListData::shared_null const
Bradley T. Hughes [Fri, 9 Sep 2011 09:09:16 +0000 (11:09 +0200)]
Make QListData::shared_null const

Similar to QMap, QVector, QByteArray and QString, keep the shared_null
in shareable memory and never modify it.

Change-Id: I2b4bb8de564080021043f6ede6c903d567c686cf
Reviewed-on: http://codereview.qt-project.org/4531
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake QLinkedListData::shared_null const
Bradley T. Hughes [Fri, 9 Sep 2011 09:10:48 +0000 (11:10 +0200)]
Make QLinkedListData::shared_null const

Similar to QList, QMap, QVector, QByteArray and QString, keep the
shared_null in shareable memory and never modify it.

Change-Id: I70b484d528c397a9d205b1418b6dc920c69dc725
Reviewed-on: http://codereview.qt-project.org/4532
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake QHashData::shared_null const
Bradley T. Hughes [Fri, 9 Sep 2011 09:18:28 +0000 (11:18 +0200)]
Make QHashData::shared_null const

Similar to QLinkedList QList, QMap, QVector, QByteArray and QString,
keep the shared_null in shareable memory and never modify it.

Change-Id: Ia8b72ef0288575bed658153d9d54434580988bda
Reviewed-on: http://codereview.qt-project.org/4533
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodon't calculate hash when the map is empty and we are not inserting
Oswald Buddenhagen [Tue, 20 Sep 2011 09:13:47 +0000 (11:13 +0200)]
don't calculate hash when the map is empty and we are not inserting

the alternative would be splitting the function into two separate
overloads. that might result in better branch prediction, but will
create a bit more code.

Change-Id: Ia2c685bbb34a9681c71f2249d073dd960368209a
Reviewed-on: http://codereview.qt-project.org/5332
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDoc: Fixed \since declarations.
David Boddie [Thu, 30 Jun 2011 17:16:21 +0000 (19:16 +0200)]
Doc: Fixed \since declarations.
(cherry picked from commit 358e018dbb4b4dbdbfc702a6d462f113a1357e1e)
(cherry picked from commit 16355187f69d4431b79b05201b36729c8e5102fe)

Change-Id: Idb18570df01c7463e0dc0f78fd05f80372afa64f
Reviewed-on: http://codereview.qt-project.org/1983
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agoDoc: Clarified the range of return values from QLineF::angle().
David Boddie [Thu, 30 Jun 2011 18:48:32 +0000 (20:48 +0200)]
Doc: Clarified the range of return values from QLineF::angle().

Task-number: QTBUG-20197
(cherry picked from commit 86608d537eabc3cf7e1d1ddd1d0a2f90ccc2de2a)
(cherry picked from commit 8a6dc154ef1fa71e85f02d011d6cbeb63e2ca3bb)

Change-Id: I40cfba4ee45f61428b00d4044640f600c462d564
Reviewed-on: http://codereview.qt-project.org/1984
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agoDoc: Moved general notes about character conversion.
David Boddie [Mon, 18 Jul 2011 13:02:45 +0000 (15:02 +0200)]
Doc: Moved general notes about character conversion.

Task-number: QTBUG-20411
(cherry picked from commit b3922d06680c04324cecd0e0219d02c52b8cf7fd)

Change-Id: If2730fa0d8abd6a14070bc19c8c307dbb61ca111
Reviewed-on: http://codereview.qt-project.org/1985
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agoDoc: Fixed page step sizes in a snippet for QAbstractScrollArea.
David Boddie [Mon, 18 Jul 2011 14:30:23 +0000 (16:30 +0200)]
Doc: Fixed page step sizes in a snippet for QAbstractScrollArea.

Task-number: QTBUG-20350
(cherry picked from commit df244b77b3a5370db071cd1a08f9e24c8cd78803)

Change-Id: Idce02f2f417d8e897d96372f78812e9cef0d79b0
Reviewed-on: http://codereview.qt-project.org/1986
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agoDoc: Fixed shader program snippet.
David Boddie [Tue, 19 Jul 2011 14:52:20 +0000 (16:52 +0200)]
Doc: Fixed shader program snippet.

Task-number: QTBUG-18982
Reviewed-by: Kim Motoyoshi Kalland
(cherry picked from commit 41287c411cb4b1019d12a49ddf7a738174a42f25)

Change-Id: I416411623037830abadbb3cf0a9d1d7aad6f1b96
Reviewed-on: http://codereview.qt-project.org/1987
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agoAdded missing license headers.
Rohan McGovern [Mon, 26 Sep 2011 00:15:10 +0000 (10:15 +1000)]
Added missing license headers.

Change-Id: Id3b7e12abe6ed60f34229ec3a0828f423efdfebf
Reviewed-on: http://codereview.qt-project.org/5477
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRemove obsolete exclusion from selftest checking
Jason McDonald [Thu, 22 Sep 2011 07:14:42 +0000 (17:14 +1000)]
Remove obsolete exclusion from selftest checking

There is no test with a datatag "float", so this code is never executed.

Change-Id: I9dd234e6575eb1c33075705edf77eb1d977061c9
Reviewed-on: http://codereview.qt-project.org/5362
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoDon't XFAIL on the contents of assert messages.
Jason McDonald [Thu, 22 Sep 2011 06:35:56 +0000 (16:35 +1000)]
Don't XFAIL on the contents of assert messages.

Q_ASSERT uses __FILE__, which has undefined contents, and thus the
selftest cannot always match Q_ASSERT messages in actual output with
those in expected output.  The test was calling QEXPECT_FAIL() in this
case, but doing so implies that (a) it's a failure and (b) we intend to
fix it one day.  Neither of these is true, so instead we should simply
tolerate this difference in actual and expected outputs, in the same way
that we do in a couple of other similar cases.

Change-Id: I8b8609a400e9b798936875f6eb1ca18a83660efc
Reviewed-on: http://codereview.qt-project.org/5358
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImplement QTEST_GUILESS_MAIN
Jan Kundrát [Sat, 13 Nov 2010 23:06:07 +0000 (00:06 +0100)]
Implement QTEST_GUILESS_MAIN

Add support for test cases which require an event loop, but do not need
GUI up and running.  Such cases are best accommodated by code similar to
QTEST_MAIN, but using QCoreApplication instead of QApplication.

Change-Id: I04ce82d26b80a4edeba6bf7604a7f8d974232a11
Merge-request: 919
Reviewed-on: http://codereview.qt-project.org/5427
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoUse the right callback in QObject::disconnect()
Olivier Goffart [Fri, 23 Sep 2011 18:42:50 +0000 (20:42 +0200)]
Use the right callback in QObject::disconnect()

Change-Id: Idf2f725dd859aa5c960e5889678cac0e139e44b0
Reviewed-on: http://codereview.qt-project.org/5475
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake sure cursor position doesn't exceed line end
Jiang Jiang [Mon, 19 Sep 2011 11:20:13 +0000 (13:20 +0200)]
Make sure cursor position doesn't exceed line end

If we have trailing spaces at the end of a line, cursor will disappear
because the position we returned exceeds line end, thus the widget
border. By limiting it within line.width we can make sure it always
visible, which is more consistent to the behavior in common platforms.

Reviewed-by: Eskil
(cherry picked from commit c750afe0e0f043389d30850070889946e4c6e8af)

Change-Id: Ifc60b718369639bbb6f5afb35c29a6eb0dccd219
Reviewed-on: http://codereview.qt-project.org/5458
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoRe-enabling tests that were marked insignificant but not failing
Holger Ihrig [Fri, 23 Sep 2011 10:57:42 +0000 (12:57 +0200)]
Re-enabling tests that were marked insignificant but not failing

Task-number: QTBUG-21402

Change-Id: Ibcc2cff81aff669c02b1b7b2c0cb599646b0dd61
Reviewed-on: http://codereview.qt-project.org/5455
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
12 years agoFix QString and QByteArray reserve() and squeeze()
Bradley T. Hughes [Fri, 23 Sep 2011 10:29:18 +0000 (12:29 +0200)]
Fix QString and QByteArray reserve() and squeeze()

These functions should not take care not to unconditionally set the
capacityReserved private member, since the d may be referencing the
const shared_null or shared_empty which live in read-only memory.

The squeeze() methods check for ref > 1 instead of ref != 1 to prevent
detaching from the shared_null/shared_empty unnecessarily; the
shared_null/shared_empty ref count is -1, meaning squeeze() will never
detach from it.

Change-Id: Id3f1725a6f08b3a462343640a47bbe78f08ca7e7
Rubberstamped-by: Lars Knoll
Reviewed-on: http://codereview.qt-project.org/5454
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQByteArray's shared_null and shared_empty should be const
Bradley T. Hughes [Fri, 9 Sep 2011 09:02:06 +0000 (11:02 +0200)]
QByteArray's shared_null and shared_empty should be const

QByteArray::squeeze() needs to make sure to detach if the
data is shared, otherwise it would end up crashing when
squeeze() is called on a QByteArray using the shared_null
or shared_empty.

Change-Id: I89c178659d8c7448681304f050fd69e17b2387de
Reviewed-on: http://codereview.qt-project.org/4528
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove Q_GLOBAL_STATIC_WITH_INITIALIZER from QtWidgets
Lars Knoll [Thu, 15 Sep 2011 20:28:07 +0000 (22:28 +0200)]
Remove Q_GLOBAL_STATIC_WITH_INITIALIZER from QtWidgets

Change-Id: Iecad85fbbfabe41c3a332be2ee0ce3a643db7731
Reviewed-on: http://codereview.qt-project.org/5025
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoImplemented QWidget's move() vs setGeometry() distinction in QWindow.
Samuel Rødal [Thu, 22 Sep 2011 12:37:58 +0000 (14:37 +0200)]
Implemented QWidget's move() vs setGeometry() distinction in QWindow.

QWidget's move() sets the position of the window including the window
frame, unlike setGeometry(). There was no equivalent for this in
QWindow, so several QWidget auto-tests were failing. Now we add
setFramePos() to achieve the same purpose in QWindow.

This fixes tst_QWidget::windowState(), which uses move().

Change-Id: I9a3e558bd615a8f0234cc3dd94fbb2bf5ecbc148
Reviewed-on: http://codereview.qt-project.org/5405
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoPatch toward fixing tst_QWidget::windowState().
Samuel Rødal [Thu, 22 Sep 2011 07:05:11 +0000 (09:05 +0200)]
Patch toward fixing tst_QWidget::windowState().

In QWidget::setWindowState() there was some code to emulate window
states when they're not supported by the backend, by hiding the window
on minimize or using the screen geometry and the frameless window hint
to manually try to make a window fullscreen.

However, some of this code was being run even when the backend does
support setting window states, specifically calling setParent(0) to
force a re-creation of the platform window and calling show(). These led
to the window getting the wrong position after being minimized or
fullscreen and going back to the normal state.

Apart from storing the normal geometry of a widget when going away from
the normal state we shouldn't do any magic when the call to
QPlatformWindow::setWindowState() succeeds.

tst_QWidget::windowState() still fails due to calling move() to set the
position of the widget including the frame, when QWindow currently only
supports setting the position of the widget excluding the frame.

Change-Id: I1c1a337d3c15f14c1c842bd1e347f94e6b67d7eb
Reviewed-on: http://codereview.qt-project.org/5367
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDon't flood expose events in the xcb plugin.
Samuel Rødal [Thu, 22 Sep 2011 07:02:40 +0000 (09:02 +0200)]
Don't flood expose events in the xcb plugin.

The X server sends a series of expose events, where the count member
specifies how many expose events are remaining in the current series. By
merging them into an expose region we can send a single expose event to
the lighthouse interface.

Change-Id: If73c9972fe02c5e4137e8742aaaf5679ccea5a09
Reviewed-on: http://codereview.qt-project.org/5366
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoOnly set frame margins as dirty when we get a configure notify event.
Samuel Rødal [Thu, 22 Sep 2011 07:00:55 +0000 (09:00 +0200)]
Only set frame margins as dirty when we get a configure notify event.

It's dangerous to set them as dirty in anticipation of a configure
notify event, as if frameMargins() is called before the event is
received the computed values are bogus.

Change-Id: Ib6db975fba5fcb13a2511e4716cbb5ca79265c34
Reviewed-on: http://codereview.qt-project.org/5365
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFixed geometry issues.
Samuel Rødal [Wed, 21 Sep 2011 15:39:34 +0000 (17:39 +0200)]
Fixed geometry issues.

We need to compare against the window's currently known geometry to know
when to send resize and move events. Also make sure at least one resize
event is sent, instead of sending one before each expose.

Change-Id: Id7ebe4c1c0e723af9198c668a0c736d64efdbf3e
Reviewed-on: http://codereview.qt-project.org/5364
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAccessible ComboBox: remove virt children, add actions.
Frederik Gladhorn [Thu, 15 Sep 2011 22:40:41 +0000 (00:40 +0200)]
Accessible ComboBox: remove virt children, add actions.

Simplify the combobox implementation by removing child logic.
Instead have an option to open the combobox.

Change-Id: I1bb517d0d064aefa28594b8fa957b8b2c9d48e88
Reviewed-on: http://codereview.qt-project.org/5032
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoAdd autotest for QInputPanel
Joona Petrell [Thu, 22 Sep 2011 13:43:27 +0000 (16:43 +0300)]
Add autotest for QInputPanel

Change-Id: I8ac28d93f610cd3eb69087d2c961a5aab6c47e1e
Reviewed-on: http://codereview.qt-project.org/5394
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDon't call ref() in QByteArray::QByteArray()
Bradley T. Hughes [Mon, 12 Sep 2011 06:44:32 +0000 (08:44 +0200)]
Don't call ref() in QByteArray::QByteArray()

The call is unnecessary; it does nothing since the shared_null ref count
is negative.

Change-Id: I0d0c35a554e4fc5b734a25dab06f04bee7a9ae24
Reviewed-on: http://codereview.qt-project.org/4637
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRe-enabled test and made it pass on Linux
Jo Asplin [Thu, 22 Sep 2011 13:09:37 +0000 (15:09 +0200)]
Re-enabled test and made it pass on Linux

Task-number: QTBUG-21424

Change-Id: Ie63380f22d299708b2085652389869cac841e249
Reviewed-on: http://codereview.qt-project.org/5388
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoRe-enabled test and made it pass on Linux
Jo Asplin [Thu, 22 Sep 2011 11:47:10 +0000 (13:47 +0200)]
Re-enabled test and made it pass on Linux

Task-number: QTBUG-21402

Change-Id: I54226c0aa63c70f9bb8ed8be3784918dd70e5592
Reviewed-on: http://codereview.qt-project.org/5382
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoSupport adding application fonts with QFontconfigDatabase
Jiang Jiang [Thu, 22 Sep 2011 12:23:29 +0000 (14:23 +0200)]
Support adding application fonts with QFontconfigDatabase

QFontDatabaseQPA should be able to reinitialize database and
reregister all the fonts when an application font is added, because
it will trigger db->invalidate().

Add cloneWithSize support to QFontEngineBox so that even no usable
font is found in QFontDatabase, QRawFont::setPixelSize can still
work (without making the result rawfont invalid).

Register application fonts with QFontconfigDatabase, the code is
adapted from QFontDatabaseX11.

Reenable QRawFont tests for QPA, these usages are now supported in
QPA.

Fix QStaticText tests, raster in QPA does support transformations.
Translate the text before ZAxix rotation so that it will be visible
in canvas.

Add back fixedPitch support to QPA, and fix QFontDatabase tests.

Fix QGlyphRun tests, ignore non-existence glyphs in alphaMap
locking.

Fix QFontMetrics tests.

Task-number: QTBUG-21415, QTBUG-20754, QTBUG-20977,
             QTBUG-20976, QTBUG-20760, QTBUG-20759
Change-Id: I24aea7d6ec6b2ac6342134d1f2591327c23a692b
Reviewed-on: http://codereview.qt-project.org/5384
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoAvoid crash in handleTouchEvent and remove superfluous mapping.
Laszlo Agocs [Fri, 23 Sep 2011 08:11:10 +0000 (11:11 +0300)]
Avoid crash in handleTouchEvent and remove superfluous mapping.

252d1b34b26779cbc1ac269f4af7fdb1f27038ef introduces a mapFromGlobal
call in QWindowSystemInterface::handleTouchEvent. This has two issues:
It ignores the fact that the tlw parameter can be null, resulting in
an instant crash with the touch support of some platforms, and the
mapping itself is unneccessary because
QGuiApplication::processTouchEvent() will perform the same, the
rect set via setRect() is basically ignored due to the touchPoint.d.rect
= ... just before sending the final event to the widget in qguiapplication.cpp.

Using setScreenRect instead of setRect is a valid fix from the
previous patch, but the parts for the mapping need to be removed.

Change-Id: I0bb40c7d647fb062106b151e5987f9970d6ab2c8
Reviewed-on: http://codereview.qt-project.org/5448
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoFix preedit text on XCB
Eskil Abrahamsen Blomfeldt [Thu, 22 Sep 2011 12:52:48 +0000 (14:52 +0200)]
Fix preedit text on XCB

indexOfMethod() requires a full signature, not just a method name.

Change-Id: Icb15ab46cab61b35f5d56e8e94b71f5e3b72f97a
Reviewed-on: http://codereview.qt-project.org/5386
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoPage flipping API for QPlatformScreen
Paul Olav Tvete [Thu, 22 Sep 2011 12:30:40 +0000 (14:30 +0200)]
Page flipping API for QPlatformScreen

Adding a page flipping API for platform plugins. This
enables Wayland compositors to show full-screen client windows directly
without copying any data - if supported by the platform.

Change-Id: I19abe366434140f9e20a0655fe7cd41ea9264fca
Reviewed-on: http://codereview.qt-project.org/5385
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAccessible SpinBox remove dead code.
Frederik Gladhorn [Thu, 15 Sep 2011 20:37:59 +0000 (22:37 +0200)]
Accessible SpinBox remove dead code.

Change-Id: I8f3110a1683af98af605982277a618aa0ba97a64
Reviewed-on: http://codereview.qt-project.org/4822
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoworkaround XCB-ICCCM 3.8 breakage, second instance
Oswald Buddenhagen [Wed, 21 Sep 2011 09:10:51 +0000 (11:10 +0200)]
workaround XCB-ICCCM 3.8 breakage, second instance

Change-Id: Ic456f6ca9d845f50506b41d71bb5d2b83239a37e
Reviewed-on: http://codereview.qt-project.org/5333
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCast back to QWindow *
Jo Asplin [Thu, 15 Sep 2011 11:09:44 +0000 (13:09 +0200)]
Cast back to QWindow *

Tests for widgets should select the
QWidget * version of overloaded QTestLib
functions rather than the QWindow * version.

Change-Id: I8b540b630758c0e7ba7ed88aba45d624c83ff378
Reviewed-on: http://codereview.qt-project.org/4977
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoAllow tests to log to multiple destinations
Jason McDonald [Fri, 2 Sep 2011 09:08:21 +0000 (19:08 +1000)]
Allow tests to log to multiple destinations

Each destination and the format of output to write there is specified by
adding "-o filename,format" to the command-line.  The special filename
"-" indicates that the log output is written to the standard output
stream, though standard output can be used as a destination at most
once.

The old-style testlib output options are still supported, but can only
be used to specify one logging destination, as before.

If no logging options are given on the command-line, a plain text log
will go to the console, as before.

To log to the console in plain text and to the file "test_output" in
xunit format, one would invoke a test in the following way:

    tst_foo -o test_output,xunitxml -o -,txt

This commit also enhances the selftests to test with multiple loggers,
but negative tests (e.g. bad combinations of command-line options) are
left for future task QTBUG-21567.

Task-number: QTBUG-20615
Change-Id: If91e752bc7001657e15e427aba9d25ab0a29a0b0
Reviewed-on: http://codereview.qt-project.org/4125
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoEnable testlib self-testing with multiple loggers
Jason McDonald [Wed, 21 Sep 2011 01:39:07 +0000 (11:39 +1000)]
Enable testlib self-testing with multiple loggers

Modify the selftest to be able to run each subtest with a list of one or
more test loggers.  The addition of tests that use this capability will
be part of a subsequent commit.

Task-number: QTBUG-20615
Change-Id: Iac3efe8220e8245aa7e5589348d2c86b8034dd28
Reviewed-on: http://codereview.qt-project.org/5292
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCocoa: Enable native menus.
Morten Sorvig [Mon, 12 Sep 2011 10:31:35 +0000 (12:31 +0200)]
Cocoa: Enable native menus.

Fix menu duplication bug: make QCocoaMenu::addAction
do nothing before the native menu has ben created.

Change-Id: Ifca192421f2073264de9f5faeb053008ecb8532e
Reviewed-on: http://codereview.qt-project.org/5135
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAllocate 16-byte aligned memory independent of platform for raster pool.
Samuel Rødal [Thu, 8 Sep 2011 11:10:47 +0000 (13:10 +0200)]
Allocate 16-byte aligned memory independent of platform for raster pool.

Fixes crash on MIPS (see original merge request
https://qt.gitorious.org/qt/qt/merge_requests/1366).

Reviewed-by: Olivier Goffart
(cherry picked from commit 786b85b13bc884a8b7eab59c43d6c393863fc470)

Change-Id: Ia7731d3d670c0c4dccab861e5085b03a6bf6f4f0
Reviewed-on: http://codereview.qt-project.org/4562
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoAccessible Slider: Remove virtual children.
Frederik Gladhorn [Wed, 21 Sep 2011 11:38:49 +0000 (13:38 +0200)]
Accessible Slider: Remove virtual children.

Change-Id: I58eca7d807b046b312117f9dbec6e2e36b5332cf
Reviewed-on: http://codereview.qt-project.org/4820
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoExport QTextImageHandler and add accessor for image
Eskil Abrahamsen Blomfeldt [Tue, 20 Sep 2011 08:19:18 +0000 (10:19 +0200)]
Export QTextImageHandler and add accessor for image

To allow optimizations in the scene graph, we export the private
QTextImageHandler class and add a function which will fetch
a given image when required, or return the cached image in the
document resources.

Task-number: QTBUG-20917
Change-Id: If45e51b0d9a267bc198623165e7a2cc1fb2b961f
Reviewed-on: http://codereview.qt-project.org/5227
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agotestlib: Separate the gui- and widgets-specific api
Kent Hansen [Wed, 21 Sep 2011 07:23:51 +0000 (09:23 +0200)]
testlib: Separate the gui- and widgets-specific api

Group the widgets-specific ("legacy") api under as
few ifdefs as possible. (The diff can look confusing;
rest assured that this change "only" moves entire
functions around in the files.)

Change-Id: I27bdec7d1c96d0b040dc22a8fed17e4e47766276
Reviewed-on: http://codereview.qt-project.org/5290
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoFix QApplication::startDragDistance()
Kevin Simons [Wed, 21 Sep 2011 10:19:46 +0000 (12:19 +0200)]
Fix QApplication::startDragDistance()

Change-Id: I1b95e25892935b2b6287b8fed719479e37dbcad5
Reviewed-on: http://codereview.qt-project.org/5308
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAccessible Scrollbar: Remove unused function.
Frederik Gladhorn [Thu, 15 Sep 2011 20:35:10 +0000 (22:35 +0200)]
Accessible Scrollbar: Remove unused function.

The default implementation returns the
right role already.

Change-Id: I29146e70cef56a65e2073581ac63cf54e39be89d
Reviewed-on: http://codereview.qt-project.org/5027
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agomerge translate() overloads
Oswald Buddenhagen [Mon, 19 Sep 2011 18:18:08 +0000 (20:18 +0200)]
merge translate() overloads

Change-Id: I58f0d2c2ec6da751860a90096c49c662658643c1
Reviewed-on: http://codereview.qt-project.org/5164
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
12 years agoAccessible Scrollbar: Remove virtual children, value interface
Frederik Gladhorn [Thu, 8 Sep 2011 17:05:18 +0000 (19:05 +0200)]
Accessible Scrollbar: Remove virtual children, value interface

Change-Id: I3a8e74130eb79d289143cb7ac7b8c47cdd3db90c
Reviewed-on: http://codereview.qt-project.org/4819
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFixes to the Xdnd code in xcb
Lars Knoll [Tue, 20 Sep 2011 16:11:39 +0000 (18:11 +0200)]
Fixes to the Xdnd code in xcb

Make sure we move the drag pixmap when required,
and readd some commented out code from Qt 4.x.

Change-Id: Ib4302b394f4ac7b966d0146267651b9c3860c62b
Reviewed-on: http://codereview.qt-project.org/5262
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix support for drag pixmaps
Lars Knoll [Tue, 20 Sep 2011 16:10:39 +0000 (18:10 +0200)]
Fix support for drag pixmaps

Re-add the support for drag pixmaps to qdnd.
Use the new WindowTransparentForMouseEvents
flag for the window that shows the drag pixmap.

Change-Id: I4b594085c161475988b9be0ffdc02c75fcc37f66
Reviewed-on: http://codereview.qt-project.org/5261
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd Qt::WindowTransparentForMouseEvents
Lars Knoll [Tue, 20 Sep 2011 16:09:08 +0000 (18:09 +0200)]
Add Qt::WindowTransparentForMouseEvents

Add a flag for output only windows that are
transparent for mouse events and implement it
for the xcb backend.

Change-Id: I24afdb6b27de34bcdf0c061a5a4987ac2880e4ae
Reviewed-on: http://codereview.qt-project.org/5260
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCreate the window when needed
Lars Knoll [Mon, 19 Sep 2011 19:10:07 +0000 (21:10 +0200)]
Create the window when needed

We need to create the XWindow here to
avoid crashes, when resizing the backing store
before creating the window.

Change-Id: Ib8d9efca3552e5a91f5f63a9262449080ae301e5
Reviewed-on: http://codereview.qt-project.org/5259
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoReturn the correct geometry
Lars Knoll [Mon, 19 Sep 2011 19:08:36 +0000 (21:08 +0200)]
Return the correct geometry

When the platform window is created, it is the
authorative source for geometry information.

It would however be better if we could completely
avoid duplicated places for the geometry data.

Change-Id: Id90b24b9c40acb57f3d11b8b927292c06bac335e
Reviewed-on: http://codereview.qt-project.org/5258
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCompile
Jan-Arve Saether [Tue, 20 Sep 2011 07:59:13 +0000 (09:59 +0200)]
Compile

Change-Id: I27c2fabf1f4b0fdb9a1c3fd238b92f46a339a721
Reviewed-on: http://codereview.qt-project.org/5209
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCheck argument count before accessing argument.
Frederik Gladhorn [Tue, 13 Sep 2011 12:38:09 +0000 (14:38 +0200)]
Check argument count before accessing argument.

Also use QList::at instead of operator[].

Fixes: QTBUG-21403
Reviewed-by: Gabi
(cherry picked from commit 6997b836f445908cf53c1c96a69e3eb7ba535706)

Change-Id: I5d9de189e931b2b55fbd7baab0baad94adae352b
Reviewed-on: http://codereview.qt-project.org/4782
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoRemove testlib's dependency on gui and widgets
Kent Hansen [Fri, 16 Sep 2011 08:03:04 +0000 (10:03 +0200)]
Remove testlib's dependency on gui and widgets

Commit 37d76a679878d7c07f8a2cb17f7bda46f6582572
made testlib depend on gui and widgets. It shouldn't.
Changing the includes was enough.
It's the application (e.g. autotest) that uses the
gui/widgets features that should link against gui/widgets.

Change-Id: If80d30a7eca2cac78cb5c6e5d29c82a06fb9f1dd
Reviewed-on: http://codereview.qt-project.org/5095
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agotestlib: Remove widgets dependency when only using gui
Kent Hansen [Tue, 20 Sep 2011 05:59:46 +0000 (07:59 +0200)]
testlib: Remove widgets dependency when only using gui

There's api in testlib that should only be available
if the application links against widgets.

Change-Id: I22e382c6710690866ed8ffed81bae27b548dc830
Reviewed-on: http://codereview.qt-project.org/5094
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
12 years agoDon't run multiexec test with file logging
Jason McDonald [Wed, 21 Sep 2011 00:38:09 +0000 (10:38 +1000)]
Don't run multiexec test with file logging

The multiexec test runs the same test object five times.  If the -o
option is given, the output file is overwritten by each run of the test
object, meaning that tst_selftest only sees 1/5 of the test output in a
file compared with what it sees on the console.  This makes it
impossible to use the expected output file to verify the test for both
console and file output.  This issue is noted in QTBUG-21561.

Change-Id: I00031a2ea43a7ef78e8317473a089306ec062d8e
Reviewed-on: http://codereview.qt-project.org/5270
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove printf calls from warnings selftest
Jason McDonald [Tue, 20 Sep 2011 07:19:26 +0000 (17:19 +1000)]
Remove printf calls from warnings selftest

The warnings selftest verifies that qtestlib correctly handles output
sent via qDebug() and friends.  The test had a number of printf calls
that were used to tell the user what output they should expect to see
next, but by bypassing testlib's logging, these made the testlog differ
depending on whether the test log was directed to the console or a file.

The printf calls are no longer needed, as any regressions in qDebug will
be detected by tst_selftests, which compares the output of the warnings
test with a reference copy of the expected output.

Change-Id: I8c3a3237463141fa494c50ca02062760cb583090
Reviewed-on: http://codereview.qt-project.org/5200
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoThis passes just fine
Lars Knoll [Thu, 15 Sep 2011 12:47:41 +0000 (14:47 +0200)]
This passes just fine

Task-number: QTBUG-21424
Change-Id: Ied95373b2cf3882ec4f352ccbc285b578c66f83d
Reviewed-on: http://codereview.qt-project.org/5003
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoThis test passes fine.
Lars Knoll [Thu, 15 Sep 2011 12:42:45 +0000 (14:42 +0200)]
This test passes fine.

Task-number: QTBUG-21402
Change-Id: Ied00dd2302b08d75e44c102f6025123b41657ca6
Reviewed-on: http://codereview.qt-project.org/5001
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix last few autotest gui/widgets dependencies
Kent Hansen [Tue, 20 Sep 2011 06:00:59 +0000 (08:00 +0200)]
Fix last few autotest gui/widgets dependencies

This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.

Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).

Change-Id: Ifd15f72e2c553fba0c399c921957c4e955bb590d
Reviewed-on: http://codereview.qt-project.org/5191
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoImplemented key filter support on platform input context
Pekka Vuorela [Tue, 20 Sep 2011 12:33:27 +0000 (15:33 +0300)]
Implemented key filter support on platform input context

As previously with QInputContext, now supporting filterEvent()
interface. Usage only on XCB so far.

Change-Id: I8e5972626552bda32318fe060017d0217bb79a94
Reviewed-on: http://codereview.qt-project.org/5240
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove stale QtDeclarative dependency on QtOpenGL
Kent Hansen [Tue, 20 Sep 2011 07:29:35 +0000 (09:29 +0200)]
Remove stale QtDeclarative dependency on QtOpenGL

QtDeclarative doesn't link against QtOpenGL anymore.

This line was implicitly causing the QtWidgets library
to get linked in as well.

Change-Id: I56e6e9db52eec7fc924506bfeb4b7931ea04e616
Reviewed-on: http://codereview.qt-project.org/5204
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoCocoa: Adjust touch point rectangle by -0.5.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 13:45:29 +0000 (15:45 +0200)]
Cocoa: Adjust touch point rectangle by -0.5.

The actual touch point is supposed to be in the center of the rectangle,
and since the rectangle is 1x1 it means we have to subtract 0.5 from x
and y.

Change-Id: Ica4aba26dbe61328c8e7cbdcf8b02c96e2f41a40
Reviewed-on: http://codereview.qt-project.org/5256
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoCocoa: Update the geometry whenever the window moves.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 13:04:54 +0000 (15:04 +0200)]
Cocoa: Update the geometry whenever the window moves.

Change-Id: I3d47d62aaa0b4ccc88159ba9b6d1a3ebd42fedf5
Reviewed-on: http://codereview.qt-project.org/5255
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoCocoa: Add helper functions for NSPoint <-> QPoint(F) conversion.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 12:11:50 +0000 (14:11 +0200)]
Cocoa: Add helper functions for NSPoint <-> QPoint(F) conversion.

... and use [NSEvent mouseLocation] as global mouse position rather than
relying on QCursor::pos() (which is buggy at the moment).

Change-Id: Ieb8000089d0d824bed89abd8b2add9e28273f227
Reviewed-on: http://codereview.qt-project.org/5254
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoQWindowSystemInterface: Fix wrong mapping of coordinates.
Bjørn Erik Nilsen [Tue, 20 Sep 2011 10:17:28 +0000 (12:17 +0200)]
QWindowSystemInterface: Fix wrong mapping of coordinates.

QTouchEvent::TouchPoint assumes the rect() is in local coordinates,
whereas QWindowSystemInterface::TouchPoint uses screen coordinates.
We must therefore use QWindowSystemInterface::TouchPoint::area as the
screenRect() rather that the rect() and then use the screen coordinate
to calculate the local coordinate by using mapFromGlobal.

Change-Id: If7a52f5668c3938f46bdd38a5ea82b5313d6b626
Reviewed-on: http://codereview.qt-project.org/5253
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years ago[blitter] Fix memory leak in the blitter paintengine
Holger Hans Peter Freyther [Tue, 20 Sep 2011 13:23:02 +0000 (15:23 +0200)]
[blitter] Fix memory leak in the blitter paintengine

The raster engine and the capabilities were leaked, use the
QScopedPointer to prevent that from happening.

Change-Id: I31ba0117280b48ad942fbb638fb151ccb7b34385
Merge-request: 59
Reviewed-on: http://codereview.qt-project.org/5242
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years ago[blitter] Use QScopedPointer for the engine and blittable
Holger Hans Peter Freyther [Tue, 20 Sep 2011 13:23:03 +0000 (15:23 +0200)]
[blitter] Use QScopedPointer for the engine and blittable

Use the QScopedPointer to prevent memory leaks, right now
the code appears to be sound but make it more clear that
calling ::setBlittable will destroy the old one.

Change-Id: Idc71add7cfd429ff5b9d0ea9908d9fff1e7ce74d
Merge-request: 59
Reviewed-on: http://codereview.qt-project.org/5243
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUse QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT
Aleksandar Stojiljkovic [Thu, 8 Sep 2011 09:00:41 +0000 (12:00 +0300)]
Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT

Task-number: QTBUG-21162 - Letters get truncated when font size=72 and set to Italic
Reviewed-by: Eskil
(cherry picked from commit cd43d6386de6e66379fa23c1ea4ec06141167c86)

Change-Id: Ic05f775975d5f21e0274e7b2c3a4903d6a4ae41f
Reviewed-on: http://codereview.qt-project.org/5203
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoGenerate glyphs in un-transformed coordinate system.
Samuel Rødal [Fri, 2 Sep 2011 11:48:26 +0000 (13:48 +0200)]
Generate glyphs in un-transformed coordinate system.

Avoids rounding issues with very large coordinates.

Task-number: QTBUG-21262 - QRasterPaintEngine & QFontEngineFT - fonts corrupted when scrolling to the bottom of long texts
Reviewed-by: Eskil
Signed-off-by: Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com>
(cherry picked from commit 43e013e2048e8193e2d31276cac6348a9f6ce340)

Change-Id: I5810a1a60f2bbdba4889a6b5e493b183018f3976
Reviewed-on: http://codereview.qt-project.org/5202
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
12 years agoAvoid double caching glyphs in raster/QPA/FreeType
Eskil Abrahamsen Blomfeldt [Fri, 16 Sep 2011 14:00:04 +0000 (16:00 +0200)]
Avoid double caching glyphs in raster/QPA/FreeType

Since FreeType has internal caching, it has had a special
code path in the raster engine which avoided using Qt's glyph
cache, as that would be redundant. However, when compiling
with QPA, we want the same behavior without being able to
access the QFontEngineFT class. To achieve this, I've made
a new abstraction and added it to QFontEngine which allows
the FT engine to provide direct pointers into the alpha maps
stored by FT. This requires a locking/unlocking mechanism.

Yes, the QFontEngine::alphaMap* API is slowly becoming a horrible
mess, but due to time constraints, the task of refactoring these
functions into a more flexible API needs to wait. I've added a
TODO comment for this.

Change-Id: I08237403c2967f8fb952258178676f33a87c0353
Reviewed-on: http://codereview.qt-project.org/5155
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImprove globaldata testlib selftest.
Jason McDonald [Tue, 20 Sep 2011 03:13:34 +0000 (13:13 +1000)]
Improve globaldata testlib selftest.

Make the test use qDebug instead of printf, so that the reference test
output is the same regardless of whether the log goes to the console or
a file.

Also rename the test class, as it was evidently cut-n-pasted from the
subtest selftest without being renamed.

Change-Id: I8df1f0989f2e8c33c1f829ba8110fd740ff70f63
Reviewed-on: http://codereview.qt-project.org/5184
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSplit subtest selftest
Jason McDonald [Tue, 20 Sep 2011 01:56:31 +0000 (11:56 +1000)]
Split subtest selftest

This test was attempting to verify two completely unrelated things, so
this commit splits it into two tests.

Also, printf calls are replaced by qDebug so that the test does not
bypass the testlib loggers.

Change-Id: I1a202af38ce2c69690a32d93405ba604ec6cabee
Reviewed-on: http://codereview.qt-project.org/5178
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove waitwithoutgui testlib selftest
Jason McDonald [Tue, 20 Sep 2011 00:39:58 +0000 (10:39 +1000)]
Remove waitwithoutgui testlib selftest

This test is not useful for finding bugs in qtestlib's logging code,
because it bypasses the qtestlib loggers and doesn't play nice with
tst_selftest.  Neither is this test very useful for finding bugs in
QTest::qWait(), as the test only proves the qWait() terminates, not that
it waits accurately, or even that it waits at all.

Change-Id: Ia5dd7cbaf3a6fbb4e94e54ed155263580e495694
Reviewed-on: http://codereview.qt-project.org/5173
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix compilation
Lars Knoll [Fri, 16 Sep 2011 12:24:26 +0000 (14:24 +0200)]
Fix compilation

Change-Id: I6eec01349126393183ec8df99a50f96c192ee0c2
Reviewed-on: http://codereview.qt-project.org/5099
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoNo dependencies on opengl, widgets and printsupport
Lars Knoll [Fri, 16 Sep 2011 12:22:48 +0000 (14:22 +0200)]
No dependencies on opengl, widgets and printsupport

The problem is that the libQtPlatformSupport.prl file
will otherwise add these as link dependencies, making any
platform plugin link against these.

Change-Id: Ief71726e86990bb44b12cf86e78b844a1a23ae3c
Reviewed-on: http://codereview.qt-project.org/5098
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFixed wrong mouse coordinate mapping.
Samuel Rødal [Mon, 19 Sep 2011 13:01:19 +0000 (15:01 +0200)]
Fixed wrong mouse coordinate mapping.

QApplication::pickMouseReceiver() does the appropriate mapping if the
receiver changes.

Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac
Reviewed-on: http://codereview.qt-project.org/5148
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCocoa platform plugin: Reduce multitouch area to be one pixel.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 16:47:20 +0000 (18:47 +0200)]
Cocoa platform plugin: Reduce multitouch area to be one pixel.

Mac only support multitouch points, hence width/height 1. Also add
comment about performance related to multitouch events.

Change-Id: I307261492366e361e17f9edf446f456c07c87a22
Reviewed-on: http://codereview.qt-project.org/5162
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
12 years agoFix regression causing synthesized oblique glyphs to clip
Eskil Abrahamsen Blomfeldt [Mon, 19 Sep 2011 13:55:39 +0000 (15:55 +0200)]
Fix regression causing synthesized oblique glyphs to clip

In 20009ed797fb30952a889df5716aa2399102be58 I introduced a new
approach to synthesized oblique. However, while the embolden
function in FT alters the glyph metrics accordingly, the
oblique function does not, so the glyphs would be clipped to the
original, unslanted metrics. So I've implemented the same matrix
in the loadGlyph() function and we now apply this to the metrics
manually. This will only work as long as the underlying algorithm
doesn't change significantly.

Task-number: QTBUG-21202
Change-Id: Ic20b2a0fdeac5ce833e95fd06efa12b3b70feee5
Reviewed-on: http://codereview.qt-project.org/5156
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoCocoa platform plugin: update headers for multitouch.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:12:20 +0000 (15:12 +0200)]
Cocoa platform plugin: update headers for multitouch.

See commit: b888bf1b515b47bc12dfaeac06f33af762ce0372
(Moved multitouch code from gui/widgets/ to plugins/platforms/cocoa)

Change-Id: I7c71f4d858cba4918392d477c6597b48e271ea99
Reviewed-on: http://codereview.qt-project.org/5154
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoCocoa platform plugin: Implement multitouch support.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:07:15 +0000 (15:07 +0200)]
Cocoa platform plugin: Implement multitouch support.

Change-Id: Ic4b5bc4e48bd1e70cffedf15530b8a933037de66
Reviewed-on: http://codereview.qt-project.org/5153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMac: Adapt multitouch code for cocoa to QWindowSystemInterface.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:05:12 +0000 (15:05 +0200)]
Mac: Adapt multitouch code for cocoa to QWindowSystemInterface.

Change-Id: I4a80ed8a497dfb1b8b477e4a40ec91a16f1bb541
Reviewed-on: http://codereview.qt-project.org/5152
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMac: Move multitouch support from widgets to cocoa platform plugin.
Bjørn Erik Nilsen [Mon, 19 Sep 2011 13:03:53 +0000 (15:03 +0200)]
Mac: Move multitouch support from widgets to cocoa platform plugin.

Change-Id: I91994801aefa1257e7bda51b409290f70ab9128e
Reviewed-on: http://codereview.qt-project.org/5151
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoMake sure to clip in QXcbBackingStore::flush()
Samuel Rødal [Mon, 19 Sep 2011 11:42:20 +0000 (13:42 +0200)]
Make sure to clip in QXcbBackingStore::flush()

Clip to image and window dimensions to prevent X errors.

Change-Id: I7fa581217444e00d6eb83ac356c600f86ae03636
Reviewed-on: http://codereview.qt-project.org/5140
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
12 years agoMove handling of -qmljsdebugger argument to QCoreApplication
Kai Koehne [Mon, 19 Sep 2011 08:56:12 +0000 (10:56 +0200)]
Move handling of -qmljsdebugger argument to QCoreApplication

Move handling of -qmljsdebugger= argument from QApplication
to QCoreApplication. It makes sense to allow debugging also
for applications based on QCoreApplication (which we intend
to support in QtDeclarative).

Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36
Reviewed-on: http://codereview.qt-project.org/5121
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoRemoving XFail from one test, since QCursor::setPos now works for qpa
Holger Ihrig [Mon, 19 Sep 2011 11:40:00 +0000 (13:40 +0200)]
Removing XFail from one test, since QCursor::setPos now works for qpa

Task-number: QTBUG-20753

Change-Id: I0e381f22f6d94c5991ac3425f75e682708857aa2
Reviewed-on: http://codereview.qt-project.org/5139
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
12 years agoSay hello to QWindow::accessibleRoot()
Jan-Arve Saether [Fri, 16 Sep 2011 11:33:07 +0000 (13:33 +0200)]
Say hello to QWindow::accessibleRoot()

Change-Id: I1efa71f01f8af46c9addf2aae21e4b6fc086ad2e
Reviewed-on: http://codereview.qt-project.org/5087
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdd parent and child functions to QAccessibleInterface.
Frederik Gladhorn [Thu, 15 Sep 2011 19:41:54 +0000 (21:41 +0200)]
Add parent and child functions to QAccessibleInterface.

Stop the mis-use of navigate to find the parent.
In order to make navigation straight forward
parent and child functions are now part of
QAccessibleInterface.
This allows navigating the hierarchy of
accessible objects without the 1-based indexes in the
navigate function which lead to confusion.

Eventually the support for Ancestor in navigate can be completely removed
and forwarded in the windows bridge if needed.

In addition default parameters for virtual children.
This will make the transition smooth since it allows to remove the integer
already.

Change-Id: I278287ce17161f9fa46797ac244676778c859576
Reviewed-on: http://codereview.qt-project.org/5024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoInitialize in the right order
Gunnar Sletta [Mon, 19 Sep 2011 08:32:48 +0000 (10:32 +0200)]
Initialize in the right order

Change-Id: I605c92bb43ea304cc812f85dc9937c161b2279f6
Reviewed-on: http://codereview.qt-project.org/5120
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>