profile/ivi/qtbase.git
13 years agoDon't issue GL calls when the geometry is empty
Eskil Abrahamsen Blomfeldt [Tue, 5 Jul 2011 08:33:59 +0000 (10:33 +0200)]
Don't issue GL calls when the geometry is empty

This works as a band-aid and optimization for QT-5104, because in the
text in the example, which contains latin text and has a latin default
font set, will think of all spaces between the cyrillic characters as
latin characters, hence it will make separate text items for them and
issue separate glDrawElements() calls. By cutting off if there are no
glyphs to draw, we can avoid hitting the actual bug for this and several
other use cases, making it less likely to happen.

Task-number: QT-5104
Reviewed-by: Samuel
(cherry picked from commit f51b5fe09c63e4b3c2ab5a4d06e162c43d38207d)

Change-Id: Id80f55ce403a7aa112c3abb314d080aa43c0078b
Reviewed-on: http://codereview.qt.nokia.com/1158
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoFixed compile of QtOpenGL on Mac & QPA.
Rohan McGovern [Tue, 5 Jul 2011 03:11:09 +0000 (13:11 +1000)]
Fixed compile of QtOpenGL on Mac & QPA.

Replace a Q_WS_MAC test (which is not true for Mac & QPA) with Q_OS_MAC
(which is always true on Mac).

Change-Id: Ie3d12bae233d44b3607f4c57a0c65059d0d6ccb9
Reviewed-on: http://codereview.qt.nokia.com/1129
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
13 years agoFixed opengldesktop configure test for mac.
Rohan McGovern [Tue, 5 Jul 2011 01:02:44 +0000 (11:02 +1000)]
Fixed opengldesktop configure test for mac.

This configure test has never worked for mac.

In a non-qpa configuration, this didn't matter, as the configure script
would skip this configure test on mac.  The configure script could also
be modified to skip the configure test in the qpa case, but it seems
cleaner to make the test actually work.

Change-Id: I0402c490fc4c2401f6363ba2215b261f74ee5d75
Reviewed-on: http://codereview.qt.nokia.com/1127
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
13 years agofixed typo in .pro file
Matthew Cattell [Mon, 4 Jul 2011 14:58:53 +0000 (16:58 +0200)]
fixed typo in .pro file

Change-Id: I78a23177deb55a9be15fe19fc841dbf2223332ec
Reviewed-on: http://codereview.qt.nokia.com/1088
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoRemove config.tests/unix/ipv6
Markus Goetz [Mon, 4 Jul 2011 11:34:21 +0000 (13:34 +0200)]
Remove config.tests/unix/ipv6

Change-Id: I3b5a05cc70ee205f44b2ee1e7b49e57f8d8fdbcb
Reviewed-on: http://codereview.qt.nokia.com/1064
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoQNam remove compile warnings for QNetworkReplyHttpImpl
Martin Petersson [Mon, 4 Jul 2011 13:48:28 +0000 (15:48 +0200)]
QNam remove compile warnings for QNetworkReplyHttpImpl

Change-Id: I677a72a1cdcb295dd87d2559163e6f56e97c40c8
Reviewed-on: http://codereview.qt.nokia.com/1083
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
13 years agomake argument quoting code on windows less arcane
Oswald Buddenhagen [Thu, 30 Jun 2011 17:05:57 +0000 (19:05 +0200)]
make argument quoting code on windows less arcane

Change-Id: I6eca1d336ff770d3e5548e58137ca0053d4f63db
Reviewed-on: http://codereview.qt.nokia.com/963
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
13 years agofix argument quoting on windows
Oswald Buddenhagen [Thu, 30 Jun 2011 17:04:24 +0000 (19:04 +0200)]
fix argument quoting on windows

quotes prefixed with multiple backslashes would not be escaped
correctly.

Change-Id: I56ec72e31bb4ed2b9119ec1996448f803f89ce35
Reviewed-on: http://codereview.qt.nokia.com/962
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
13 years agoAdd QScreenOrientationChangeEvent and rotation support to wayland client
Lasse Holmstedt [Mon, 4 Jul 2011 10:08:38 +0000 (12:08 +0200)]
Add QScreenOrientationChangeEvent and rotation support to wayland client

Qt Compositor propagates screen orientation changes to wayland, which
are then picked up by the wayland client. The wayland client then sends
a QScreenOrientationChangeEvent to QApplication, which can handle the
orientation change.

Change-Id: Ieb2225e52b7e3c318648f2cb21dab7937f301505
Reviewed-on: http://codereview.qt.nokia.com/1063
Reviewed-by: Matthias Ettrich
13 years agoAlways assume IPv6 support
Markus Goetz [Fri, 1 Jul 2011 12:09:46 +0000 (14:09 +0200)]
Always assume IPv6 support

It's 2011 baby! And until Qt5 is released probably 2012 :-)

Change-Id: I397aabf25e93c8afb5f562636710985cf0c7acfa
Reviewed-on: http://codereview.qt.nokia.com/1008
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Markus Goetz
13 years agoAdd Happy-Eyeballs style IPv6 connection establishing.
Martin Petersson [Fri, 1 Jul 2011 11:26:47 +0000 (13:26 +0200)]
Add Happy-Eyeballs style IPv6 connection establishing.

In the cases where a DNS lookup will give you both an IPv4 and IPv6
address, this will start two connection channels at the same time.
One trying to connect using IPv4 and one on IPv6. This is done so
that we can use the fastest one for the connection. To do this we
have to do the hostlookup in the connection. The result is then
in the cache for the individual socket so it will not need to do
another lookup.

Task-number: QTBUG-16458
Change-Id: I806c20168d9c5edc2831b80f82a2bd570b36d5fa
Reviewed-on: http://codereview.qt.nokia.com/1003
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
13 years agoMove the composition example in the docs.
Casper van Donderen [Wed, 29 Jun 2011 10:15:06 +0000 (12:15 +0200)]
Move the composition example in the docs.

Change-Id: I63e906e78de75466b9c9bf99d553691c8335f9b2
Reviewed-on: http://codereview.qt.nokia.com/903
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
13 years agoDoc: Fixed qdoc warnings.
David Boddie [Fri, 3 Jun 2011 13:38:44 +0000 (15:38 +0200)]
Doc: Fixed qdoc warnings.

Change-Id: I7b4e9ef513b82a82d2365c9256d09520a44ad10d
Reviewed-on: http://codereview.qt.nokia.com/324
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoImplemented on-screen visibility handling via wayland
Martin Zielinski [Mon, 27 Jun 2011 07:23:13 +0000 (09:23 +0200)]
Implemented on-screen visibility handling via wayland

The compositor informs the client about it's window not being visible at all.
This is handled here by dispatching a ApplicationActivated/ApplicationDeactivated event.
The application than is free to handle this event and stop rendering and other not
needed processing.

Change-Id: I1dcc3f2a4a8e63ad5cc4f89cbf82cc63f779edbf
Reviewed-on: http://codereview.qt.nokia.com/763
Reviewed-by: Lasse Holmstedt
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agoFix resource leak in QFontEngineDirectWrite
Eskil Abrahamsen Blomfeldt [Thu, 30 Jun 2011 10:54:46 +0000 (12:54 +0200)]
Fix resource leak in QFontEngineDirectWrite

Bug introduced by f54c5d9133d7aa7636988db36fa6cc51d26434b6. The release
statement has to come before the return statement :)

Reviewed-by: Jiang Jiang
(cherry picked from commit d58eec3c932d1cdbcf3b42534e8fe870ec109487)

Change-Id: Ib0b550ead3f971736142d88f4ca19bb8edc1b654
Reviewed-on: http://codereview.qt.nokia.com/949
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoFix transformations on DirectWrite rasterized text
Eskil Abrahamsen Blomfeldt [Thu, 30 Jun 2011 09:57:09 +0000 (11:57 +0200)]
Fix transformations on DirectWrite rasterized text

There were a few bugs in the DirectWrite font engine that caused
transformed text to break.

First of all, alphaMapForGlyph() ignored the transform, so no gray
antialiased text would be transformed.

Second of all, the imageForGlyph() function would use the wrong
bounding box for the rasterized glyph, causing its positioning to
become a little bit off when rotating. The fix is to get the bounding
box from the system and add a margin to this instead of trying to predict
how it will appear after the vertical hinting etc. has been applied.

So that the positioning metrics are in sync with the actual metrics used
by the alphaMap* functions, we also need to implement the
alphaMapBoundingBox() function.

Task-number: QTBUG-19829
Reviewed-by: Jiang Jiang
(cherry picked from commit f54c5d9133d7aa7636988db36fa6cc51d26434b6)

Change-Id: I3c3840b41e19fcacf926dbf454bdc2cba4bd5a99
Reviewed-on: http://codereview.qt.nokia.com/948
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoAdd a touchscreen generic qpa plugin.
Laszlo Agocs [Thu, 30 Jun 2011 09:24:35 +0000 (12:24 +0300)]
Add a touchscreen generic qpa plugin.

Change-Id: Iaf79df05eb4f60d254d95f5d0f280a8f8f8a8de8
Reviewed-on: http://codereview.qt.nokia.com/941
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoFix text color in some cases of QML and QStaticText
Eskil Abrahamsen Blomfeldt [Tue, 28 Jun 2011 15:07:13 +0000 (17:07 +0200)]
Fix text color in some cases of QML and QStaticText

This reverts 518c2a58ed6fdfd7449cb4476aa8ea0d32ad16e3 which caused a
regression.

When writing systems are mixed and an underline is set on the font,
QPainter will set a pen with the current color and a new width on
itself before drawing the decoration. This would cause the recorder
in QStaticText to mark the pen as dirty, saving the current pen
color in all subsequent text items. The effect was e.g. that in QML
the cached color would override the current one, making it impossible
to change the color on the text without forcing a relayout somehow.

The right fix is to only mark the pen as dirty when its color actually
changes.

Task-number: QTBUG-20159
Change-Id: Ia819b67cccc9eaedd23fde655eab58cd892646f8
Reviewed-by: Jiang Jiang
Reviewed-on: http://codereview.qt.nokia.com/870
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoAdd HB_LineBreakType to qharfbuzz_copy_p.h.
Frederik Gladhorn [Tue, 21 Jun 2011 09:24:35 +0000 (11:24 +0200)]
Add HB_LineBreakType to qharfbuzz_copy_p.h.

The QTextLayout relies on this enum to be defined.

Change-Id: Ibcc8a0073bd56e29431c52c4ea54a909ff42f07b
Reviewed-on: http://codereview.qt.nokia.com/537
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
13 years agoMove glyph run merging logic to QTextLayout level
Jiang Jiang [Thu, 30 Jun 2011 10:45:44 +0000 (12:45 +0200)]
Move glyph run merging logic to QTextLayout level

So that we can merge glyph runs from different QTextLines.

Change-Id: Id8e0cc1aa21a482a995773fd55599c0011245e82
Reviewed-on: http://codereview.qt.nokia.com/950
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agomake QHoverEvent inherit from QInputEvent
Lars Knoll [Wed, 29 Jun 2011 08:16:34 +0000 (10:16 +0200)]
make QHoverEvent inherit from QInputEvent

QHoverEvent is an input event and as such should
also contain the current keyboard modifiers.

Change-Id: Ic403a8511eb991a9c6b5132908af1d5900869361
Reviewed-on: http://codereview.qt.nokia.com/937
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agoAdd touch event support to wayland plugin.
Laszlo Agocs [Wed, 29 Jun 2011 14:03:19 +0000 (17:03 +0300)]
Add touch event support to wayland plugin.

Change-Id: If4be4965ae4e9898f5afb756632aa0349bd9b149
Reviewed-on: http://codereview.qt.nokia.com/935
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoAdd core-private to the qmainwindow autotest
Prasanth Ullattil [Wed, 29 Jun 2011 13:51:17 +0000 (15:51 +0200)]
Add core-private to the qmainwindow autotest

Change-Id: If7ec64903a31e0588e9dccb6bbda0589c8df5be7
Reviewed-on: http://codereview.qt.nokia.com/904
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoCleaning up the QPainter/arthur testing stuff
aavit [Wed, 29 Jun 2011 11:24:37 +0000 (13:24 +0200)]
Cleaning up the QPainter/arthur testing stuff

This removes various remains of historical test tools, and the entire
tests/arthur directory. The living parts are now:
tests/auto/lancelot  - including the suite of qps scripts. The
                       script engine now lives here.
tests/baselineserver - moved to toplevel since not arthur-specific.
tests/manual/lance   - for manual running and editing of qps scripts.

Change-Id: I7c7f5df9197f4984a918dd1f9b31f42ee80d6152
Reviewed-on: http://codereview.qt.nokia.com/895
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
13 years agoRemove the remaining QT3_SUPPORT code in corelib
Lars Knoll [Tue, 28 Jun 2011 21:43:58 +0000 (23:43 +0200)]
Remove the remaining QT3_SUPPORT code in corelib

Change-Id: I6641c62d75d2034a46ea7cc869ae65285ae8b8f4
Reviewed-on: http://codereview.qt.nokia.com/866
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoremove QT3_SUPPORT in corelib/io
Lars Knoll [Tue, 28 Jun 2011 21:33:34 +0000 (23:33 +0200)]
remove QT3_SUPPORT in corelib/io

Change-Id: Ia9ad0bebacc538a7392afb0fdcca40e8a2bb687b
Reviewed-on: http://codereview.qt.nokia.com/865
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoRemove QT3_SUPPORT from corelib/codecs
Lars Knoll [Tue, 28 Jun 2011 21:22:01 +0000 (23:22 +0200)]
Remove QT3_SUPPORT from corelib/codecs

Change-Id: Ie674be85b64c5816ee0ad4bccc077943b7046136
Reviewed-on: http://codereview.qt.nokia.com/864
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoremove QT3_SUPPORT from corelib/tools
Lars Knoll [Tue, 28 Jun 2011 21:19:29 +0000 (23:19 +0200)]
remove QT3_SUPPORT from corelib/tools

Change-Id: Ie224cf992be675c7d405d4be05e4acd4157e590e
Reviewed-on: http://codereview.qt.nokia.com/863
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoRemove QT3_SUPPORT in src/corelib/global
Lars Knoll [Tue, 28 Jun 2011 21:09:52 +0000 (23:09 +0200)]
Remove QT3_SUPPORT in src/corelib/global

Change-Id: I3bda38801659125b49ef74537b22281a530b8e0a
Reviewed-on: http://codereview.qt.nokia.com/862
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoRemove Qt3 support functionality from parts of QtCore
Lars Knoll [Tue, 28 Jun 2011 10:17:34 +0000 (12:17 +0200)]
Remove Qt3 support functionality from parts of QtCore

Change-Id: I90f391e9bfc412087bd0401e28d2497571f81aa1
Reviewed-on: http://codereview.qt.nokia.com/825
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoMove the chip example in the docs.
Casper van Donderen [Wed, 29 Jun 2011 08:41:14 +0000 (10:41 +0200)]
Move the chip example in the docs.

Change-Id: I21b894569615d1c344d9799743148dad1cbbc5dd
Reviewed-on: http://codereview.qt.nokia.com/878
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
13 years agoMove the books example in the docs.
Casper van Donderen [Wed, 29 Jun 2011 08:28:19 +0000 (10:28 +0200)]
Move the books example in the docs.

Change-Id: I90624853c29752b2e7cee2e58b40f92f30e02dbe
Reviewed-on: http://codereview.qt.nokia.com/877
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
13 years agoMove the docs for the boxes example.
Casper van Donderen [Wed, 29 Jun 2011 08:23:31 +0000 (10:23 +0200)]
Move the docs for the boxes example.

Change-Id: I1a6dd6431a8e9a3243abde763a45f67573aa3aa4
Reviewed-on: http://codereview.qt.nokia.com/876
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
13 years agoTurn off Qt3 support by default
Lars Knoll [Tue, 28 Jun 2011 10:13:05 +0000 (12:13 +0200)]
Turn off Qt3 support by default

All QT3_SUPPORT functionality will go away with Qt 5
in any case, so let's turn it off in configure now.

Change-Id: Ic8cf483704ad0f1484b2cda097b8e0c915ff2bef
Reviewed-on: http://codereview.qt.nokia.com/824
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoPush the data together with the error in the synchronous case.
Pierre Rossi [Mon, 27 Jun 2011 16:46:01 +0000 (18:46 +0200)]
Push the data together with the error in the synchronous case.

As it turns out some test cases in QtWebKit rely on this.

Task-number: QTBUG-19556
Change-Id: I84c8abca5e9a018a4057c827fca973b8ebb39df6
Reviewed-on: http://codereview.qt.nokia.com/795
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
13 years agoRemove QPainter::UniteClip
Gunnar Sletta [Tue, 28 Jun 2011 13:08:12 +0000 (15:08 +0200)]
Remove QPainter::UniteClip

Change-Id: I5413cb5e2cbb53998bb40f27b9bbc16342caafe6
Reviewed-on: http://codereview.qt.nokia.com/837
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoRemove code with no consquence
Gunnar Sletta [Tue, 28 Jun 2011 12:02:37 +0000 (14:02 +0200)]
Remove code with no consquence

Change-Id: Ic048be26cd4ffe1094e4badd34a0df233aa9b5d5
Reviewed-on: http://codereview.qt.nokia.com/832
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
13 years agocompile on Mac OS X
Gunnar Sletta [Tue, 28 Jun 2011 12:19:51 +0000 (14:19 +0200)]
compile on Mac OS X

Change-Id: Ibe74e51aab6e6b8d7a0e71cd88dcc97f72fcd1f9
Reviewed-on: http://codereview.qt.nokia.com/833
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoAdd the richtext and tools demo-examples to build.
Casper van Donderen [Mon, 27 Jun 2011 08:31:24 +0000 (10:31 +0200)]
Add the richtext and tools demo-examples to build.

Change-Id: I3a64dc0fb11f9ebbcb0cb2f97598370ca5962a3c
Reviewed-on: http://codereview.qt.nokia.com/773
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoChange references to affine example.
Casper van Donderen [Mon, 27 Jun 2011 11:34:46 +0000 (13:34 +0200)]
Change references to affine example.

Because of the merge of demos and examples all references to all demos
have to be updated. This is the update for the affine example.

Change-Id: I83f24010162a73e11786587365c6f10b51d4bf4b
Reviewed-on: http://codereview.qt.nokia.com/774
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoFix invalid read in QUrl::removeAllEncodedQueryItems
Olivier Goffart [Tue, 28 Jun 2011 09:21:00 +0000 (11:21 +0200)]
Fix invalid read in QUrl::removeAllEncodedQueryItems

The remove will detach the string making the query pointer invalid.

Note: the "test3" case is commented out because it does not remove
the & at the end, and i do not want to enforce this behaviour in the
test

Task-number: QTBUG-20065
Change-Id: I195c5c3b468f46c797c7c4f8075303f2b1f4724c
Reviewed-on: http://codereview.qt.nokia.com/822
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoMake it compile with openssl 1.0.0d, gcc 4.6
Bernhard Rosenkraenzer [Mon, 27 Jun 2011 16:12:46 +0000 (18:12 +0200)]
Make it compile with openssl 1.0.0d, gcc 4.6

SSL_ctrl's prototype has changed slightly in openssl 1.0.0x - the 4th
argument is now a void* as opposed to a const void*.
gcc 4.6 doesn't allow this as an implicit cast.

Merge-request: 1239
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit 007f01a7e801d5409708e4b8de8b3ead1481cf7d)

Change-Id: I4f41af981cf0762383b3fc867ec5d726e2b1e5c6
Reviewed-on: http://codereview.qt.nokia.com/821
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoadd changes-5.0.0 file to document source incompatible changes
Peter Hartmann [Mon, 27 Jun 2011 14:05:22 +0000 (16:05 +0200)]
add changes-5.0.0 file to document source incompatible changes

Change-Id: Ia513f6f1d4f0654912507d0b7cbb5a57d0470b7e
Reviewed-on: http://codereview.qt.nokia.com/800
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoSSL example: update secure socket client example to use new cert API
Peter Hartmann [Mon, 27 Jun 2011 13:55:42 +0000 (15:55 +0200)]
SSL example: update secure socket client example to use new cert API

issuerInfo and subjectInfo now return a QStringList instead of a QString

Change-Id: I04174a7f6319ae156ac8de964d04c0525c9c5a9a
Reviewed-on: http://codereview.qt.nokia.com/799
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoAdd a test for multiple CNs and fix the rest of the tests for the API
Richard Moore [Fri, 24 Jun 2011 20:40:52 +0000 (21:40 +0100)]
Add a test for multiple CNs and fix the rest of the tests for the API

... change.

Add a new test for the support for repeated entries in the subject and
issuer. Fix the rest of the tests to pass with the new API.

Change-Id: I25fa84089e4aff5f15f53858171ce98b7fbf9dd7
Merge-request: 5
Reviewed-on: http://codereview.qt.nokia.com/798
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoUpdate the tests to handle multiple entries for subject and issuer info.
Richard Moore [Fri, 24 Jun 2011 20:23:45 +0000 (21:23 +0100)]
Update the tests to handle multiple entries for subject and issuer info.

Modify all the tests to take the first entry in the issuer and subject
info.

Change-Id: Ia8e6f294ddc162afebc411b0f519bdeb7ea8fdba
Merge-request: 5
Reviewed-on: http://codereview.qt.nokia.com/797
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoCertificates can have each issuer and subject field many times
Richard Moore [Sat, 18 Jun 2011 08:22:11 +0000 (09:22 +0100)]
Certificates can have each issuer and subject field many times

THIS COMMIT BREAKS SOURCE COMPATIBILITY BETWEEN Qt 4 AND Qt 5

Qt4 assumed that there was only one entry of each type in the subject
and issuer of a certificate. This is incorrect (eg. you can have many
common names). In addition, some of the fields required by RFC3280
were not suppport. This change modifiers the API to return a list of
entries of each type and adds support for the missing fields. It also
updates the commonname matching code for SSL connections to handle
multiple entries.

Change-Id: I9457266a205def0a07c13de47094ff56ead42845
Merge-request: 5
Reviewed-on: http://codereview.qt.nokia.com/796
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
13 years agoBuild Qt with option -Zc:wchar_t under MSVC
liang jian [Thu, 8 Jul 2010 10:56:03 +0000 (12:56 +0200)]
Build Qt with option -Zc:wchar_t under MSVC

This will make projects generated by visual studio being successfully
linked to the Qt dlls if they use the QString::fromWCharArray() or
QString::toWCharArray() methods.

Change-Id: Ie266576c1bcd44cf8534f12b10629b94ef3e1d3f
Merge-request: 727
Reviewed-on: http://codereview.qt.nokia.com/772
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoAdd missing APIs to QRawFont and some additional notes to fromFont
Jiang Jiang [Mon, 27 Jun 2011 13:23:03 +0000 (15:23 +0200)]
Add missing APIs to QRawFont and some additional notes to fromFont

Change-Id: I8487a2e32f5b71a1eb51dcb8540cb5de2def09f6
Reviewed-on: http://codereview.qt.nokia.com/769
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoUse floating point coordinates in events
Lars Knoll [Mon, 27 Jun 2011 11:36:03 +0000 (13:36 +0200)]
Use floating point coordinates in events

Use FP coordinates in Mouse, Wheel and Hover
events.

Change-Id: I8b43ca257620b4653ae5d6b6122c516384db1e48
Reviewed-on: http://codereview.qt.nokia.com/766
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agoAdd the mainwindows demos-examples to the build.
Casper van Donderen [Fri, 24 Jun 2011 09:24:21 +0000 (11:24 +0200)]
Add the mainwindows demos-examples to the build.

Change-Id: I6ec0be8f058ad127c759fff3c4082a596db53405
Reviewed-on: http://codereview.qt.nokia.com/752
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
13 years agoAdd the itemviews demos-examples to the build.
Casper van Donderen [Fri, 24 Jun 2011 09:18:58 +0000 (11:18 +0200)]
Add the itemviews demos-examples to the build.

Change-Id: I032216c228193040568ef5d547685b587d2a43e6
Reviewed-on: http://codereview.qt.nokia.com/751
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
13 years agoQStringBuilder: do not crash with null char*
Olivier Goffart [Mon, 27 Jun 2011 11:09:23 +0000 (13:09 +0200)]
QStringBuilder: do not crash with null char*

This is supported by the others operator+

Change-Id: I9a1d1a0afb63acf32935948111d43ca6da370363
Reviewed-on: http://codereview.qt.nokia.com/764
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
13 years agoRemoved damaging of waylandsurface after creation
Martin Zielinski [Mon, 27 Jun 2011 06:41:39 +0000 (08:41 +0200)]
Removed damaging of waylandsurface after creation

The damaging of the surface at this time causes graphical corruption
in the compositor, as the surface does not contain any rendered output yet.

Change-Id: I51392a68a7531db9901137b9861cb0291e16ff12
Reviewed-on: http://codereview.qt.nokia.com/743
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthias Ettrich
Reviewed-by: Lasse Holmstedt
13 years agoOnly compare styleNames if they are not empty
Jiang Jiang [Mon, 27 Jun 2011 08:15:39 +0000 (10:15 +0200)]
Only compare styleNames if they are not empty

Task-number: QTBUG-19366
(cherry picked from commit 15e6ac8f4d9e7a419cd0c10405954bde78559fac)

Change-Id: I5f06bb5133f23dbc8ad6d745d44ca0a85ef49686
Reviewed-on: http://codereview.qt.nokia.com/760
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoFix problem with cosmetic stroking of cubic beziers
aavit [Thu, 2 Jun 2011 13:29:11 +0000 (15:29 +0200)]
Fix problem with cosmetic stroking of cubic beziers

The new algorithm would fail if the start and end point were identical.
(cherry picked from commit 43ce5bab32e0d28366317be99df5e6df70787826)

Change-Id: I44c42b190db95b831fd04492e4afe3555fb3db50
Reviewed-on: http://codereview.qt.nokia.com/610
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoFix autotest to not depend on rasterization details
aavit [Tue, 31 May 2011 10:29:40 +0000 (12:29 +0200)]
Fix autotest to not depend on rasterization details

This test broke with 37c329a.
(cherry picked from commit 4f46153bce807a5c178a60ce89c38fdd30d13f49)

Change-Id: I29d1ddd67827492cc916330199cc4c708ae676c1
Reviewed-on: http://codereview.qt.nokia.com/609
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoStill use midpoint rendering of aliased ellipses
aavit [Tue, 31 May 2011 09:51:10 +0000 (11:51 +0200)]
Still use midpoint rendering of aliased ellipses

37c329a removed this, but it is required to get correct fills,
particularly for small radii

Reviewed-by: gunnar
(cherry picked from commit 9d0104d3da01e262d2178c864b4ba94f620eaa3b)

Change-Id: I41a5093f3cf725aee3abffde4d871566f0f8151e
Reviewed-on: http://codereview.qt.nokia.com/608
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoFix smaller bugs in the stroker
Lars Knoll [Thu, 19 May 2011 21:19:47 +0000 (23:19 +0200)]
Fix smaller bugs in the stroker

Calculating the continuation point for
closed contours was not taking transformations
and the half pixel offset into account.
(cherry picked from commit 31e9c098f3c9321eebf1ac3e4c44a2d18d3816b8)

Change-Id: I735d8e58fc3cf64668f546d5f42892d420d58e84
Reviewed-on: http://codereview.qt.nokia.com/607
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoCompilation fix of f8e8583
aavit [Thu, 19 May 2011 14:05:02 +0000 (16:05 +0200)]
Compilation fix of f8e8583

(cherry picked from commit 7cfd06ee22a875d7658ce6668b418e6f8c6f6480)

Change-Id: Iaaed01590874fbcc439f06c17a63f0343d49a9bb
Reviewed-on: http://codereview.qt.nokia.com/605
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoRevert "fix breakages in qpainter autotests."
aavit [Thu, 19 May 2011 10:48:35 +0000 (12:48 +0200)]
Revert "fix breakages in qpainter autotests."

This reverts commit 50a53d2f7a7e12cd597dc72a08ad62b79fee4554.
...which was required because of
69fc9e594e6d5da87bff42707973683f84b67c93
"Fix how subpixel positions are intepreted in an aliased grid."
which was reverted in f8e85838c5531b56c2175cbdb9c24db426f7fd89
because of 37c329a3e35fabc88fbcad824a69f37c671d2132
"New algorithm for drawing thin lines".

phew!
(cherry picked from commit 14bf7c3761efe208ce19047b8ddc3f811a63a437)

Change-Id: I16d672685efb1901927190c58ef1477c89d946c1
Reviewed-on: http://codereview.qt.nokia.com/604
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoRevert "Fix how subpixel positions are intepreted in an aliased grid."
aavit [Thu, 19 May 2011 07:27:19 +0000 (09:27 +0200)]
Revert "Fix how subpixel positions are intepreted in an aliased grid."

This reverts commit 69fc9e594e6d5da87bff42707973683f84b67c93.

Conflicts:

src/gui/painting/qpaintengine_raster.cpp
src/gui/painting/qrasterizer.cpp
(cherry picked from commit f8e85838c5531b56c2175cbdb9c24db426f7fd89)

Change-Id: I4f936404000e6fa88887d0fbe3fbde92c8edd259
Reviewed-on: http://codereview.qt.nokia.com/603
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoFix event delevery order
Olivier Goffart [Fri, 24 Jun 2011 15:26:20 +0000 (17:26 +0200)]
Fix event delevery order

Some functions (such as QObject::moveToThread) did not keep
the event ordered by priority.
And because qUpperBound is used to add events, that mean new
events would not be inserted in order.

Task-number: QTBUG19637
Change-Id: I38eb9addb1cdd45b8566e000361ac6e5f1f2c2b8
Reviewed-on: http://codereview.qt.nokia.com/733
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoAdd the painting demos-examples to build.
Casper van Donderen [Thu, 23 Jun 2011 14:46:25 +0000 (16:46 +0200)]
Add the painting demos-examples to build.

Change-Id: Ia6f23719af0ec3091573909b5666ec795ee22410
Reviewed-on: http://codereview.qt.nokia.com/685
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
13 years agoAdd the shared painting and affine example to the build.
Casper van Donderen [Wed, 22 Jun 2011 10:34:15 +0000 (12:34 +0200)]
Add the shared painting and affine example to the build.

Change-Id: I85e66c9a33a1c908b7588beb219cc9540698ab68
Reviewed-on: http://codereview.qt.nokia.com/623
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
13 years agoStore styleName in font database
Jiang Jiang [Thu, 9 Jun 2011 13:58:09 +0000 (15:58 +0200)]
Store styleName in font database

So that queries like QFontDatabase::styles() can return exactly
the same styles as the system does. Then application can use
QFont::setStyleName() to select those styles later. With a lot
of fonts not providing correct numeric weight/width values and
even if they did, values are usually not directly mapped to
QFont enums, styleName is probably the only reliable way to
select any possible font in the system.

Reviewed-by: QTBUG-13518
Change-Id: Id8a9469b804f1b5bb81d8c7378e7e8778f9a4fff
Reviewed-on: http://codereview.qt.nokia.com/739
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoAdd styleName to QFontDef comparison
Jiang Jiang [Thu, 23 Jun 2011 12:19:48 +0000 (14:19 +0200)]
Add styleName to QFontDef comparison

To make sure we cache different font engines with different style
names.

Task-number: QTBUG-19366
Change-Id: Iefaebd5418f212ff759e03c1745f839a7f23d013
Reviewed-on: http://codereview.qt.nokia.com/738
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agomy changelog for 4.8.0
Peter Hartmann [Thu, 23 Jun 2011 12:56:45 +0000 (14:56 +0200)]
my changelog for 4.8.0

(cherry picked from commit 9d5b0e31f287ce502eaf9a2c0876d900424c80ab)

Change-Id: If3d87498b7df94285d16982df55de9f318a26af2
Reviewed-on: http://codereview.qt.nokia.com/711
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoAdd the embedded demos-examples to the build.
Casper van Donderen [Thu, 23 Jun 2011 14:59:09 +0000 (16:59 +0200)]
Add the embedded demos-examples to the build.

Change-Id: Ib0a1e650913416e3ec05f1a86c139844a814f8bf
Reviewed-on: http://codereview.qt.nokia.com/686
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoAdd the graphicsview demo-examples to the build.
Casper van Donderen [Thu, 23 Jun 2011 09:15:43 +0000 (11:15 +0200)]
Add the graphicsview demo-examples to the build.

Change-Id: I2f97985db9e547c37db00c32b2e1a1658f076f75
Reviewed-on: http://codereview.qt.nokia.com/684
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoUpdate sql and animation demos to be an example.
Casper van Donderen [Wed, 22 Jun 2011 12:58:03 +0000 (14:58 +0200)]
Update sql and animation demos to be an example.

Change-Id: I683383e2dab9428ea3fe4cfffba24bb7fefbc7c7
Reviewed-on: http://codereview.qt.nokia.com/618
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoMove all other demos in qtbase to examples.
Casper van Donderen [Wed, 22 Jun 2011 11:54:56 +0000 (13:54 +0200)]
Move all other demos in qtbase to examples.

Change-Id: Iab0e7364d1f6b348d0e3033ea9304139f5bd6d0d
Reviewed-on: http://codereview.qt.nokia.com/617
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoMove the affine example.
Casper van Donderen [Wed, 22 Jun 2011 10:33:28 +0000 (12:33 +0200)]
Move the affine example.

Change-Id: I27a164495e469cb2a5c82688f35062b54be5e62f
Reviewed-on: http://codereview.qt.nokia.com/598
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
13 years agoHave the selection offer global handled always without delay.
Laszlo Agocs [Thu, 23 Jun 2011 16:07:20 +0000 (18:07 +0200)]
Have the selection offer global handled always without delay.

In a previous attempt to solve the problem of selection offer
globals arriving too early, the handling was delayed. This
solved the issue of crashing but introduced a timing issue,
because the offers (the mime types) will arrive immediately
after the global and therefore will simply be ignored in
case the delayed processing of the selection offer had not
yet been done. The visibility of the problem depended on the
implementation of the compositor, with recent changes to
qt-compositor the issue is very visible.

The patch solves the issue properly: The wayland clipboard
instance is created right away, as early when needed, and the
integration will simply pick up the already created instance.

Change-Id: I75aaba4b0590c05cc0091bed7bb3593186c1188f
Reviewed-on: http://codereview.qt.nokia.com/687
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agoAdd a function that returns the D-Bus local machine ID
Thiago Macieira [Tue, 21 Jun 2011 19:14:01 +0000 (21:14 +0200)]
Add a function that returns the D-Bus local machine ID

Cherry-picked from 4.8 59bd3bcd961fb3198dc9ba24996f7f9af67aeda3

Change-Id: Id3c8f9edbcbe9bbea83d4d54a6eb25500ab80b68
Reviewed-on: http://codereview.qt.nokia.com/655
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoMake sure to call damage on the buffer when we damage it
Jørgen Lind [Thu, 23 Jun 2011 08:14:51 +0000 (10:14 +0200)]
Make sure to call damage on the buffer when we damage it

Change-Id: Id325a1dee322c2b37215e6577870068260f5f7cc
Reviewed-on: http://codereview.qt.nokia.com/683
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
13 years agoUpdate the wayland plugin
Jørgen Lind [Wed, 22 Jun 2011 08:00:28 +0000 (10:00 +0200)]
Update the wayland plugin

to sha1 bfea3d6befdb688d5354e6f15a9400ea637febf9

Change-Id: Ie855cfbc6b786f1e738e205d403478614774ad34
Reviewed-on: http://codereview.qt.nokia.com/682
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoRemove all references to demos.
Casper van Donderen [Wed, 22 Jun 2011 09:48:43 +0000 (11:48 +0200)]
Remove all references to demos.

Remove the references to demos from configure and qtbase.pro.
This is done because of the merge of the demos and examples in Qt.
Everything will be added as an example.

Change-Id: Iec040f5c719384c7aabba971316de40195ed3a69
Reviewed-on: http://codereview.qt.nokia.com/619
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agofix autotest regressions introduced by 37c329a3
Lars Knoll [Mon, 16 May 2011 14:07:10 +0000 (16:07 +0200)]
fix autotest regressions introduced by 37c329a3

Add proper license headers and properly clip
pixel drawing to the devices bounding rect.
(cherry picked from commit 67d275542464c794ec4b650f10cca9a17e10c977)

Change-Id: I52a166919e87e07168fa5f597b22398a1abefe14
Reviewed-on: http://codereview.qt.nokia.com/590
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agosimplify relative path generation
Oswald Buddenhagen [Fri, 10 Jun 2011 09:48:16 +0000 (11:48 +0200)]
simplify relative path generation

instead of hand-crafting the logic, simply use QDir::relativeFilePath()

Change-Id: I5a495ad6bdfa8ec126741180770934e7ebee0495
Reviewed-on: http://codereview.qt.nokia.com/512
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoSSL certificate printing: fix auto test for different OpenSSL versions
Peter Hartmann [Tue, 21 Jun 2011 12:09:09 +0000 (14:09 +0200)]
SSL certificate printing: fix auto test for different OpenSSL versions

OpenSSL versions 0.9.8 and 1.0.0 produce slightly different output when
dumping a certificate.

Change-Id: I2cf27213237a2e1e08f1b0345c29ca2cd441f41c
Reviewed-on: http://codereview.qt.nokia.com/555
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoIPv4 + IPv6 dual stack sockets
Shane Kearns [Tue, 7 Jun 2011 13:38:38 +0000 (14:38 +0100)]
IPv4 + IPv6 dual stack sockets

Adds support for binding "dual stack" sockets (via QUdpSocket or
QTcpServer). A dual stack socket will accept incoming connections on
either IPv4 or IPv6 interfaces.

QHostAddress::Any     - use this to bind a dual stack socket
QHostAddress::AnyIPv6 - use this to bind a socket for IPv6 only
QHostAddress::AnyIPv4 - use this to bind a socket for IPv4 only

Binding to a specific address rather than one of the "any" addresses
is restricting you to a protocol anyway so no behaviour change there.
IPv6 sockets were previously dual stack on some OS and v6 only on others
Any previously meant IPv4 only

This commit implemented & tested on Windows 7, Linux (Ubuntu 10.04)
and Mac OS 10.6.7.

Windows XP and server 2003 do not support dual stack sockets, even though
they can support IPv6. On those versions, QHostAddress::Any will still
bind to IPv4 0.0.0.0 (which is also the behaviour anywhere QT_NO_IPV6 is
defined)

Autotests run:
qudpsocket (includes a new test case)
qtcpserver (includes a new test case)
qtcpsocket
qnetworkreply
qhostaddress

Task-number: QTBUG-17080
Change-Id: Id486677c4f832e18dc0ff1a86c5f5fc422c9eb4f
Reviewed-on: http://codereview.qt.nokia.com/421
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Reviewed-by: Markus Goetz
13 years agoMake QPoint have the same layout on all platforms
Gunnar Sletta [Sat, 18 Jun 2011 14:39:32 +0000 (16:39 +0200)]
Make QPoint have the same layout on all platforms

Change-Id: I8330295761a4440afd81c121039237fb651d9a9c
Reviewed-on: http://codereview.qt.nokia.com/487
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoSSL certificate printing: increase max certificate size
Peter Hartmann [Mon, 20 Jun 2011 16:23:25 +0000 (18:23 +0200)]
SSL certificate printing: increase max certificate size

apparently there are really big certificates around, so 4k might not
always be enough.

Change-Id: I84df82d117469a14b4c6db81e0ceecc1a8ba47b3
Reviewed-on: http://codereview.qt.nokia.com/554
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoFix fontconfig usage in X11 font database
Jiang Jiang [Mon, 20 Jun 2011 11:47:01 +0000 (13:47 +0200)]
Fix fontconfig usage in X11 font database

We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a
FcPattern for query because the family list in it will contain
almost all the families after FcConfigSubstitute(0, pattern,
FcMatchPattern), then the test in <match target="font"> will
almost always succeed. In general, FcMatchFont substitute
should only be done on the FcPattern that we got after
FcFontMatch() or FcFontRenderPrepare().

Based on the suggestion of fontconfig author Behdad Esfahbod,
this patch reorganized the tryPatternLoad logic so that it only
does the QFontEngine creation part, FcPattern *match is retrieved
outside of that function. In this way, the match pattern we got
can be either from FcFontMatch() or after FcFontRenderPrepare()
on one of the fonts we got from qt_fontSetForPattern(). Then we
don't need to duplicate the pattern and add all criterias back
with qt_addPatternProps(). It not only simplified the code a lot
but also fix the way we apply FcMatchFont substitution. This
substitution will either be done by FcFontMatch() or
FcFontRenderPrepare, both implicitly.

Task-number: QTBUG-2148, QTBUG-19947
Change-Id: I2e4dbbe7f448e81850176732b4a65028f2b912fa
Reviewed-by: Eskil
Reviewed-on: http://codereview.qt.nokia.com/579
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoUpdate autotest case after toHtml change
Jiang Jiang [Tue, 21 Jun 2011 09:23:20 +0000 (11:23 +0200)]
Update autotest case after toHtml change

cb760eaef631abd49836ae5c8dc12a61ef5eff0d changed the way we generate
HTML for empty blocks. tst_QTextDocument::toHtml has to be updated
accordingly.

Reviewed-by: Samuel
(cherry picked from commit 2701802511d9c09a11212cc37838154245b0c0ca)

Change-Id: I0664557f9d74e1aacd46cfcf4cfa2cde4f21a719
Reviewed-on: http://codereview.qt.nokia.com/581
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
13 years agoSSL certificate printing: lookup Symbian ordinal
Peter Hartmann [Mon, 20 Jun 2011 16:19:17 +0000 (18:19 +0200)]
SSL certificate printing: lookup Symbian ordinal

Change-Id: I5358726f0457f00098c248326ed66fb54af1d177
Reviewed-on: http://codereview.qt.nokia.com/553
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoDon't attempt to build benchmarks if release-mode Qt is not available
Rohan McGovern [Tue, 21 Jun 2011 12:04:01 +0000 (14:04 +0200)]
Don't attempt to build benchmarks if release-mode Qt is not available

All of the benchmarks explicitly turn on release mode.  This fails on
Mac and Windows if Qt is configured as debug-only.  It is also possibly
misleading on Linux, as compiling the benchmark in release mode does
not imply that Qt is compiled in release mode.

The results are generally not useful if release mode Qt is not
available, so disable them by default in this case.

Change-Id: Ifa2bb6ab6412dd360ff9dfb890ace2f51e0eef86
Reviewed-on: http://codereview.qt.nokia.com/549
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
13 years agoAdd the ability to convert a certificate to text
Richard Moore [Mon, 20 Jun 2011 16:11:33 +0000 (18:11 +0200)]
Add the ability to convert a certificate to text

Adds a function that will convert a certificate to human readable text
format using the openssl print function. This is useful for debugging
and for displaying the full details of a certificate (including those
parts not supported by the Qt API).

Change-Id: I27238d05df37f8b15ad09f8e761b06344631a9ce
Merge-request: 2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/551
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
13 years agoAdd an autotest for the conversion of certificates to text.
Richard Moore [Mon, 20 Jun 2011 16:11:34 +0000 (18:11 +0200)]
Add an autotest for the conversion of certificates to text.

Loads one of the test certs then compares the result with a known good
text version.

Change-Id: I3a0d6a7f60ce0f48e0cd8032c9964e9c4217dca7
Merge-request: 2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/552

13 years agoFixed compile of autotests for Mac & QPA
Rohan McGovern [Tue, 21 Jun 2011 07:36:13 +0000 (09:36 +0200)]
Fixed compile of autotests for Mac & QPA

Several autotests were assuming that Q_OS_MAC == Mac cocoa port, which
caused compile failures when QPA is used.

Change-Id: I4480ed815c15b6d9ce83edf0057b7293f2e3ad7e
Reviewed-on: http://codereview.qt.nokia.com/533
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoFixed compile of tst_qsettings in debug-only mode on Mac, Windows
Rohan McGovern [Tue, 21 Jun 2011 07:34:48 +0000 (09:34 +0200)]
Fixed compile of tst_qsettings in debug-only mode on Mac, Windows

This test was forcing on release mode, which does not work if the user
requested to build Qt in debug mode only, and this affects the library
name (as on Mac and Windows).

Change-Id: I11111c0ffee11111111111111111111111111111
Reviewed-on: http://codereview.qt.nokia.com/532
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
13 years agoClean-up the macros about Qt Mobility in bearer
Liang Qi [Mon, 20 Jun 2011 14:40:58 +0000 (16:40 +0200)]
Clean-up the macros about Qt Mobility in bearer

Remove the usages of QT_MOBILITY_BEARER, QTM_BEGIN_NAMESPACE and etc.

Change-Id: I68e335c5caa65aa0aebe1a0db82d9633f1724556
Reviewed-on: http://codereview.qt.nokia.com/513
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
13 years agoSupport -debug build on Mac
Liang Qi [Mon, 20 Jun 2011 09:58:46 +0000 (11:58 +0200)]
Support -debug build on Mac

-Wl,-rpath-link is expected to work for all gcc except mac.

Change-Id: I4b57e0088db49a8e35840d981e5d6edbb1012396
Reviewed-on: http://codereview.qt.nokia.com/506
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoSupport -qtnamespace and -qtlibinfix again
Liang Qi [Mon, 20 Jun 2011 09:50:18 +0000 (11:50 +0200)]
Support -qtnamespace and -qtlibinfix again

This fix is for qtbase libraries with -qtnamespace and -qtlibinfix
options in configure.

Task-number: QTBUG-19964
Change-Id: I2f2ff1748f2c1c2b20d5f73b6be36f68a7a26cef
Reviewed-on: http://codereview.qt.nokia.com/505
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
13 years agoFix empty lines in Qt HTML when displayed in external browsers (again)
Eskil Abrahamsen Blomfeldt [Mon, 20 Jun 2011 08:40:01 +0000 (10:40 +0200)]
Fix empty lines in Qt HTML when displayed in external browsers (again)

This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which
should be more compliant with different browsers. In particular,
Outlook didn't support the CSS trick in the last fix, so we need the
somewhat larger patch which adds an extra line break node to the tree
and then ignores it when re-importing the document.

Task-number: QTBUG-3669
Reviewed-by: Simon Hausmann
(cherry picked from commit cb760eaef631abd49836ae5c8dc12a61ef5eff0d)

Change-Id: Ia55bf39d52461aa9445a9a5d0bfb5b4c5bf1e9bd
Reviewed-on: http://codereview.qt.nokia.com/492
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
13 years agoQAuthenticator::setUser() parse user name in form user@domain
Martin Petersson [Mon, 20 Jun 2011 11:03:40 +0000 (13:03 +0200)]
QAuthenticator::setUser() parse user name in form user@domain

Task-number: QTBUG-19894
Change-Id: I063dbc66e5f47a83cc1c0aee8913062b4b5e42bc
Reviewed-on: http://codereview.qt.nokia.com/507
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoFix QProcess emitting two started signals on X11
Christian Strømme [Fri, 3 Jun 2011 15:55:09 +0000 (17:55 +0200)]
Fix QProcess emitting two started signals on X11

On X11 QProcess would emit two started signals when calling
QProcess::waitForStarted(). We should expect that the private
implementation of waitForStarted() should emit the started signal
and return true or false appropriately.

Task-number: QTBUG-7039
Change-Id: I3d381399ab7a39bf57db03a110fa6747a4fc6a24
Reviewed-by: pending
Reviewed-on: http://codereview.qt.nokia.com/331
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
13 years agoFix bug which caused repeated characters in a QML Text
Eskil Abrahamsen Blomfeldt [Mon, 20 Jun 2011 08:45:36 +0000 (10:45 +0200)]
Fix bug which caused repeated characters in a QML Text

We would include too much in the characters displayed, since
itemEnd is actually the start of the next item and not the
end of the current one. Adding a minus one removes the duplicated
characters at the end of text lines.

Change-Id: I1e13470548fafaa692ae58e019e9e2469a947f5e
Reviewed-on: http://codereview.qt.nokia.com/495
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
13 years agoMake it possible to set color of QStaticText with pixel size >= 64
Eskil Abrahamsen Blomfeldt [Mon, 20 Jun 2011 08:01:55 +0000 (10:01 +0200)]
Make it possible to set color of QStaticText with pixel size >= 64

Adding the fallback to QPainterPath for large QStaticTexts created a
regression where all text would be painted in black regardless of the
color you set on it. The color in QStaticTextItem is sometimes invalid,
in which case the current painter color should be used. In either case,
the color is already set on the current pen when entering
drawStaticTextItem() so we can just use that.

Task-number: QTBUG-19950
Reviewed-by: Jiang Jiang
(cherry picked from commit ee77ee5c25f58271e6f2863225d08573da86c3ee)

Change-Id: I955aa6526e5b14589430f8dccd006a9de9ae08c9
Reviewed-on: http://codereview.qt.nokia.com/491
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>