9 years agoRenaming QNX mkspecs v4.8.1
Rafael Roquetto [Wed, 7 Mar 2012 07:53:14 +0000 (08:53 +0100)]
Renaming QNX mkspecs

Renamed from blackberry-* to qnx-* in order to match he <platform>-<compiler>

cherry-picked from qt5/qtbase 6e58dd34ac96e2cf0807a227caaef74d15e272e7

Change-Id: I793af8d1a2053ccf37aaefd5849267797d0ee021
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoEnable storage of global Qt settings in app-local settings file on Mac
Pasi Matilainen [Fri, 2 Mar 2012 13:06:08 +0000 (15:06 +0200)]
Enable storage of global Qt settings in app-local settings file on Mac

The Mac App Store has limitations on where applications can write their
settings, and com.trolltech.plist is not allowed. Changed the settings
code to store all settings in the app-local file when the application
runs in sandbox, or when the application's Info.plist contains a key
"ForAppStore" with value "yes". The application's bundle identifier is
also used for naming the settings file in these cases.

Task-number: QTBUG-16549
Change-Id: Idd2241fbd7eb346da987226f05460642b0d6e5a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
9 years agoDon't allow app panic on QProcess destruction, kill or terminate
Murray Read [Wed, 7 Mar 2012 11:47:41 +0000 (11:47 +0000)]
Don't allow app panic on QProcess destruction, kill or terminate

QProcess destruction will call kill() if the process is still running.
PRocess::Kill() and Terminate() both require the PowerMgmt capability
to operate on Symbian, otherwise a KERN-EXEC 46 panic happens.

An app should be able to use QProcess safely if it doesn't have
PowerMgmt capability, it should just be prevented from trying to kill
the created process. Now a debug message is issued on ~QProcess(),
kill() or terminate() if the capability is not present, rather than
actually trying to kill/terminate the process.

Task-number: ou1cimx1#985227
Change-Id: I3242ca2c39528c70c2c79e39f6a6384dd72f6ae6
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
9 years agoWindows - fix getsockopt calls for narrower than int options
Shane Kearns [Mon, 20 Feb 2012 18:48:10 +0000 (18:48 +0000)]
Windows - fix getsockopt calls for narrower than int options

Windows unhelpfully writes to only one byte of the output buffer
when getsockopt is called for a boolean option. Therefore we have
to zero initialise the int rather than initialising to -1 as was
done before.
This in general only works for little endian architecture, because
the word would look like 0x01000000 on big endian. So I have added
some compile time asserts in the assumption that windows is always
little endian. This is ok for comparisons with 0/false, but not
comparisons with true or nonzero values.

Task-number: QTBUG-23488
Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
(cherry picked from commit 46e4a9d5231e2d9e35424259858713ca539b8e30)

9 years agoFix for QTBUG-21466: References to deprecated mouse drivers
Pasi Petäjäjärvi [Mon, 27 Feb 2012 11:10:56 +0000 (13:10 +0200)]
Fix for QTBUG-21466: References to deprecated mouse drivers

References to deprecated and removed mouse and keyboard drivers in
documentation. Removed references.

Task-number: QTBUG-21466

Change-Id: I0ea9db679023a5e9a60663d64a9797df4310e662
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
9 years agoescape *_script_file usages in MingwMakefileGenerator::writeObjectsPart
Max Desyatov [Tue, 6 Mar 2012 14:18:53 +0000 (16:18 +0200)]
escape *_script_file usages in MingwMakefileGenerator::writeObjectsPart

(cherry picked from qtbase commit 9d5e721e96f19812a766a4c7d3f8b41f455f507c)
Task-number: QTBUG-24595
Change-Id: I761e4ffb0e473c35784cf1ba5289a79dae5a012b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoMake qget manual test compile without ssl support
Shane Kearns [Mon, 20 Feb 2012 16:40:55 +0000 (16:40 +0000)]
Make qget manual test compile without ssl support

Change-Id: I35f92328b79df1cfcae52fa6ff8290f260183aea
Reviewed-by: Richard J. Moore <rich@kde.org>
(cherry picked from commit 3fe79f23a97323521eb0182f8b46b0d0fc9ce44b)

9 years agoFix error handling in QHostInfo windows backend
Shane Kearns [Fri, 17 Feb 2012 15:14:01 +0000 (15:14 +0000)]
Fix error handling in QHostInfo windows backend

If the DNS server returns a non authoritative host not found response,
then windows returns WSATRY_AGAIN error code.
This is now reported as HostNotFound and not UnknownError

Change-Id: I212985acd4e85ff4b2bdb6c57ec403405a7695fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
(cherry picked from commit 844b096d674c3b803923357502435ef89ce0c738)

9 years agoMove qws/qnx-* mkspec files from unsupported
Samuli Piippo [Thu, 1 Mar 2012 13:53:34 +0000 (15:53 +0200)]
Move qws/qnx-* mkspec files from unsupported

As QNX in now a supported platform, move mkspec files
away from unsupported folder.

Change-Id: I31f806b5d5217cfb0420dc74dc7a5eea33c1598d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoPrevent stack corruption when using OpenGL Core Profile on Windows
Sean Harmer [Mon, 5 Mar 2012 11:32:09 +0000 (11:32 +0000)]
Prevent stack corruption when using OpenGL Core Profile on Windows

This is the backport of commit


to qtbase.

Change-Id: I8680c20c8b804fb4e77062f52b8f4188b49263a8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
9 years agoqpa: Don't force event handling every second
Eike Ziller [Tue, 7 Feb 2012 14:49:18 +0000 (15:49 +0100)]
qpa: Don't force event handling every second

No need to wake up the CPU if we know that nothing happened.

Change-Id: I95a26fa4869d9f694729d71c1bc6947f477cc283
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoImproving clipboard integration
Kevin Krammer [Mon, 5 Mar 2012 16:00:41 +0000 (17:00 +0100)]
Improving clipboard integration

Derive a data accessor class from QMimeData so application level code can
query MIME type availability through it or directly attempt to fetch
data by MIME type even if the type is not yet known to QBBClipboard.

Also make sure any MIME type used by the application in setMimeData
operations is checked for availability when being queried for formats.

This is a backport of 08cc2d27794e6bafb75cdc35b6966def35f9facb in master of
Qt5 qtbase

Change-Id: I86455cfb58e2e00ac3e992a8228ee7167f8d2a20
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoAdd egl include paths and link lines to eglfs.
Girish Ramakrishnan [Tue, 6 Mar 2012 06:20:34 +0000 (22:20 -0800)]
Add egl include paths and link lines to eglfs.

Similar to the code in gui/egl/egl.pri.

Change-Id: I1dbcf6f0d70405d8dc9f404bfed64fdfcd7c14ab
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoFixed warnings from configure
Robert Loehning [Wed, 29 Feb 2012 17:33:30 +0000 (18:33 +0100)]
Fixed warnings from configure

Change-Id: I509c72c6a54f06cbecef556fd3f4d0bc9d1fc369
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
9 years agoCorrecting fixed native orientation translation for touch points
Murray Read [Fri, 2 Mar 2012 11:14:06 +0000 (11:14 +0000)]
Correcting fixed native orientation translation for touch points

For a symbian application using fixed native orientation held in
landscape, touches starting from the top of the screen were ignored.

This was caused by an off-by-one error when reflecting touch positions.
For example a touch in the range 0..359 could be mapped to the range
360..1. And since 0 mapped to a value outside of the valid range,
touches starting with that were ignored.

The same translation function is used for both touch points and
rectangle coordinates, but these use different meanings for a point.
For a touch, a point is the centre of the touched pixel, so translations
should be against the last pixel, which is at size-1. But Symbian TRect
points specify the edges of pixels, and these should be translated
against the edge of the screen, which is at size. So the function now
takes a parameter describing the type of translation required.

Task-number: ou1cimx1#982747
Change-Id: I7af10b3a5b9b8658db9af8fa9bc04ad9cb531588
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Gareth Stockwell <ext-gareth.stockwell@nokia.com>
9 years agoReact to changes of focus widget
Kevin Krammer [Wed, 29 Feb 2012 14:31:09 +0000 (15:31 +0100)]
React to changes of focus widget

Needed to automatically show/hide virtual keyboard when focus changes
in or out of an input widget

Change-Id: I21325452938e1d551bcc4421721f3bc5d85c5fbf
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Nick Ratelle <nratelle@qnx.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoBump Qt version to 4.8.1
Girish Ramakrishnan [Fri, 3 Feb 2012 00:25:03 +0000 (16:25 -0800)]
Bump Qt version to 4.8.1

Change-Id: I117e5dcd45397a9fbd1f033fc745ada00c221721
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Simo Fält <simo.falt@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
9 years agoFixed missing parentheses
Robert Loehning [Mon, 5 Mar 2012 12:51:22 +0000 (13:51 +0100)]
Fixed missing parentheses

Change-Id: Ic0a2f9bb6a1d59261240fc0de85d6db52974c964
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
9 years agoFix sizing in QGraphicsView itemsAtPosition auto test
Jonathan Liu [Wed, 29 Feb 2012 21:09:26 +0000 (08:09 +1100)]
Fix sizing in QGraphicsView itemsAtPosition auto test

The auto test may fail incorrectly depending on the width of the
QGraphicsView frame. To ensure more consistent test results, the frame is

Change-Id: I8d70fb07e45803230954f776947d525e4cf9050f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
(cherry picked from commit b2fb578a115f554ec7a00558978e5532a2ac855a)

9 years agotests: Mark unstable test as insignificant on Windows
Sergio Ahumada [Mon, 5 Mar 2012 14:44:00 +0000 (15:44 +0100)]
tests: Mark unstable test as insignificant on Windows

Marked the following tests insignificant due to failures, these need
to be fixed later and then re-enabled:


Task-number: QTQAINFRA-428
Change-Id: Ie7a1e28671f3b7ba709822f724a23aeb70d1ae53
Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
9 years agoHarfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition
John Tapsell [Wed, 8 Feb 2012 10:12:21 +0000 (10:12 +0000)]
Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition

After shaping in HB_OpenTypePosition, when we come to calculate the new
logClusters array we have to take into account that the glyphs passed in
are not a 1 to 1 correspondance with the original string, because some
shaping might have already been done.  So we must use the old
logClusters values (stored in tmpLogClusters) to map from the glyphs
passed in back to the original string.

This fixes visual word wrapping problems in thai

Change-Id: I384dfa98f0946e9e074728f89542acb2b6b6bc27
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
9 years agoQSslCertificate - make lazy initialisation thread safe
Shane Kearns [Wed, 29 Feb 2012 15:53:24 +0000 (15:53 +0000)]
QSslCertificate - make lazy initialisation thread safe

QSslCertificate can be copied around into multiple threads,
without detaching. For example, the https worker threads inside
There are const methods, which lazily initialise members of
the private class without detaching (i.e. caching results of
expensive function calls)
These functions now lock the d pointer using QMutexPool to
avoid concurrency related crashes.

autotest crashes 20% of the time in release builds without
the fix, passes 100 times in a row with the fix.

Task-number: QTBUG-20452
Change-Id: I64a01af8159216f2dd6215a08669890f6c029ca8
(cherry picked from commit 55bf4ed9468ad467a0b681d2d041edbc2a5a4d21)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoFix signature of q_atomic_test_and_set_ptr.
Girish Ramakrishnan [Sun, 4 Mar 2012 04:26:47 +0000 (20:26 -0800)]
Fix signature of q_atomic_test_and_set_ptr.

The lack of const results in a compile error when compiling 32-bit Qt
in a 64-bit machine (-platform linux-g++-32 -xplatform linux-g++-32).
Adding const is safe since expected and newval parameters are not modified
by qatomic_i386.s.

Task-Number: QTBUG-22479
Change-Id: Iee9f73b9bed777177aeae34bfcedb2feac83e67a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoFix incorrect state of show/hide menu items in Mac application menu
Pasi Matilainen [Thu, 2 Feb 2012 06:18:50 +0000 (08:18 +0200)]
Fix incorrect state of show/hide menu items in Mac application menu

The "Hide <app>", "Hide Others" and "Show All" menu items in Mac
application menu are always enabled, and do not get disabled correctly.
Fix by turning on autoenable for the menu in qt_menu.nib, and by
implementing menu item validation in QCocoaMenuLoader.

Task-number: QTBUG-10705
Change-Id: Ic181dfa26a71acad0067f5269c72517b50b17362
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
9 years agoFix crash when opening a file dialog in sandbox on Mac
Pasi Matilainen [Mon, 13 Feb 2012 07:50:31 +0000 (09:50 +0200)]
Fix crash when opening a file dialog in sandbox on Mac

The sandboxed version of the native file dialog does not implement
NSWindow methods, and does not respond to validateVisibleColumns.
Calling these methods on a sandboxed file dialog results in a crash,
so check support for the methods using respondsToSelector before

Task-number: QTBUG-21609
Change-Id: I7de7d8b24dab886a261ae02c395a4a22f0f489c0
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
9 years agoAdd accessible role Desktop.
Frederik Gladhorn [Sun, 5 Feb 2012 22:41:34 +0000 (23:41 +0100)]
Add accessible role Desktop.

Another role that is mostly needed to make Qt based desktops accessible.
Would be nice to have for KDE's Plasma in the future.

Change-Id: I1d2ce9d55d677f73cc59f0a3646ee5e588c1d948
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
9 years agoFixing z-ordering of windows
Kevin Krammer [Wed, 29 Feb 2012 13:00:14 +0000 (14:00 +0100)]
Fixing z-ordering of windows

The application root window is at z-order == 0, all platform windows created
for Qt windows are its descendants, so their base value for z-order needs
to be 1.

Backport of qtbase 117bdad3f270a4c0589cff332a7a8e904263de08

Change-Id: Ic1fb91c30559177bc094a5db96e4088860a8d6ac
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Nick Ratelle <nratelle@qnx.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoFixed handling of keyboard info messages.
Kevin Krammer [Wed, 29 Feb 2012 15:08:38 +0000 (16:08 +0100)]
Fixed handling of keyboard info messages.

Country and language values were assigned to in the case of decoding failure
but left unchanged in case of success. Thus members mLanguageId and mCountryId
remained at "en" and "US" respectively instead of being changed to whatever
the keyboard sent.

Change-Id: I9f48a55d3c431458426c5c4da8e69600948f219b
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Nick Ratelle <nratelle@qnx.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoFixed Windows performance regression introduced by ac2818bef95f134.
Samuel Rødal [Thu, 1 Mar 2012 17:06:29 +0000 (18:06 +0100)]
Fixed Windows performance regression introduced by ac2818bef95f134.

Only create a temporary DC if we're not on the main thread.

Task-number: QTBUG-24602
Change-Id: I36dad4c197c7cc1e019b19d42c81526fc8cfdcf4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
9 years agoInclude blackberry QPA plugin when building for blackberry make spec
Kevin Krammer [Wed, 29 Feb 2012 13:02:20 +0000 (14:02 +0100)]
Include blackberry QPA plugin when building for blackberry make spec

Change-Id: Ia756609ed4406deacf92e15b4e6591a91ef5c8a6
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Nick Ratelle <nratelle@qnx.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoFixed missing parentheses
Robert Loehning [Thu, 1 Mar 2012 14:11:07 +0000 (15:11 +0100)]
Fixed missing parentheses

Change-Id: Ide85353a85750a1ff85d392629855670ec4f67c0
Reviewed-by: Corentin Chary <corentin.chary@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoRevert "Don't render glyph with FT with fetchMetricsOnly"
Jiang Jiang [Thu, 1 Mar 2012 13:43:44 +0000 (14:43 +0100)]
Revert "Don't render glyph with FT with fetchMetricsOnly"

Report https://bugs.webkit.org/show_bug.cgi?id=79561 shows that
this commit will cause significant slow down in text handling
operations. Though the exact reason is unknown we should revert
it first and find out the reason later.

This reverts commit 5ffac0cfc732b994e60af0b6b965b1780ca41f2e.

Change-Id: I072bd817e20cf2f3455b6799d68079100e1a49dd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
9 years agoFix xcb-icccm 3.8 support
Girish Ramakrishnan [Wed, 29 Feb 2012 15:56:09 +0000 (07:56 -0800)]
Fix xcb-icccm 3.8 support

Build fix on platforms having xcb-icccm >= 3.8

This is a backport of 7ce8491280990350162933a0716d1b014f65aeb6 and
f005dee1b3692a09e47782dcff9b5b07aa659b51 from qtbase.

Change-Id: Ic6cbb555335a74cc7b00273081c249aa7e08afaf
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoRe-enabled passing tests in tst_qvariant
Jo Asplin [Thu, 3 Nov 2011 12:16:50 +0000 (13:16 +0100)]
Re-enabled passing tests in tst_qvariant

To increase the effective test coverage, this patch
re-enables the tst_qvariant test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ibf0dc3caf50d34084fa50cf76d199e77a42f6e16
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
(cherry picked from commit e142a64a33a54c433a38d330d64292b7e7698c92)
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
9 years agoMake reference counting in activeQt container multi-processor safe
jian liang [Wed, 29 Feb 2012 14:46:03 +0000 (22:46 +0800)]
Make reference counting in activeQt container multi-processor safe

Use InterlockedIncrement() and InterlockedDecrement() to implement
reference couting in activeQt container to make it multi-processor safe.

Change-Id: Ibe7daab69c27117bb3e35c10ba273bccd29afc69
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
9 years agoCreate target pkgconfig dir in qmake generated Windows Makefiles
Hib Eris [Tue, 7 Feb 2012 14:28:55 +0000 (15:28 +0100)]
Create target pkgconfig dir in qmake generated Windows Makefiles

(cherry picked from qtbase commit cbf8f03cf4f3b0aa49c9f35c9ae0e3304f142ac7)

Change-Id: Icea70987ee3c6040ca3ba278a578849cb74156f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoActivate replacements when installing .pc files for win32
Hib Eris [Wed, 8 Feb 2012 12:52:01 +0000 (13:52 +0100)]
Activate replacements when installing .pc files for win32

(backported from qtbase commit 1e3015d8f4c5b3c04e412dfa8f87def0922c52d9)

Change-Id: Iaacbe8528bdbe1c1fca60ae8c94625e951f14554
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoDe-duplicate platform-dependent paths
Hib Eris [Wed, 8 Feb 2012 15:13:42 +0000 (16:13 +0100)]
De-duplicate platform-dependent paths

(backported from qtbase commit 525d98725b72984e3d2526415829b763fc7654ea)

Change-Id: Ifee9f05fc8d924877f24edfddb0dc5e324a29080
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoImplement missing replacements when installing .pc files for win32
Hib Eris [Wed, 8 Feb 2012 12:36:28 +0000 (13:36 +0100)]
Implement missing replacements when installing .pc files for win32

This implements replacements for win32 makefile generators similar
to the replacement functionality in unix makefile generators.

To enable Makefile code generation for replacements in win32 makefile
generators, you must set QMAKE_STREAM_EDITOR to e.g. sed.

When building for win32, sed is normally only available in the
mingw/msys build environment and when cross compiling on unix.
In these cases QMAKE_STREAM_EDITOR is set to sed in qmake.conf.

For other win32 build environments QMAKE_STREAM_EDITOR is not set
in qmake.conf and the replacements Makefile code is not generated.

(cherry picked from qtbase commit 78faefdbb1ccc296c967dde40e2a7a1c78e4cec2)

Change-Id: Ie5de5d517eafaeaa2544f1e972aec3fe11d0a6f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoAdd TARGET_VERSION_EXT to pkgConfiglibName
Hib Eris [Thu, 9 Feb 2012 09:03:15 +0000 (10:03 +0100)]
Add TARGET_VERSION_EXT to pkgConfiglibName

The libName that is used in pkgConfig files should include the

This is needed because in Win32MakefileGenerator::fixTargetExt(),
the TARGET_VERSION_EXT is added to the library name.

In Win32MakefileGenerator::processVars(), if TARGET_VERSION_EXT is empty,
it is set to VER_MAJ.

On platforms != Windows, TARGET_VERSION_EXT does not seem to be used.

We probably got away with this so far because pkgconfig files generation
for win32 was just added in 4.8 and nobody uses them yet, and because on
platforms != windows the TARGET_VERSION_EXT is not used.

(cherry picked from qtbase commit 219a688ac17052e4bb3aac9ff8a813e3f4d8da01)

Change-Id: I56f239e389f0ef926030e4c2376cadd92c4f673c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoMake sure we release IAdviseSink interface
Jian Liang [Wed, 29 Feb 2012 01:04:34 +0000 (09:04 +0800)]
Make sure we release IAdviseSink interface

IAdviseSink interface is not released if spViewObject is 0 in
QAxClientSite::activateObject(). This patch fix this problem.

Change-Id: I5d215e18468660eab59ef69e6fd71405337264b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
9 years agoMake reference counting for QAxClientSite multi-processor safe
Jian Liang [Wed, 29 Feb 2012 01:23:47 +0000 (09:23 +0800)]
Make reference counting for QAxClientSite multi-processor safe

It is not safe to use ++long/--long to implement reference counting for
COM object in multi-processor environment. We use InterlockedIncrement()
and InterlockedDecrement() to implement reference counting.

Change-Id: Ibfc5f3456cbaefb9267feb378483c5c60c305f00
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
9 years agoFix QTreeView header re-ordering bug on Mac OS.
Chris Meyer [Tue, 21 Feb 2012 20:14:48 +0000 (12:14 -0800)]
Fix QTreeView header re-ordering bug on Mac OS.

When the mouse button is released at the end of a drag, Cocoa
may simulate an extra mouse moved event. However, the state of
the buttons when this event is generated is already 'no button'.
This leads to some failsafe code canceling out of the drag state
and when the actual mouse release event is finally processed, the
header drag state has already been exited and the header drag

This patch disables the failsafe code on Cocoa and makes header
dragging work when the mouse goes outside the bounds of the header

Task-number: QTBUG-14179
Change-Id: Ic2762b77b78ef7b99f97ff9ed1f58254de1eba82
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Andrew Semenenko
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
9 years agoFix to exit of adopted thread watcher in Windows
jian liang [Sat, 18 Feb 2012 00:43:29 +0000 (08:43 +0800)]
Fix to exit of adopted thread watcher in Windows

Don't register the thread handle and QThread object pointer to watch list
for adopted thread watcher thread in Windows. Otherwise the watcher thread
will never exit and can't clean up its own QThreadData and QAdoptedThread

Task-number: QTBUG-23961

Change-Id: Ia84326cf3cfd978d2b003ccc1bb6861db950e899
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
(cherry picked from commit bf66eebbc28b1f405a49a68d3f6c341d433159ea)

9 years agoFix potential race condition in data structure of adopted thread watcher
jian liang [Sun, 19 Feb 2012 14:09:44 +0000 (22:09 +0800)]
Fix potential race condition in data structure of adopted thread watcher

Fix potential race condition in data structure of adopted thread watcher
in Windows. Since QVector is not thread safe, it is not safe to read and
append data to qt_adopted_thread_handles or qt_adopted_qthread
simultaneously in qthread_win.cpp. This patch fix this race condition.

Change-Id: I2d0c7a4cdde5390d38d15c98343f0fc6ddd24aba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
(cherry picked from commit 4b30882a3f74914156f165a0a062b54ad3686c45)

9 years agoAdd additional QGraphicsView tests for regression
Jonathan Liu [Thu, 23 Feb 2012 13:53:56 +0000 (00:53 +1100)]
Add additional QGraphicsView tests for regression

Add additional tests for graphics view tooltip regression introduced by

Task-number: QTBUG-17517
Task-number: QTBUG-22663
Change-Id: I5e0d0e19504730a3e14ac84712a366dbebe688e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
9 years agoRevert "Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition."
Jonathan Liu [Thu, 23 Feb 2012 13:42:34 +0000 (00:42 +1100)]
Revert "Don't rely on mapFromGlobal in QGraphicsScenePrivate::itemsAtPosition."

This reverts commit 7c0d15a22266a425c9e9ac0120d6774e120fe01e.
The commit caused a regression whereby tooltips may be shown even if the
mouse is not over the item if it has the Qt::ItemIgnoresTransformations
flag and the QGraphicsView had been scaled.

Task-number: QTBUG-17517
Task-number: QTBUG-22663
Change-Id: Ib7fd788d9712c5e659fe07182f9505a4eb135ab2
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
9 years agoFix window positioning regression.
Miikka Heikkinen [Tue, 28 Feb 2012 08:22:27 +0000 (10:22 +0200)]
Fix window positioning regression.

The fix to bug QTBUG-10589 has affected the style flags of windows,
which indirectly changed how their initial position is determined.
Fixed initial position for windows with WS_POPUP style so that x and y
cannot go negative, which makes QMainWindows with larger than screen
initial dimensions to behave identically to Qt 4.7.4.

Task-number: QTBUG-24071
Change-Id: Ie38cdd206df4be21cce823d7d94a4690a7cb01e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
9 years agoFix submenu positioning
Miikka Heikkinen [Mon, 27 Feb 2012 11:54:21 +0000 (13:54 +0200)]
Fix submenu positioning

Submenus are now positioned to the correct side of the parent menu
based on layout direction, if there is enough space on screen to fit
the menu. If there is insufficient space, then the menu is positioned
to the other side of the parent menu. In case that also causes submenu
to be partially ofscreen (very wide menu relative to the screen),
then the submenu will be aligned with the screen edge and will overlap
the parent menu. This seems like a lesser evil compared to having
submenu partially offscreen, which could obscure important details
such as checkmarks.

Task-number: QTBUG-23568
Change-Id: I6a9ab2c232713a2ee5a6dde3227c40419d46bd3d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 64e0560ff451676fc96dfadd21bef436ac25bb52)

9 years agoFix divide by zero when glyphWidth is 0
Jiang Jiang [Mon, 27 Feb 2012 08:51:46 +0000 (09:51 +0100)]
Fix divide by zero when glyphWidth is 0

Change-Id: Ic0108b76b8d73cc977f8d64e036a65cb93db4684
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
9 years agoQWindowsPipeWriter could terminate the process to early
Martin Petersson [Mon, 27 Feb 2012 14:41:10 +0000 (15:41 +0100)]
QWindowsPipeWriter could terminate the process to early

When the QWindowsPipeWriter is deleted it will wait
for the thread to exit. This wait was set to 100 ms
which will not always be enough time for the thread
to exit, in that case the thread will be terminated.
This will increase the timeout to 30 seconds that
should be more then enough time for the thread to exit
by itself.

Task-number: QTBUG-4425
Change-Id: I52567066b757c2bbfda6887f504cf80de262b988
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
9 years agoSpecify global mouse position for QDeclarativeMouseArea auto test
Jonathan Liu [Sat, 25 Feb 2012 01:54:58 +0000 (12:54 +1100)]
Specify global mouse position for QDeclarativeMouseArea auto test

The preventContextMenu QDeclarativeMouseArea auto test creates
QContextMenuEvent without specifying the global mouse position. As a
result, the event's global mouse position is incorrectly set to

Change-Id: Ib67fbcf3acf968eb2748426ad0db0e900826b232
Reviewed-by: Martin Jones <martin.jones@nokia.com>
9 years agoFix modal file dialog opening on Mac
Pasi Matilainen [Mon, 27 Feb 2012 10:19:47 +0000 (12:19 +0200)]
Fix modal file dialog opening on Mac

When a modal file dialog is opened on Mac, the native file dialog is
actually opened twice, first as modeless and later as modal. Normally
this works (by chance), but when the application runs in a sandbox,
this results in a crash.

Task-number: QTBUG-21609
Change-Id: I906868e1b4bd74dc3030891bede51f32ebd16b4a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
9 years agotest: Improved stability of tst_qsharedmemory
Sergio Ahumada [Mon, 27 Feb 2012 15:16:29 +0000 (16:16 +0100)]
test: Improved stability of tst_qsharedmemory

Significantly increase waitForFinished() timeouts.

Change-Id: I498408c756f2b46bf3870f40703e7c2f0d4ec9b5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
9 years agoFix for Thai characters with a below mark
Marko Kenttala [Wed, 22 Feb 2012 12:18:52 +0000 (14:18 +0200)]
Fix for Thai characters with a below mark

Some Thai characters with a mark below got drawn under fonts descent
causing them to be clipped in some situations.

Added checking for this and use of lower offset if needed.

Task-Number: ou1cimx1#979179
Change-Id: If9fb643d4dee24342215a637c805d52b78584333
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
9 years agoFix static build of Qt for WinCE and WEC7.
Janne Anttila [Fri, 24 Feb 2012 14:20:24 +0000 (16:20 +0200)]
Fix static build of Qt for WinCE and WEC7.

When doing a static build of Qt for WinCE/WEC7, the sqlite database
driver is statically built into Qt library. In that case relevant
HAVE_LOCALTIME_S=0 defined in sqlite.pro under plugins folder does
not have effect because qsql_sqlite.pri and further 3rdparty/sqlite.pri
are directly included to QtSql library.

Moved the needed define down to such *.pri file which is included
in both static and non-static Qt builds.

Task-number: QTBUG-24500

Change-Id: Iacbdd6d02fc31558a1ce91f42756eaac5053414b
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
9 years agoQNetwork: fix compilation with "-no-feature-bearermanagement"
Martin Petersson [Mon, 27 Feb 2012 14:11:09 +0000 (15:11 +0100)]
QNetwork: fix compilation with "-no-feature-bearermanagement"

Task-number: QTBUG-23239

Change-Id: I12f89a4e595231738985ca0cf3179fee7de9fa72
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
9 years agoQNetwork: remove compile warning.
Martin Petersson [Mon, 27 Feb 2012 14:36:32 +0000 (15:36 +0100)]
QNetwork: remove compile warning.

Change-Id: I01245f7f6943f5a8bf30e8215419dbfd4dfcdb09
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
9 years agoFix mouse wheel page-by-page scrolling on windows
Pasi Pentikainen [Mon, 13 Feb 2012 17:59:23 +0000 (19:59 +0200)]
Fix mouse wheel page-by-page scrolling on windows

In windows, the page-by-page mouse wheel scrolling is configured with
scroll lines value of -1, which maps to INT_MAX. The scroll calculations
had an integer overflow issue which caused the wheel scrolling to scroll
only downwards when configured with large enough value like this.

Task-number: QTBUG-11336
Change-Id: Ib4440367ce2617f96797c1f8cc8ec9e6a2f8467c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andrew Semenenko
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
9 years agoFixed zlib build for WEC7.
Andreas Holzammer [Fri, 10 Feb 2012 10:27:00 +0000 (11:27 +0100)]
Fixed zlib build for WEC7.

errno in zutil.c is leftover, and not used anymore -> removed.

In gzguts.h qfunctions_wince.h are included. To use this header
qglobal.h is needed.

In qfunctions_wince.h a special define section is added for

Task-number: QTBUG-22507
Change-Id: I78ec78d22e2930a03b349a47ab3a3ad077277c42
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 10830e844683c75d96c024450b4b7a624d8d6d8f)
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
9 years agoBuild fix to raster window surface.
Janne Anttila [Fri, 24 Feb 2012 11:24:27 +0000 (13:24 +0200)]
Build fix to raster window surface.

Fixed typo in qwindowsurface_raster.cpp, to get rid of compile error:
    'class QRasterWindowSurfacePrivate' has no member named 'needsSync'
Mispelling was introduces by commit: 30dee4f4

Task-number: QTBUG-23320
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: If473289e0549b2dec440285fec1ce64030de035f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
9 years agoFix backspace on empty lines with custom QML editors
Aapo Haapanen [Fri, 24 Feb 2012 14:31:09 +0000 (16:31 +0200)]
Fix backspace on empty lines with custom QML editors

Symbian AknFEP doesn't return backspace keypresses to the editor if
the editor is empty. This causes problems for multiline editors,
because AknFEP can only see one line at a time. This issue has been
previously fixed by change a2709ef3f4410a1d1755e00353e6f969f8bb5613 so
that QCoeFepInputContext::DocumentLengthForFep returns lenght as 1
for empty lines. The fix was then refined by change
0ffd7fcc78e27f9184a6f1ee5a8a9cc5e6266998 so that the length is altered
only when the editor has multiple lines.

After the latest change, if a custom QML editor didn't have a lineCount
property, the code assumed it has only one line. This caused problems
for some custom multiline editors. This change alters the behaviour so
that if the code can't get the linecount from the editor, it assumes it
has multiple lines. This reverts the code to behave like before change
0ffd7fcc78e27f9184a6f1ee5a8a9cc5e6266998 for such custom QML editors.

Task-number: ou1cimx1#981078
Change-Id: I3551d1d3ca1984957465f894c8bc237544224468
Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com>
Reviewed-by: Murray Read <ext-murray.2.read@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
9 years agoFix a crash in QSystemLocalePrivate::uiLanguages().
Friedemann Kleint [Fri, 24 Feb 2012 14:18:15 +0000 (15:18 +0100)]
Fix a crash in QSystemLocalePrivate::uiLanguages().

Use the correct calling convention. Discovered by the mimetype
test in Qt 5.

Change-Id: I79b97325dd69466885a64c238935107bf14e9a0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
9 years agoPort QBBRootWindow from the Qt 5 QPA plugin.
Robin Burchell [Thu, 23 Feb 2012 15:03:57 +0000 (16:03 +0100)]
Port QBBRootWindow from the Qt 5 QPA plugin.

This lessens unnecessary delta between the two.

Change-Id: I3bb33d977573e3404dd08c2f4e396d18dd63ddc7
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
9 years agoFix tst-qtextscriptengine unit test when no appropriate font exists
John Tapsell [Tue, 21 Feb 2012 09:30:38 +0000 (09:30 +0000)]
Fix tst-qtextscriptengine unit test when no appropriate font exists

The tst_QTextScriptEngine::controlInSyllable_qtbug14204 test fails if no
Devanagari font is found.

Change-Id: I35cf9d788569a92daa8b370480a44f7e748ddf86
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
9 years agoUpdated WebKit to c1252be57a3f673277c732c0902568111b2f4964
Simon Hausmann [Thu, 23 Feb 2012 12:24:04 +0000 (13:24 +0100)]
Updated WebKit to c1252be57a3f673277c732c0902568111b2f4964

QNX build fix.

Change-Id: I72b31faba88a569f62667f7803f6c7434ce6b15e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
9 years agoINTEGRITY mkspecs update
Kalle Viironen [Wed, 8 Feb 2012 13:05:43 +0000 (15:05 +0200)]
INTEGRITY mkspecs update

Modifies existing structure of INTEGRITY mkspecs to be more clear and
adds a new mkspec for INTEGRITY x86 target. This also moves mkspecs
to supported folder as this is the case in 4.8.x.

Task-number: QTBUG-24153
Change-Id: Iae893c20f88050040f7686ab2ab272c1d1af22bb
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agoStabilize tst_qdbusabstractinterface and make it XFAIL
Rohan McGovern [Tue, 14 Feb 2012 02:55:49 +0000 (12:55 +1000)]
Stabilize tst_qdbusabstractinterface and make it XFAIL

This test was written incorrectly in a way which happened to allow it to
pass most of the time (but not all the time).

Reset the state of test objects between each test function, and mark the
broken functions with QEXPECT_FAIL and a link to a task.

Replace the unusual WaitForPinger construct with the usual
QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations.

(cherry picked from commit e88f9a92b7ab05ea9bc25083de7dee1b67dd673e)

Task-number: QTBUG-24262
Change-Id: I7a1f265695c15c0f7b1867a8608827c951a6e3b9
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoAllowing symbian cleanup code in thread started and finished slots
Murray Read [Tue, 21 Feb 2012 16:13:10 +0000 (16:13 +0000)]
Allowing symbian cleanup code in thread started and finished slots

The run() function of QThread was inside a TRAP, but the started() and
finished() signals were emitted outside of a TRAP so could not contain
Symbian cleanup stack code. This broke compatability with some apps,
as the older pthread based implementation had the whole main thread
function running inside a TRAP.

The started and finished signals are now emitted inside TRAPs, with
enhanced leave/exception handling code.

Task-number: ou1cimx1#979704
Change-Id: I9b4e50b1085494b5fd5e05efa11739ce19ff26fb
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
9 years agoTake into account input shaping in findRealWindow
Albert Astals Cid [Mon, 20 Feb 2012 15:38:02 +0000 (16:38 +0100)]
Take into account input shaping in findRealWindow

In previous commits we took into account bound shaping, but X also
supports input shaping, so make sure it's inside both input and bounding
shaping to consider the position as inside a window

My tests show that when unset Bound Shaping and Input Shaping return the
rectangle of the window itself, so we need to be inside both of the
rectangle sets to consider the position as a dragabble position for the

Change-Id: Icb2204a50a97e4a5e02e75301c67287525b290ba
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
9 years agoImplemented QAccessibleTextWidget
José Millán Soto [Fri, 20 Jan 2012 11:25:17 +0000 (12:25 +0100)]
Implemented QAccessibleTextWidget

A new class called QAccessibleTextWidget was added.
This class should implement all methods of QAccessibleTextInterface and
QAccessibleEditableTextInterface which only need a QTextCursor, and it
defines two pure virtual methods, to obtain and set the text cursor, so
accessible implementations of widgets which use a text cursor can implement
these two methods.

QAccessibleTextEdit is now a subclass of QAccessibleTextWidget and most of
its methods were moved to QAccessibleTextWidget.

Change-Id: Ie30e7b377cb9b381c2ef6017ecb188fd0fdeeddb
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
9 years agoQElapsedTimer/Win: Fix 64-bit integer overflow
Jonathan Liu [Tue, 21 Feb 2012 04:54:25 +0000 (15:54 +1100)]
QElapsedTimer/Win: Fix 64-bit integer overflow

The ticksToNanoseconds function in qelapsedtimer_win.cpp multiplies
ticks from performance counter with 1000000000 which can sometimes
result in 64-bit integer overflow. This can cause the elapsed time to
reset or jump around.

Task-number: QTBUG-23150
Change-Id: I464503e03cbe64e13906e773beafbf88e7dc256a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoInitial import of the BlackBerry Playbook QPA plugin.
Rafael Roquetto [Tue, 7 Feb 2012 19:01:40 +0000 (20:01 +0100)]
Initial import of the BlackBerry Playbook QPA plugin.

Change-Id: Ibc883be9af145eafef2e5ff9eb82c3364bace331
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
9 years agoFixes QProcess on QNX
Rafael Roquetto [Tue, 14 Feb 2012 22:14:14 +0000 (23:14 +0100)]
Fixes QProcess on QNX

This patch first re-enables childStartedPipe on QNX and uses, just like other
platforms, to monitor the inferior process life cycle. This also aligns
QNX-specific code logic closer to the common QProcess logic, making it
unecessary to have custom versions of functions such as
QProcess::waitForStarted(). The only difference that remains is the use of
spawn() instead of fork(), because both fork() and vfork() do not support
multi-threaded applications on QNX and will segfault.

Change-Id: I8e1f9823629fcb5e7c3c128fafc2542a403b969e
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoRemove unnecessary locking from QNetworkProxy constructor
Shane Kearns [Thu, 16 Feb 2012 17:02:11 +0000 (17:02 +0000)]
Remove unnecessary locking from QNetworkProxy constructor

QGlobalNetworkProxy (a singleton) had two phase construction, with
the second phase being called from QNetworkProxy's constructor.
This isn't necessary, and has been reported as causing deadlocks.

Although constructing socket engine handlers has side effects
(they add themselves to a list on construction and remove themselves
on destruction), this appears to be safe. The socket engine handlers
are only used while holding the list mutex, and any socket engines
created don't have any reference to the factory that created them.

With the new version, it is possible that two instances of
QHttpSocketEngineHandler and QSocks5SocketEngineHandler exist
temporarily if a Q_GLOBAL_STATIC initialisation race occurs.
This appears safe, because the loser of the race deletes its
handlers, which remove themselves from the global list as above.

Task-number: QTBUG-13088
Change-Id: I8cf520da717d8ab7d862ab89c6de13aea6d60ac3
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aee4cbf22a5942c7bd4b9545a8fcb7cf2930e0ee)

9 years agoFix handling of urls containing username/password in QNetworkAccessManager
Shane Kearns [Wed, 15 Feb 2012 17:24:14 +0000 (17:24 +0000)]
Fix handling of urls containing username/password in QNetworkAccessManager

QNetworkAccessManager was ignoring the supplied credentials, although
webkit seems to support these urls at a higher level.

Following the behaviour of browsers:
We use supplied credentials if authentication is required.
We add supplied credentials to the authentication cache.
We emit authenticationRequired signal if the credentials were wrong.
We do not use previously cached credentials for that url

Synchronous http requests fail, if the credentials were wrong.

Task-number: QTBUG-18107
Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b4a538ea1c3cdce09e3528227dba2e8f5765cbdc)

9 years agoFix incorrect use of QObject::disconnect in synchronous http request
Shane Kearns [Wed, 15 Feb 2012 17:58:11 +0000 (17:58 +0000)]
Fix incorrect use of QObject::disconnect in synchronous http request

In certain circumstances, this could cause the request to time out
(and repeatedly send bad authentication credentials to the server)
instead of failing with AuthenticationRequiredError.

Change-Id: Iff66b32f1d7268f21fd77b6620aae4b5d49d857f
Reviewed-by: Richard J. Moore <rich@kde.org>
(cherry picked from commit d425a0dad38e51c99cfe59294a3706ced90b24a0)

9 years agoUpdate documentation to show NTLMv2 is supported
Shane Kearns [Wed, 15 Feb 2012 15:34:09 +0000 (15:34 +0000)]
Update documentation to show NTLMv2 is supported

This feature was implemented in 4.8, but documentation was not
updated at the time.

Task-number: QTBUG-18181
Change-Id: I657d7ab7aaf43b73b7bf8fd1cb76086522cf5c2b
(cherry picked from commit 6f7bd6532d34713811c8f70b287d151d24cdda7c)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoRR scheduler error handling for deleted active objects
Murray Read [Fri, 17 Feb 2012 13:53:49 +0000 (13:53 +0000)]
RR scheduler error handling for deleted active objects

We have discovered that the active object ConnectionStarter could
potentially leave after deleteing itself in RunL. If that were to
happen, QtRRActiveScheduler::RunMarkedIfReady would have crashed when
it asked the deleted active object to handle the error.

Some active object deletion detection has been added to
QtRRActiveScheduler::RunMarkedIfReady to protect against crashes.

The ConnectionStarter active object has been modified so that even if
it does leave, when running in CActiveScheduler, it still won't cause
a crash and will clean itself up correctly.

Task-number: ou1cimx1#979241
Change-Id: Iafa10b96bbd8bedfec82d6d546c7ffaf0557fd8b
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
9 years agoFixed typo in text: "dpeth" -> "depth"
Sergey Belyashov [Thu, 16 Feb 2012 18:46:05 +0000 (22:46 +0400)]
Fixed typo in text: "dpeth" -> "depth"

Change-Id: Ic910dc63db5625640735e2918f09c75a1d8669cc
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
9 years agotests: Mark unstable tests as insignificant on Windows
Sergio Ahumada [Fri, 17 Feb 2012 13:30:03 +0000 (14:30 +0100)]
tests: Mark unstable tests as insignificant on Windows

Marked the following tests insignificant due to failures, these need
to be fixed later and then re-enabled:


Task-number: QTQAINFRA-428
Change-Id: I294048133bac141dfd6239dba115dcc93035f868
Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
9 years agoFix for Shazam crash
Murray Read [Thu, 16 Feb 2012 15:19:35 +0000 (15:19 +0000)]
Fix for Shazam crash

QtRRActiveScheduler::RunMarkedIfReady was setting a flag in active
objects after RunL(). Active objects potentially delete themselves in
RunL(), and so this flag setting potentially corrupts memory. The flag
is unnecessary, so has been removed. Other flags are renamed to make
their roles clearer.

Task-number: ou1cimx1#947013
Change-Id: I1391c31b33074ee9d7fd02410fdb879afc455842
Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Reviewed-by: Murray Read <ext-murray.2.read@nokia.com>
9 years agoDoc fix for Linguist
Andy Shaw [Fri, 17 Feb 2012 07:57:47 +0000 (08:57 +0100)]
Doc fix for Linguist

Indicate the right menu that the Batch Translation entry can be found in

Change-Id: I86da9310f1672d073f7c4e207a46ecdd6757018e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
9 years agoEnsure the scrollers appears when there is too many menu items
Andy Shaw [Mon, 6 Feb 2012 14:57:22 +0000 (15:57 +0100)]
Ensure the scrollers appears when there is too many menu items

When there are too many items in a single column menu then scrollers
will appear for the menu to enable scrolling to the other items.
However, this broke in Qt 4.8 as the scrollers would not appear anymore
due to the adjustment of the size of the menu to account for the size
of the desktop.

Task-number: QTBUG-23507
Change-Id: Ib6bb7a5572bc0fbbf3de6dac03a08b69404804a3
Reviewed-by: Pierre Rossi <pierre.rossi@nokia.com>
9 years agoFix Windows timer performance regression
Jonathan Liu [Thu, 16 Feb 2012 14:28:54 +0000 (01:28 +1100)]
Fix Windows timer performance regression

This fixes a Windows timer performance regression caused by
74251fb0fc57b1e0f7db0b561e4aa4c0347f6f37. This regression causes a
degradation in timer precision which can cause animations to not be as
smooth as well as negatively impact timing sensitive code.

Change-Id: I2821fde66799a5b1e9994e823a7dc56c91148742
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
9 years agoDon't render glyph with FT with fetchMetricsOnly
Jiang Jiang [Wed, 15 Feb 2012 13:18:21 +0000 (14:18 +0100)]
Don't render glyph with FT with fetchMetricsOnly

Neither rendering with outline nor fetchMetricsOnly requires the
rendering from FreeType so we don't need to render them or cache
it. It should speed up recalcAdvances() quite a lot.

Change-Id: Ic322507d54ab59020851e359088a4afa4e03c8db
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
9 years agoAbort FTP download, not the whole application
Shane Kearns [Tue, 14 Feb 2012 20:12:42 +0000 (20:12 +0000)]
Abort FTP download, not the whole application

An old coding error meant that the C runtime abort() function was
being called instead of QFtp::abort() when cancelling an FTP download
using QNetworkReply::close()

Task-number: QTBUG-22820
Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoFix online status checking in generic bearer plugin.
Xizhi Zhu [Wed, 18 Jan 2012 20:38:17 +0000 (21:38 +0100)]
Fix online status checking in generic bearer plugin.

QNetworkInterface::IsUp means the interface is up, but not necessarily
connected. QNetworkInterface::IsRunning means the interface is up and

Cherry-picked from Qt5 / QtBase commit:

Task-number: QTBUG-22873
Change-Id: Ieb544058814520b4292b496de2e4672214f3d00a
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
9 years agotests: Mark unstable tests as insignificant on Windows
Sergio Ahumada [Wed, 15 Feb 2012 08:42:39 +0000 (09:42 +0100)]
tests: Mark unstable tests as insignificant on Windows

Marked the following tests insignificant due to failures, these need
to be fixed later and then re-enabled:


Task-number: QTQAINFRA-428
Change-Id: I21e78e4320e28735286778125a103caf7aa45d44
Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
9 years agoQDial: Fix crash when singleStep-property is 0.
Friedemann Kleint [Fri, 9 Dec 2011 08:02:48 +0000 (09:02 +0100)]
QDial: Fix crash when singleStep-property is 0.

Task-number: QTBUG-23072

Change-Id: I296b46af23420b24fa5460b9660e33bf203ea29f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
9 years agoChecking for directory exists in failed QDir::mkpath on Symbian
Murray Read [Mon, 13 Feb 2012 16:33:22 +0000 (16:33 +0000)]
Checking for directory exists in failed QDir::mkpath on Symbian

QDir::mkpath should return true if the directory already exists. In the
new native Symbian implementation, RFs returns KErrPermission denied
when you try to access some data caged directories such as C:\private.
This was being interpreted as failure, as the code expected
KErrAlreadyExists for the case where the directory exists.

In this circumstance we now check if the directory already exists.

Task-number: ou1cimx1#974477
Change-Id: Ie476219bc963c23d3c7e1773ebded8ecf137fd3c
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
9 years agoFixed memory leak in QPA/Lighthouse event handling.
Samuel Rødal [Tue, 14 Feb 2012 15:13:29 +0000 (16:13 +0100)]
Fixed memory leak in QPA/Lighthouse event handling.

The WindowSystemEvent class needs a virtual destructor, or sub-classes
with non-POD members will leak memory and their member's destructors
don't get called.

This is a backport, the bug was already fixed in Qt 5 as

Change-Id: I2766fcea955a6cbc7613b717c76e13674943d6a9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
9 years agotests: Mark unstable tests as insignificant on Windows
Sergio Ahumada [Fri, 10 Feb 2012 21:48:54 +0000 (22:48 +0100)]
tests: Mark unstable tests as insignificant on Windows

Marked the following tests insignificant due to failures, these need
to be fixed later and then re-enabled:


Task-number: QTQAINFRA-428
Change-Id: I648f86b3ec7767f83767af8981a6ce2aed65722b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
9 years agoRe-enabled tst_LargeFile
Jo Asplin [Wed, 26 Oct 2011 09:29:58 +0000 (11:29 +0200)]
Re-enabled tst_LargeFile

tst_LargeFile currently seems to pass in a stable way in CI

It does have an issue on 64-bit Linux (see QTBUG-21175), so
that test function is still disabled (QEXPECT_FAIL'ed) on that platform.

Change-Id: I818046f84f2db5eb2155ae1f51f69581029bfaee
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
(cherry picked from commit b5ef53df457d784da7221a8244963462a686458d)

9 years agoBuild break fix
Ari Lehtola [Mon, 13 Feb 2012 12:52:41 +0000 (14:52 +0200)]
Build break fix

Public SDK breaks because of missing definition of
GfxTransEffect in commit
Symbian specific flag added

Change-Id: I972bf207d7854be1bc77bba6ae4ef8155279b1b3
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
9 years agoInitializes seqDumpPos on qiodevice.cpp
Nick Ratelle [Fri, 6 Jan 2012 17:19:27 +0000 (12:19 -0500)]
Initializes seqDumpPos on qiodevice.cpp

This was spotted by RIM static code checking team. seqDumpPos is a dummy
variable which is only used on sequential mode. It is used as a
simultaneous storage area of both pPos and pDevicePos when in sequential mode,
to keep both in sync. They just suggested that it would be a good practice to
initialize the variable, since it does not have any side effect, and there's
not much value on not doing it.

cherry-picked from qt5/qtbase: e7e87993042ac9a4fd899da5ea0340322b47d9ff

Change-Id: Ib0d3299b03de9df539567c92bda5e6fe9f95ba7a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
9 years agotest: Do not mark tst_qdeclarativeerror as insignificant anymore
Sergio Ahumada [Fri, 10 Feb 2012 08:46:59 +0000 (09:46 +0100)]
test: Do not mark tst_qdeclarativeerror as insignificant anymore

This test has been stable for quite some time now.

Change-Id: I97157c4ccc8221d2ff9f54ee7ed4c66b50956c01
Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
9 years agoFixed compiler warning about unused variable with QT_NO_TEXTCODEC.
Andreas Holzammer [Wed, 8 Feb 2012 16:24:23 +0000 (17:24 +0100)]
Fixed compiler warning about unused variable with QT_NO_TEXTCODEC.

Task-number: QTBUG-22512

Change-Id: I3a6605ce19ac8def6a4fdfbf2904f7c165cbfc8e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
9 years agoAdded QAccessibleGroupBox
José Millán Soto [Sun, 22 Jan 2012 12:43:36 +0000 (13:43 +0100)]
Added QAccessibleGroupBox

Added a new accessible interface for QGroupBox, as QAccessibleDisplay
is not good enough when the QGroupBox is checkable.
AccessibleFactory was modified to return a QAccessibleGroupBox when
the accessible interface of a QGroupBox is requested.

Created tst_QAccessibility::groupBoxTest

Change-Id: I6c23dcf5562b3ea269b04102e78463b65827188a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
9 years agoSymbian: Fix for VKB default language to English in RTL variant
Satyam Bandarapu [Fri, 10 Feb 2012 11:58:21 +0000 (13:58 +0200)]
Symbian: Fix for VKB default language to English in RTL variant

Currently VKB default language to English in RTL variant is supported
only for email characters and url characters only. Now changed to
available for all input methods if application sets the flag.

Task-number: ou1cimx1#961176
Change-Id: I86e351ea0b829cc4f7c8163863102f9680fd7f55
Reviewed-by: Murray Read <ext-murray.2.read@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>