profile/ivi/qtbase.git
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>
13 years agoInitialize member variable.
Gunnar Sletta [Tue, 14 Jun 2011 06:09:14 +0000 (08:09 +0200)]
Initialize member variable.

Change-Id: Ica42c77614fa4fa9ae7692e00d3fc796219aacdc
Reviewed-on: http://codereview.qt.nokia.com/466
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoInclude cycle_p.h only conditionally
Eckhart Koppen [Mon, 13 Jun 2011 11:41:03 +0000 (14:41 +0300)]
Include cycle_p.h only conditionally

cycle_p.h is only needed when HAVE_TICK_COUNTER is defined, and should
not be included otherwise. It is also a 3rd party header which is not
exported as a private header so far, which makes compilation of
dependenty modules fail.

Change-Id: I5c2546eae7d65fc68b8411c20634aca541c327d6
Reviewed-on: http://codereview.qt.nokia.com/465
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoEnsure we pass -developer-build to syncqt for -nokia-developer builds
Marius Storm-Olsen [Fri, 10 Jun 2011 19:26:51 +0000 (14:26 -0500)]
Ensure we pass -developer-build to syncqt for -nokia-developer builds

When the build directory is the install directory, separate modules
should use qtbase as the path for libs, module pris etc.

This fixes the logic in default_pre.prf so that syncqt is called
correctly in these cases.

Change-Id: Ib3798bfd145d3a3e43b9a222af46270245e6c2e6
Reviewed-on: http://codereview.qt.nokia.com/464
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
13 years agoHandle really global selection offers in wayland clipboard.
Laszlo Agocs [Fri, 10 Jun 2011 09:59:01 +0000 (11:59 +0200)]
Handle really global selection offers in wayland clipboard.

Handle selection offer globals properly even if they arrive during the
initial blocking read. If such a global arrives so early, the platform
integration is not yet available from QApplicationPrivate (as it is
just being constructed). Therefore the handling of the selection
offer has to be delayed. At the moment selection offers are typically
posted as globals and not added to the global list, but that is likely
to change in the future.

Change-Id: Ib4ae804ad7f19e05978ee08828b88e028a3bf7b2
Reviewed-on: http://codereview.qt.nokia.com/446
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agofix an incorrect OpenMode flags handling in QBuffer::open()
Ritt Konstantin [Fri, 10 Jun 2011 09:10:49 +0000 (11:10 +0200)]
fix an incorrect OpenMode flags handling in QBuffer::open()

which leads to absurd statement (QBuffer::open() == !QBuffer::isOpen()) to be true.
also treat Truncate as (Truncate | WriteOnly) to satisfy lazy ones

Reviewed-by: Joao
Merge-request: 2612
(cherry picked from commit 6b91affb9a355e668bc9d06dee580d95230ac63a)

Change-Id: I657d4d0a33f7993313fe2a1a8ba408371991717f
Reviewed-on: http://codereview.qt.nokia.com/447
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoFix a case of SP_MediaSkipForward returning the wrong pixmap.
Andy Shaw [Fri, 10 Jun 2011 09:22:00 +0000 (11:22 +0200)]
Fix a case of SP_MediaSkipForward returning the wrong pixmap.

This fixes QTBUG-18311.

Merge-request: 2621
Reviewed-by: Joao
(cherry picked from commit a9364af090fd3209b92ed5e07a1374488d22b1c4)

Change-Id: I0a0fc99060c64a9aab395a183f2faf9223e9a925
Reviewed-on: http://codereview.qt.nokia.com/449
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoFix missing empty lines in Qt HTML when displayed in compliant browsers
Eskil Abrahamsen Blomfeldt [Thu, 9 Jun 2011 08:06:00 +0000 (10:06 +0200)]
Fix missing empty lines in Qt HTML when displayed in compliant browsers

When QTextDocument exports HTML, it makes an effort to be compatible
with its own importer, hence it has to be compatible with the dialect
of HTML which Qt has developed over the years. One incorrect
interpretation in Qt is that an empty paragraph is interpreted as an
empty line. So if you use a QTextDocument to produce HTML for text where
an empty line has been added, this empty line will not be visible when
the document is viewed in a compliant browser. The fix is to set the
height of the empty paragraph to 1em, so that it will match the current
pixel size of the font, thus look the same as a <p><br /></p> but
without altering the structure of the document.

Reviewed-by: Gunnar
(cherry picked from commit f541c78e1bc5b293466b40e6f10496199a4a5d73)

Change-Id: Ic0eae2c81609b8872eb2eb9344a3ec416cd09149
Reviewed-on: http://codereview.qt.nokia.com/445
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoFontengine buildfix for xcb platform plugin.
Tapani Mikola [Fri, 10 Jun 2011 06:25:54 +0000 (09:25 +0300)]
Fontengine buildfix for xcb platform plugin.

Change-Id: Ic909e1ac08163e62634643c68862e802a016b911
Reviewed-on: http://codereview.qt.nokia.com/442
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
13 years agotst_qnetworkreply: Fix divide by zero crash on MacOS X
Shane [Wed, 8 Jun 2011 16:10:19 +0000 (17:10 +0100)]
tst_qnetworkreply: Fix divide by zero crash on MacOS X

Change-Id: Ie1b6d5aa25a745eb6c16041151141efe99c051aa
Reviewed-on: http://codereview.qt.nokia.com/422
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
13 years agoAllow selecting fonts with irregular style names
Jiang Jiang [Sat, 4 Jun 2011 12:47:22 +0000 (14:47 +0200)]
Allow selecting fonts with irregular style names

Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black
Condensed" can't be selected in Qt because either they don't
report correct numeric values for weight/stretch/etc. or these
values are not mapped from QFont enums in a linear way. Thus
we provide a shortcut to select these fonts with PostScript
name or full name without resorting to family name matching in
QFontDatabase (these fonts are not registered in font database
anyway). After this, we can simply use:

    QFont font("Helvetica Neue");
    font.setStyleName("UltraLight");

to select these fonts. QCoreTextFontEngineMulti matched like
this can be created directly from the CTFontRef instance
instead of creating from the font name, making this process
faster.

The commit also cleaned up the font loading process in Mac
font database a bit, moving the code for family matching into
a separate function.

Add QFontInfo::styleName() and QRawFont::styleName() to access
the resolved style name for a font.

Task-number: QTBUG-19366
Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506
Reviewed-on: http://codereview.qt.nokia.com/333
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoDuplicate some harfbuzz symbols inside Qt.
Gunnar Sletta [Wed, 8 Jun 2011 11:12:21 +0000 (13:12 +0200)]
Duplicate some harfbuzz symbols inside Qt.

This is done to remove a compile-time dependency on the harfbuzz
source files inside qtbase/src/3rdparty. These are not accessible
now that QT_SOURCE_TREE is not accessible as a qmake variable
anymore.

With the refactor branch we might solve this differently, but for
now this is how we get svg and declarative to compile.

Change-Id: I5dad23f2ea1f650e2621c1c1fcf39632a3a22ae8
Reviewed-on: http://codereview.qt.nokia.com/378
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoUse homePath instead of homeDirPath
Eckhart Koppen [Thu, 9 Jun 2011 08:21:26 +0000 (11:21 +0300)]
Use homePath instead of homeDirPath

homeDirPath requires Qt 3 support, which is not enabled in all
configurations.

Change-Id: I7d51b880574021ef4569a4a2b16f06a7786dbb7d
Reviewed-on: http://codereview.qt.nokia.com/415
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
13 years agoAdd tilde (both ~ and ~<user>) expansion to QFileDialog on UNIX.
Pierre Rossi [Fri, 20 May 2011 12:16:33 +0000 (14:16 +0200)]
Add tilde (both ~ and ~<user>) expansion to QFileDialog on UNIX.

Task-number: QTBUG-3265

Change-Id: Id8062afe69e798e1f9cf3f4e967ae0d30c362b72
Reviewed-on: http://codereview.qt.nokia.com/411
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
13 years agoFix modules to load(qt_module) first
Marius Storm-Olsen [Wed, 8 Jun 2011 17:47:56 +0000 (12:47 -0500)]
Fix modules to load(qt_module) first

Change-Id: Iabdfffff09088243863a8661add73298ed8baaf3
Reviewed-on: http://codereview.qt.nokia.com/413
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoComplain if we don't load(qt_module) first
Marius Storm-Olsen [Wed, 8 Jun 2011 17:01:24 +0000 (12:01 -0500)]
Complain if we don't load(qt_module) first

Not having load(qt_module) first in a .pro file which later
does a load(qt_module_config) will likely overwrite
compiler/linker options in the .pro file.

This can be hard to figure out, and wasn't required before
when we used a global .qmake.cache for all modules, since
it 'preloaded' qmodule.pri file for all .pro files.

Change-Id: I8a9aa3247f938be0b3b13f8c8cc96c18a142ba7b
Reviewed-on: http://codereview.qt.nokia.com/412
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoFix typo from 1835afe6
Marius Storm-Olsen [Wed, 8 Jun 2011 11:15:01 +0000 (06:15 -0500)]
Fix typo from 1835afe6

Change-Id: I99e4407bbcb82cb27057ada838d73b6582867937
Reviewed-on: http://codereview.qt.nokia.com/379
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoReorder member varibles in QGlyphRunPrivate to eliminate warning
Jiang Jiang [Wed, 8 Jun 2011 08:11:10 +0000 (10:11 +0200)]
Reorder member varibles in QGlyphRunPrivate to eliminate warning

Reviewed-by: Eskil
(cherry picked from commit 74a1135341783449970d579b273d00c837ac14b0)

Change-Id: I8e1c6bdc7f0957d8f389531f5f5682c536cdc286
Reviewed-on: http://codereview.qt.nokia.com/374
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix warning in qtextengine compilation
Jiang Jiang [Sat, 4 Jun 2011 13:53:49 +0000 (15:53 +0200)]
Fix warning in qtextengine compilation

enableHarfbuzz() should only be defined on Mac.

Reviewed-by: Eskil
(cherry picked from commit 5ce3fbb67b79c3732fd47b296ef9421398ca520c)

Change-Id: I9ecb5db49478c3f5beb5d41cf99320f0faedce2e
Reviewed-on: http://codereview.qt.nokia.com/375
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix compile when configure with no fontconfig support
Jiang Jiang [Sat, 4 Jun 2011 15:47:13 +0000 (17:47 +0200)]
Fix compile when configure with no fontconfig support

Task-number: QTBUG-19716
Reviewed-by: Eskil
(cherry picked from commit 5a598afa3f1928e9ad18257e2fa48fe3d5739917)

Change-Id: I05107970e3273fce48303c9956e1c9aa928832b9
Reviewed-on: http://codereview.qt.nokia.com/376
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix usage of QT_SOURCE_TREE
Marius Storm-Olsen [Tue, 7 Jun 2011 18:43:17 +0000 (13:43 -0500)]
Fix usage of QT_SOURCE_TREE

Functionality has been moved into qt_example.prf

Change-Id: I81423eb4c5645f03b131932b2d37eceee9fea086
Reviewed-on: http://codereview.qt.nokia.com/371
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoFix regression that caused waitForXXX(-1) to fail.
Thiago Macieira [Mon, 16 May 2011 11:20:25 +0000 (13:20 +0200)]
Fix regression that caused waitForXXX(-1) to fail.

Regression was introduced by 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba
when it failed to check when msecs == -1. This manifested visibly in KDE
failing to connect to any SSL site -- kioslaves are synchronous and use
waitForXXX(-1) (in this particular case, waitForEncrypted, which calls
waitForReadyRead).

Also, take the opportunity to convert these tests in QTcpSocket to use
port 80 (a defined service in the test server) instead of port 22.

Reviewed-by: Martin Petersson
(cherry picked from commit cb5b6799333794496269aa7e6515f96c2ac96d37)

Change-Id: I256a1e138e43fd45844976fe84cd2bc938552e47
Reviewed-on: http://codereview.qt.nokia.com/359
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoAdd function QGlyphRun::setRawData()
Eskil Abrahamsen Blomfeldt [Tue, 10 May 2011 13:08:29 +0000 (15:08 +0200)]
Add function QGlyphRun::setRawData()

To provide an optimized way of constructing QGlyphRun objects with no
copying or allocation, we add function setRawData() (naming inspired by
QByteArray::setRawData()). Data retrieved from QRawFont can be passed
directly into this. The logic is now that the data pointers in
QGlyphRunPrivate should always point to the current valid data and is
what will be used in comparisons and drawing calls. The vectors are
optimizations to avoid unnecessary copying if the user wants to use
the QVector based API (which makes it easier to manage the memory.)
This reflected in the functions that return QVectors, which will
return the stored vector if and only if it is identical to the
current pointer. Otherwise we will have to copy the memory.

The internal addition operators in QGlyphRun have been removed since
they really provide no real optimization and have an unclear definition
if the two glyph runs are based on different fonts.

Reviewed-by: Jiang Jiang
(cherry picked from commit 86d88c5b719fd3d50336d9d8e7127b8045ee82ae)

Change-Id: Id5bb55ee3d93afb32ffca850f53382e856df7b3e
Reviewed-on: http://codereview.qt.nokia.com/342
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoAdded private header dependencies to MeeGo graphics system plugin
Eckhart Koppen [Mon, 6 Jun 2011 15:49:21 +0000 (18:49 +0300)]
Added private header dependencies to MeeGo graphics system plugin

Depends on core, gui and opengl private headers

Change-Id: If3266c3b7233bf40b5ad80a8a99fd5f2c7eafcec
Reviewed-on: http://codereview.qt.nokia.com/336
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
13 years agoUse Raster pixmaps for the EglFS plugin
Gunnar Sletta [Mon, 6 Jun 2011 12:17:14 +0000 (14:17 +0200)]
Use Raster pixmaps for the EglFS plugin

Change-Id: Id94df7b5ebe298104d05bee3ae58e06201c596f7
Reviewed-on: http://codereview.qt.nokia.com/334
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoAdded module CONFIG to uitools.
axis [Wed, 18 May 2011 13:31:52 +0000 (15:31 +0200)]
Added module CONFIG to uitools.

This seems to be necessary for installing, and has no side effects
that I can tell.

Change-Id: Ic778b8a3937621ddd401ddd83d05831460db8f39
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/236
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoMake qmake slightly more verbose with its syncqt output.
axis [Mon, 30 May 2011 12:14:28 +0000 (14:14 +0200)]
Make qmake slightly more verbose with its syncqt output.

It can be hidden with -silent, however.

Change-Id: I6dbd3c743779b8d2070e41f007df26b530987429
Reviewed-on: http://codereview.qt.nokia.com/235
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoDisable trying to compile network tests which require QtScript
Marius Storm-Olsen [Fri, 27 May 2011 17:10:43 +0000 (12:10 -0500)]
Disable trying to compile network tests which require QtScript

Those tests should be moved to QtScript/tests/auto

Change-Id: Icc0c50ef35ac08e604ab18cb87b0c2b19f2fc72c
Reviewed-on: http://codereview.qt.nokia.com/197
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoMoved common module profiles to be feature profiles.
axis [Wed, 18 May 2011 13:30:27 +0000 (15:30 +0200)]
Moved common module profiles to be feature profiles.

This enables external modules to also make use of them without having
access to the complete QtBase source code.

Change-Id: I056e45cba6c6798b76670b8d238dadb2d9f9c092
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/234
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoCorrect antialias disabling logic for Core Text
Jiang Jiang [Fri, 3 Jun 2011 14:03:00 +0000 (16:03 +0200)]
Correct antialias disabling logic for Core Text

We should always turn antialias off when QFont::NoAntialias being
passed in styleStrategy. That corrects some QStaticText tests.

Change-Id: Iaffc5f3bb7f501dcb648cab41a8b6ffcf93f90ae
Reviewed-on: http://codereview.qt.nokia.com/328
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoCorrect QStaticText tests after recent changes
Jiang Jiang [Fri, 3 Jun 2011 14:08:54 +0000 (16:08 +0200)]
Correct QStaticText tests after recent changes

Raster engine on Mac now correctly handles transformation, so no
need to XFAIL anymore. Also fixes a drawStaticText origin mistake,
the y origin should be the top left point rather than the baseline.

Change-Id: I6058e7099b336d9d5a6586344a07be3c7d76fb64
Reviewed-on: http://codereview.qt.nokia.com/329
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoImplemented module-local caching of module profiles.
axis [Wed, 18 May 2011 13:23:51 +0000 (15:23 +0200)]
Implemented module-local caching of module profiles.

We use syncqt to generate .qmake.cache also for submodules, which
contains the location of forwarding module profiles for that module.
This enables us to build without having to put module profiles into
mkspecs/modules until install time.

Also added support for -developer-build to syncqt.

What it does is to point build directories for binaries and
libraries to a common location in QtBase. This is more
convenient when doing development, since you don't need to set your
path to every module's bin/ directory, but it cannot be used with
release builds, since they need to build independently of QtBase,
in their own directory.

Change-Id: I959c62c11c644f2147a98da894a72452d9c44327
Task: QTBUG-19585
Task: QTBUG-19583
Reviewed-on: http://codereview.qt.nokia.com/232
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoInstall some headers that were previously missing from install.
axis [Wed, 18 May 2011 13:28:25 +0000 (15:28 +0200)]
Install some headers that were previously missing from install.

Change-Id: I58a5f58e6e03e3e266de23beee47de0c823f3240
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/233
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoDon't base QTDIR detection on .qmake.cache.
axis [Fri, 13 May 2011 14:49:51 +0000 (16:49 +0200)]
Don't base QTDIR detection on .qmake.cache.

Change-Id: I4adc26c1c070d26277551d302f4638b819ddc311
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/231
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoMake sure that we error out if we cannot write forwarding profile.
axis [Fri, 13 May 2011 14:22:09 +0000 (16:22 +0200)]
Make sure that we error out if we cannot write forwarding profile.

Change-Id: Ic0b62532dd8a52cf6ab7a7c10c5ffbe3c9039ec1
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/229
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoChanges needed for Qt to accept module .qmake.cache files.
axis [Fri, 13 May 2011 14:48:06 +0000 (16:48 +0200)]
Changes needed for Qt to accept module .qmake.cache files.

Also introduced the QMAKE_EXTRA_MODULE_FORWARDS for specifying a
folder where forwarding profiles will be put.

Change-Id: I8cb242838a5a4d42dc5e3cfd0bd858ab0d2696cd
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/230
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoAdd basic static text drawing capability to lance
Jiang Jiang [Fri, 3 Jun 2011 11:31:05 +0000 (13:31 +0200)]
Add basic static text drawing capability to lance

Task-number: QTBUG-17514
Change-Id: Ife7cd8f940424d805f634ca190bcbf6fd83d8682
Reviewed-on: http://codereview.qt.nokia.com/321
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: aavit <qt_aavit@ovi.com>
13 years agoFix Windows build
Jiang Jiang [Fri, 3 Jun 2011 09:54:58 +0000 (11:54 +0200)]
Fix Windows build

Change-Id: Ieafe2cefe0dcb00a3b22133506fb854428abff5e
Reviewed-on: http://codereview.qt.nokia.com/320
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoRefactor glyph pretransform check
Jiang Jiang [Wed, 1 Jun 2011 09:06:55 +0000 (11:06 +0200)]
Refactor glyph pretransform check

Move paintEngineSupportsTransformations logic from QPainter to paint
engine subclasses. Simplify and consolidate checks for cached drawing
(pretransformed) and path drawing (untransformed) in raster paint
engine. Fix unnecessary transform when paint engines actually take
the path drawing track. Fix scaling and rotation transform in raster
engine for Mac.

Task-number: QTBUG-19086
Change-Id: I1c0c1800a5173d3db765b9fccfd0e7a3628e3815
Reviewed-on: http://codereview.qt.nokia.com/298
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
13 years agoFixed an argument parsing bug in syncqt.
axis [Fri, 13 May 2011 14:07:56 +0000 (16:07 +0200)]
Fixed an argument parsing bug in syncqt.

We need to move the detection up above the general -no-* match,
otherwise it never hits.

Change-Id: I04ab5a1ed2c4a01219e7b9e10948b3fc4989f4b8
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/228
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoAllow SHM buffers to be displayed in Wayland plugin when using DRM
Andy Nichols [Wed, 1 Jun 2011 13:34:50 +0000 (15:34 +0200)]
Allow SHM buffers to be displayed in Wayland plugin when using DRM

When running an application with the wayland backend, SHM window
surfaces were not being displayed on the wayland-demo compositor as
wl_surface_damage was being called, but not wl_buffer_damage as well.

Change-Id: I2ffea3bbb20cb3729cd029bd21855819cd7fcf55
Reviewed-on: http://codereview.qt.nokia.com/305
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agotst_qnetworkreply: add a test for http abort.
Martin Petersson [Wed, 1 Jun 2011 10:38:34 +0000 (12:38 +0200)]
tst_qnetworkreply: add a test for http abort.

Change-Id: Iec5fe195ff2befe92e759f77768240728bef31bd
Reviewed-on: http://codereview.qt.nokia.com/302
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
13 years agosockets: limit buffer size of the internal sockets in proxy engines
Shane Kearns [Tue, 24 May 2011 13:05:48 +0000 (14:05 +0100)]
sockets: limit buffer size of the internal sockets in proxy engines

The application can normally control the amount of buffering of a
socket or QNetworkReply by using the setReadBufferSize API.
This allows the application to flow control the TCP connection, and
avoids out of memory errors when the data being downloaded is received
faster than the application can process it.

However when using a proxy, the proxy socket engine has an internal
socket which is used to communicate with the proxy server. It is not
visible to the user, and does not have awareness of the buffer size of
the external socket.

To solve this, we limit the internal sockets' buffer size to 64k bytes.
Under normal operation, the data is swiftly copied to the external
socket where the buffer can grow (or not) based on the application's
set value for read buffer size.

Task-number: QT-4966
Reviewed-by: Markus Goetz
(cherry picked from commit c4727a85eed57a4db698326a1bed4aa75b6e5284)

Change-Id: I29e6628e38b79b41c4464ba8cb772a0f03717043
Reviewed-on: http://codereview.qt.nokia.com/153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
13 years agoMake TextEdit word selection more natural.
Andrew den Exter [Fri, 13 May 2011 03:49:20 +0000 (13:49 +1000)]
Make TextEdit word selection more natural.

QTextControl will only extend the selection to a word if the cursor is
directly over it which prevents the selection being extended if the
mouse is dragged up or down a to a shorter line of text making it
difficult to select multiple lines of text.  Just disable that
limitation when the TextEdit word selection is enabled.

Change-Id: I3b9d1575c0141db8441197d740de94a90eacc077
Task-number: QTBUG-19230
Reviewed-by: Martin Jones
Reviewed-on: http://codereview.qt.nokia.com/292
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
13 years agoEnsure the TextEdit cursor delegate is repositioned on mouse events.
Andrew den Exter [Mon, 9 May 2011 03:57:34 +0000 (13:57 +1000)]
Ensure the TextEdit cursor delegate is repositioned on mouse events.

Update the micro focus when a mouse press changes the cursor position
of a read only TextEdit.

Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46
Task-number: QTBUG-19109
Reviewed-by: Martin Jones
Reviewed-on: http://codereview.qt.nokia.com/291
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
13 years agoDon't crash on an invalid replacementStart from an input method.
Andrew den Exter [Mon, 9 May 2011 04:04:08 +0000 (14:04 +1000)]
Don't crash on an invalid replacementStart from an input method.

Ensure the cursor position does not exceed the bounds of the
current text.

Change-Id: If38f7729372562324d11eadd1a976c0c6da91863
Task-number: QTBUG-19054
Reviewed-by: Martin Jones
(cherry picked from commit 6fbfb1ab3f26ad672eb24f9b4a0ce1a8eea08298)
Reviewed-on: http://codereview.qt.nokia.com/290
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
13 years agoFix build in C++0x mode
Bernhard Rosenkraenzer [Mon, 30 May 2011 09:31:42 +0000 (11:30 +0159)]
Fix build in C++0x mode

This fixes compiler errors (gcc 4.6 -std=gnu++0x on x86_64 Linux):

embedded/qwslock.cpp: In function `bool forceLock(int, int, int)':
embedded/qwslock.cpp:121:39: error: narrowing conversion of `semNum'
        from `int' to `short unsigned int' inside { } [-fpermissive]

(and equivalent errors in other lines/files)

See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
Section 8.5.4/6

Change-Id: I2cbac5482b87f33287a416af5a5c9bde621720bc
Reviewed-By: Olivier Goffart
Merge-Request: 1240
Reviewed-on: http://codereview.qt.nokia.com/275
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
13 years agoMade qpluginbase.pri into a feature profile.
axis [Fri, 27 May 2011 08:10:36 +0000 (10:10 +0200)]
Made qpluginbase.pri into a feature profile.

This enables other modules to use it without having access to the
QtBase sources.

Change-Id: I0a588b2e14ca88fa068c7c2bcc69ff669444f6c6
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/237
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoMoved certain qmake config variables to .qmake.cache.
axis [Fri, 27 May 2011 13:36:22 +0000 (15:36 +0200)]
Moved certain qmake config variables to .qmake.cache.

The reason is that these are local to the build, and should not be
present inside the qmodule.pri file, because this file is installed.

Change-Id: I2207f2bf068b1aafd14e60d106c7028ca53d5efd
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/238
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFixed linking against QtQuickTest on mac.
Charles Yin [Fri, 27 May 2011 04:43:13 +0000 (14:43 +1000)]
Fixed linking against QtQuickTest on mac.

qmltest is now a Qt module, so it's not necessary to configure
the include&library paths manually.

Change-Id: I1d2baa67138e08ab9007fba9f6adcf8847509ba8
Reviewed-on: http://codereview.qt.nokia.com/163
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
13 years agoExport the qt_gl_read_framebuffer function for use in declarative
Gunnar Sletta [Mon, 30 May 2011 13:33:21 +0000 (15:33 +0200)]
Export the qt_gl_read_framebuffer function for use in declarative

Change-Id: Ia1dd186ca954774e1faaa4b2e606acac9333d9b0
Reviewed-on: http://codereview.qt.nokia.com/224
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoSupport placing cursor in ligature with mouse or touch
Jiang Jiang [Thu, 19 May 2011 08:29:49 +0000 (10:29 +0200)]
Support placing cursor in ligature with mouse or touch

We need to find out the closest element in the ligature to
the point we clicked (or tapped), currently we do this by
dividing the width of that ligature glyph evenly by the number
of characters it covered. We only support Common and Greek script
at this point, ligatures in other scripts are still handled as a
whole.

Task-number: QTBUG-19260
Reviewed-by: Eskil
(cherry picked from commit 5338d78aa9d80ddd2bcb21e6b22cd2cf1522a7d3)

Change-Id: Ic747e9458d561aca0848dcd1e8b94e0a23fd8189
Reviewed-on: http://codereview.qt.nokia.com/196
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoOnly add dependent include when not already there
Marius Storm-Olsen [Fri, 27 May 2011 18:43:30 +0000 (13:43 -0500)]
Only add dependent include when not already there

Change-Id: I517ad8188a6f6b5ade763f0189f434f446ab6f05
Reviewed-on: http://codereview.qt.nokia.com/198
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
13 years agoFix ligature offset in multi-line text
Jiang Jiang [Fri, 20 May 2011 08:26:54 +0000 (10:26 +0200)]
Fix ligature offset in multi-line text

Reviewed-by: Eskil
(cherry picked from commit 278cf1f37945050c4a46d5acab0659f3a7546a43)

Change-Id: Ice20aa38a49ea16cf56bd3705c7d400ee165a9c2
Reviewed-on: http://codereview.qt.nokia.com/195
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoFix compile for systems with old fontconfig
Jiang Jiang [Fri, 27 May 2011 12:24:21 +0000 (14:24 +0200)]
Fix compile for systems with old fontconfig

Change-Id: Ia26796bdbab7988d14163d3c1290111c0cb22bf7
Reviewed-on: http://codereview.qt.nokia.com/182
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoAdd QUuid::toRfc4122() and fromRfc4122()
Liang Qi [Fri, 27 May 2011 11:34:28 +0000 (13:34 +0200)]
Add QUuid::toRfc4122() and fromRfc4122()

Following the RFC4122, provide the interfaces between QUuid
and QByteArray, they are simpler then toByteArray() and
relevant.

Thanks for the suggestion and brief code from Robin Burchell.

Task-number: QTBUG-19420
Reviewed-by: joao
(cherry picked from commit 06873e467d98ad60d827afae29500bf2ff783c03)

Change-Id: I4623ae3363f1d5affa45de73fac616bb67a9eaa1
Reviewed-on: http://codereview.qt.nokia.com/168
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoAdd QUuid::toByteArray() and relevant
Liang Qi [Fri, 20 May 2011 09:36:01 +0000 (11:36 +0200)]
Add QUuid::toByteArray() and relevant

Add QUuid::toByteArray() and QUuid(const QByteArray &). Same
behavior with QUuid::toString() and QUuid(const QString &).

Task-number: QTBUG-19419
Reviewed-by: joao
(cherry picked from commit 71f923f29e2c60444a85fc765fc582e06cb7eca4)

Change-Id: I41dad65e269f739ba9ec1c27e9da96af6401356c
Reviewed-on: http://codereview.qt.nokia.com/167
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoQDataStream: speedup steaming of QUuid.
Liang Qi [Fri, 20 May 2011 07:48:30 +0000 (09:48 +0200)]
QDataStream: speedup steaming of QUuid.

By reading and writing as a whole block, because the size of QUuid
is fixed.

Reviewed-by: joao
(cherry picked from commit d56d7f107f9d18810d742ac4d3a2e36077722cb8)

Change-Id: I90554d68da7394c99c48acd0bc5a0eee3b3f7776
Reviewed-on: http://codereview.qt.nokia.com/169
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoOptimize QUuid::QUuid(const char *)
Liang Qi [Fri, 20 May 2011 10:45:56 +0000 (12:45 +0200)]
Optimize QUuid::QUuid(const char *)

Reviewed-by: joao
(cherry picked from commit 96d10abbb40c52ac6274f1144766f3fb27dfd726)

Change-Id: I050b602b6cac669b4d88046b0a707048ce0a8cda
Reviewed-on: http://codereview.qt.nokia.com/170
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoFix the build for QUuid
Liang Qi [Mon, 23 May 2011 07:27:23 +0000 (09:27 +0200)]
Fix the build for QUuid

Add a quint8 specialization for qbswap.

Reviewed-by: Bradley T. Hughes
(cherry picked from commit 32a583b575da1b387955734ccf36b0a93de37670)

Change-Id: I7dae5e47565ed30de960983649e5c214e0303fe3
Reviewed-on: http://codereview.qt.nokia.com/171
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agouic: #include <QLayout> for QToolBox on non-laid-out forms.
Friedemann Kleint [Mon, 23 May 2011 07:03:52 +0000 (09:03 +0200)]
uic: #include <QLayout> for QToolBox on non-laid-out forms.

for the fake tab-spacing property, which accesses the internal
layout and sets its spacing.

Task-number: QTBUG-19339
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Change-Id: I89f5c035bd3798a0998c3046de643bda0fa8da6b
(cherry picked from commit 89f5c035bd3798a0998c3046de643bda0fa8da6b)
Reviewed-on: http://codereview.qt.nokia.com/173
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agouic: Use QString::fromUtf8 for QUrl properties.
Friedemann Kleint [Wed, 25 May 2011 09:27:40 +0000 (11:27 +0200)]
uic: Use QString::fromUtf8 for QUrl properties.

As otherwise the compilation of ui_-files fails when
using QT_NO_CAST_FROM_ASCII. Bug reported on mailing list.

Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Change-Id: I00bf2e2605b97ff77efdcb68b7968375b3e9d195
(cherry picked from commit 00bf2e2605b97ff77efdcb68b7968375b3e9d195)
Reviewed-on: http://codereview.qt.nokia.com/174
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoFix a regression in QList::mid()
Liang Qi [Mon, 16 May 2011 08:48:05 +0000 (10:48 +0200)]
Fix a regression in QList::mid()

It doesn't need to copy anything when pos is after size().

Task-number: QTBUG-19164
Reviewed-by: Oswald Buddenhagen
(cherry picked from commit 8befc4982a32752e48c82cacbed045e7336a3569)

Change-Id: Iccac75842616f0d41e457e844a15d1a3ccfeb642
Reviewed-on: http://codereview.qt.nokia.com/164
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoAdd some autotests and benchmarks for QUuid
Liang Qi [Fri, 20 May 2011 12:12:57 +0000 (14:12 +0200)]
Add some autotests and benchmarks for QUuid

Missing those functions for optimization.

Reviewed-by: joao
(cherry picked from commit 4e9286880fd2686e61de2c4be3c317e01f0d9989)

Change-Id: I147e028f10cec7abc545dcbcca911d39a89d830e
Reviewed-on: http://codereview.qt.nokia.com/165
Reviewed-by: Liang Qi <liang.qi@nokia.com>