qt:qt.git
11 years agoFix for major regression in OpenVG clipping
Jani Hautakangas [Thu, 10 Mar 2011 15:50:12 +0000 (17:50 +0200)]
Fix for major regression in OpenVG clipping

OpenVG paint engine didn't reset it's
mask fallback state correctly when engine
was resetted.

Task-number: QTBUG-17966
Reviewed-by: Jason Barron
(cherry picked from commit 2ecb0ea77c04424f6f557ca8a13c1d86666763df)

11 years agoUnsuccessful unlocking of QNetworkConfigurationPrivate mutex
Perttu Pohjonen [Mon, 7 Mar 2011 06:49:00 +0000 (08:49 +0200)]
Unsuccessful unlocking of QNetworkConfigurationPrivate mutex

Above mentioned mutex is locked twice: first in caller function and second time in called function. Called function unlocks mutex and emits signal clearly unaware that the mutex is actually still locked. I changed the mutex to be unlocked before the function is called.

Task-number: QTBUG-15108
Reviewed-by: Ville Pernu
(cherry picked from commit c15560fbe2a1762117395c5ecaaecfa5ab8dce6f)

11 years agoFix typo in qglthreads auto test. v4.7.2
Jani Hautakangas [Fri, 28 Jan 2011 11:12:47 +0000 (13:12 +0200)]
Fix typo in qglthreads auto test.

Reviewed-by: TRUSTME
(cherry picked from commit 97503dfd7fad9c8023b2f9632e6ef865ccd0cad8)

11 years agoAdd selected P1 tasks to changes file.
Jason McDonald [Mon, 21 Feb 2011 15:05:23 +0000 (01:05 +1000)]
Add selected P1 tasks to changes file.

Reviewed-by: Trust Me
(cherry picked from commit 11f11f8ad562472759df24a410d52edd63eb2cf4)

Conflicts:

dist/changes-4.7.2

11 years agoMy 4.7.2 changes
Jason McDonald [Mon, 21 Feb 2011 15:03:58 +0000 (01:03 +1000)]
My 4.7.2 changes
(cherry picked from commit ab38731fe5dcfaa1a7a70bc290a8856b5b01524d)

Conflicts:

dist/changes-4.7.2

11 years ago4.7.2 changes
Iain [Wed, 9 Feb 2011 18:16:29 +0000 (18:16 +0000)]
4.7.2 changes

Reviewed-by: TrustMe
(cherry picked from commit 97305f4ca91b380f42ff5d3fd49c268df0c5ff8c)

11 years agoChanges for 4.7.2
Gareth Stockwell [Wed, 9 Feb 2011 09:50:30 +0000 (09:50 +0000)]
Changes for 4.7.2

Reviewed-by: Jani Hautakangas
(cherry picked from commit 36f8782a5994d5ea2cd71695daf0f33b5e37e609)

11 years agoImplementation of QNetworkProxyFactory::systemProxyForQuery() for Symbian
Jeremy Katz [Mon, 17 Jan 2011 13:37:17 +0000 (14:37 +0100)]
Implementation of QNetworkProxyFactory::systemProxyForQuery() for Symbian

This implementation replaces the default do-nothing version, querying
the device's commsdat for appropriate entries.

Task-number: QTBUG-13857
Reviewed by: Jeremy Katz et al.
(cherry picked from commit 1b6656ea26d2a82a8763e8f3759b0ac683fca57a)

11 years agoPrevents crashing when ICO file has bad color table value
Mauri Vehniäinen [Fri, 18 Feb 2011 09:10:08 +0000 (10:10 +0100)]
Prevents crashing when ICO file has bad color table value

When color table value is read from ICO header memory allocation is
made based on this value. This case is relevant only when reading
8bit images. Therefore values over 256 will abort reading the image.

Task-number: QT-4535

Merge-request: 1090
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
(cherry picked from commit d6c1e5d78bdfbeb373970b65d8260f7e9f9ce1bd)

11 years agoAttempt to fix symbian 3.1 and 3.2 compile break.
Jason McDonald [Fri, 18 Feb 2011 12:03:55 +0000 (22:03 +1000)]
Attempt to fix symbian 3.1 and 3.2 compile break.

e46c44f9538dbe5b44ce61d3a42403cfa471ae8b restructured qml.pri.  In the
original version the else part at the bottom of the file was processed
for Symbian 3.1 and 3.2, but the commit stopped that from happening.

This commit makes the minimal change to make the statements in the else
part apply to 3.1 and 3.2 again.

Really the file should be restructured to have separate logic for
setting each vairable, but I'll leave that task for the developers.

Reviewed-by: Eckhart Koppen
(cherry picked from commit c658394f1b34c98b141eff22a69a3f4c7bbd4c51)

11 years agoChanged the localized vendor name for Qt SIS packages to "Nokia"
Eckhart Koppen [Thu, 17 Feb 2011 15:49:48 +0000 (17:49 +0200)]
Changed the localized vendor name for Qt SIS packages to "Nokia"

The previously used name "Nokia, Qt" was not usable for Nokia
Content Signing, which only allows "Nokia" as the visible vendor
name. The unique vendor ID remains as "Nokia, Qt"

Reviewed-by: TrustMe
(cherry picked from commit a8a84f1667966acfa093c4be0b7d4b0900ddd3d9)

11 years agoRemove sqlite3.sis from qt.sis.
Miikka Heikkinen [Thu, 17 Feb 2011 10:15:48 +0000 (12:15 +0200)]
Remove sqlite3.sis from qt.sis.

Nokia Content Signing doesn't like embedded sis packages, so
remove the embedded sqlite3.sis from qt.sis. It must now be installed
separately just like Open C packages.

Task-number: QTBUG-17399
Reviewed-by: axis
(cherry picked from commit 924bcf1ccd9d25484fda8b8d68b8de7744a4693e)

11 years agoRemove sqlite3_selfsigned.sis as it is no longer usable or needed.
Miikka Heikkinen [Tue, 11 Jan 2011 14:56:23 +0000 (16:56 +0200)]
Remove sqlite3_selfsigned.sis as it is no longer usable or needed.

Selfsigned qt.sis no longer installs on top of sqlite3_selfsigned.sis
as patching embedded sises and dependencies was removed from
patch_capabilities.pl script. However, since the regular sqlite3.sis
is nowadays signed for all three Symbian manufacturers that Qt supports,
there is no more need to have a self-signed sqlite3.sis in the first
place, so it is removed to reduce confusion.

Task-number: QTBUG-16576
Reviewed-by: axis
(cherry picked from commit 99f500838e4eaba9d99c3ea2cd6b4fc5efe0b8b4)

11 years agoRevert "Fix compilation error."
Jason McDonald [Thu, 17 Feb 2011 13:18:09 +0000 (23:18 +1000)]
Revert "Fix compilation error."

Postponing this fix to 4.7.3 as it triggers an internal error in MonGW's
gcc, which breaks the MinGW binary package.

This reverts commit 68979c65de998bae97c2104eaa09b7ad72821b9e.

11 years agoIntroduce new flag for splitview support in Symbian
Sami Merila [Wed, 16 Feb 2011 14:26:00 +0000 (16:26 +0200)]
Introduce new flag for splitview support in Symbian

Introduce new flag for splitview support as internal to Qt 4.7.2.
The actual implementation will be delivered to Qt 4.7.3.

Task-number: QTBUG-16572
Reviewed-by: Janne Koskinen
(cherry picked from commit 899094da212e5bb1c3b9bce03b6c91d60cbdd13f)

11 years agoBump QtWebKit version to 2.0.2
Ademar de Souza Reis Jr [Wed, 16 Feb 2011 20:05:55 +0000 (17:05 -0300)]
Bump QtWebKit version to 2.0.2

QtWebKit 2.0.1 was part of Qt-4.7.1, QtWebKit as included
in 4.7.2 should be 2.0.2.

Merge-request: 1095
Task-number: QTBUG-17480
Reviewed-by: Jason McDonald
(cherry picked from commit dfde84cccb14b109bebd672108a0ce0d6131361f)

11 years agoUpdate .def files for 4.7.2.
Jason McDonald [Thu, 17 Feb 2011 08:24:35 +0000 (18:24 +1000)]
Update .def files for 4.7.2.

11 years agoChange to release license header.
Jason McDonald [Wed, 16 Feb 2011 13:13:50 +0000 (23:13 +1000)]
Change to release license header.

Reviewed-by: Trust Me
11 years agoFix for clipping failure in OpenVG paint engine.
Jani Hautakangas [Thu, 10 Feb 2011 20:28:12 +0000 (22:28 +0200)]
Fix for clipping failure in OpenVG paint engine.

OpenVG implementation for Broadcom chip has limited scissor rect
count to 32. Because of that Qt OpenVG paint engine fails to clip
correctly if clip rect count exceeds 32. This patch makes Qt
OpenVG paint engine to use mask instead of scissors in such cases.

Task-number: QTBUG-16932
Reviewed-by: Jason Barron
(cherry picked from commit 0a84c39a92c4d4d7f2a5e19e949116df24219aa1)

11 years agoDon't leak ScopeChainNode's
Jason McDonald [Wed, 16 Feb 2011 11:58:01 +0000 (21:58 +1000)]
Don't leak ScopeChainNode's

Create a sub-scope of the global scope chain, rather than a completely new scope
chain.  Leaks are difficult to autotest, but an autotest for
QScriptDeclarativeClass::pushCleanContext() was added to ensure its behavior doesn't
regress.  To reproduce the leak (prior to this change) use:

while (true) {
    QScriptDeclarativeClass::pushCleanContext(&engine);
    engine.popContext();
}

Change-Id: I41ac61ea1664da569eb329c8276f2a0bb6d2f1f7
Task-number: QTBUG-17166
Reviewed-by: Martin Jones
(cherry picked from commit 3bc6f8d8dd630cd0298e27fc4b7430d2bf73a232)

Conflicts:

tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp

11 years agoFix for ARMV6 drawhelper blending
Jani Hautakangas [Mon, 14 Feb 2011 21:47:53 +0000 (23:47 +0200)]
Fix for ARMV6 drawhelper blending

Asm code used wrong source register when doing
constant alpha blending.

Task-number: QTBUG-16008
Reviewed-by: TRUSTME
(cherry picked from commit 04ddaa986504e3842920770927cb7247e5e0fb78)

11 years agoWorked around a SC issue in S60 3.x vs 5.0 versions.
axis [Mon, 14 Feb 2011 09:12:21 +0000 (10:12 +0100)]
Worked around a SC issue in S60 3.x vs 5.0 versions.

Task:     QTBUG-16578
RevBy:    Gareth Stockwell
(cherry picked from commit 984bc6626c4f290572ac721fd10edda99691306f)

11 years agoRename 'plugins\qmldebugging' (work around qmake issues)
Kai Koehne [Thu, 10 Feb 2011 13:37:15 +0000 (14:37 +0100)]
Rename 'plugins\qmldebugging' (work around qmake issues)

On Windows, qmake places the tcpserver.dll in a 'plugins\qmlreleaseging'
folder, which broke remote debugging of QtDeclarative completely. New name
'qmltooling' while being not so specific, avoids the use of 'debug' in the folder name.

Task-number: QTBUG-17360
Reviewed-by: Martin Jones
(cherry picked from commit 2855782a45b08aedbed960125514fdd9663ff1c8)

11 years agoQDeclarativeDebug: Remove unused file
Kai Koehne [Tue, 21 Dec 2010 08:12:58 +0000 (09:12 +0100)]
QDeclarativeDebug: Remove unused file

Got added in 5336e1838a95d97.
(cherry picked from commit 111e306c9991a0d89b0001b476e466891974945f)

11 years agoQDeclarativeDebug: Move Tcp server to separate plugin
Kai Koehne [Fri, 26 Nov 2010 15:22:47 +0000 (16:22 +0100)]
QDeclarativeDebug: Move Tcp server to separate plugin

Reviewed-by: Christiaan Janssen
(cherry picked from commit 21016c3b28674029a2a205da38f54e362e3635b9)

11 years agoQDeclarativeDebug: Move networking code out of QDeclarativeDebugServer
Kai Koehne [Wed, 24 Nov 2010 18:50:09 +0000 (19:50 +0100)]
QDeclarativeDebug: Move networking code out of QDeclarativeDebugServer

Move socket handling code out of QDeclarativeDebugServer into a
QDeclarativeDebugServer(Tcp)Connection class.

Reviewed-by: Christiaan Janssen
(cherry picked from commit 5336e1838a95d97d34863b668ff797582c226e79)

11 years agoQDeclarativeDebug: Decouple QDDServer, QDDService classes
Kai Koehne [Thu, 18 Nov 2010 13:54:24 +0000 (14:54 +0100)]
QDeclarativeDebug: Decouple QDDServer, QDDService classes

Move QDeclarativeDebugServer class into it's own files and make the classes
less interdependent.
(cherry picked from commit 5d251ef253065d68967ae3263b3cf7f1d93d7a00)

11 years agoFix declarative autotest compilation on Symbian
Joona Petrell [Tue, 18 Jan 2011 04:16:47 +0000 (14:16 +1000)]
Fix declarative autotest compilation on Symbian

Task-number:
Reviewed-by: Martin Jones
(cherry picked from commit e46c44f9538dbe5b44ce61d3a42403cfa471ae8b)

11 years agoQDeclarativeDebug: Include debugger plugin in qmlviewer.sis
Kai Koehne [Thu, 9 Dec 2010 12:06:08 +0000 (13:06 +0100)]
QDeclarativeDebug: Include debugger plugin in qmlviewer.sis

Developers that want to debug qml on their device have to now install
qmlviewer.sis.

Reviewed-by: Christiaan Janssen
(cherry picked from commit 35ae0b8146bca7a61203ee347654aed27951439c)

11 years agoMake addImportPath() work for windows paths starting with lower case
Bea Lam [Fri, 11 Feb 2011 01:33:37 +0000 (11:33 +1000)]
Make addImportPath() work for windows paths starting with lower case

Was causing assert failure on windows if the 'c:' was lower case,
since it was being added to the import path database with a lower
case and thus later lookups with an upper case 'c:' would fail.
This change fixes the check for whether the path refers to a
local path or not.

Task-number: QTBUG-16885
Change-Id: I0a2a2f705443ed453fb2b13f8599e035c2bd2877
Reviewed-by: Martin Jones
(cherry picked from commit 33512bc223be373975426ffcc6f8fa783a7582c9)

11 years agoUpdate modules-related tests and docs
Bea Lam [Thu, 10 Feb 2011 01:30:47 +0000 (11:30 +1000)]
Update modules-related tests and docs

Added tests for remote imports and fixed/improved examples and
text in the docs.

Change-Id: I8f411a0287c4d50ec3cebe5567d803689cd5b1c7
(cherry picked from commit d7e42d7c5b0eb6513526d0c21025939a467e8d68)

11 years agoAdd test for importing plugins that contain QML files
Jason McDonald [Mon, 14 Feb 2011 13:59:45 +0000 (23:59 +1000)]
Add test for importing plugins that contain QML files

(cherry picked from commit a78f6b1718b8285cb65ae989a070bf8703746b5d)

Conflicts:

tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro

11 years agoFix QFileDialog Symbian native file dialog filename filtering.
Miikka Heikkinen [Thu, 10 Feb 2011 12:39:41 +0000 (14:39 +0200)]
Fix QFileDialog Symbian native file dialog filename filtering.

Now QFileDialog static functions that use Symbian native file dialog
should find the same files as non-native QFileDialog for any given
filename filter.

Task-number: QTBUG-17298
Reviewed-by: Janne Koskinen
(cherry picked from commit 5ec67c969dce335a26c402b73bb19a6751401871)

11 years agoDon't crash when BMP color table is broken
Harald Fernengel [Fri, 4 Feb 2011 12:36:27 +0000 (13:36 +0100)]
Don't crash when BMP color table is broken

If the BMP's number of color table entries is out of bounds, we would
resize our color table vector to a silly value, leading to crashes
later on. If the number of color table entries is larger than 256, just
stop processing the BMP since it's most probably corrupt.

Task-number: QT-4534
Reviewed-by: Robert Griebl
(cherry picked from commit de1cfc13c66fcb35d0a211bb5136ebc25279041a)

11 years agoChange paging attributes for Symbian binaries
Iain [Wed, 9 Feb 2011 17:34:27 +0000 (17:34 +0000)]
Change paging attributes for Symbian binaries

Removed UNPAGED workaround from QtCore and QtSql on OS releases where
data paging is supported.  Depends on new macro being defined in the OS
builds (SYMBIAN_DLL_DATA_EXPORTS_SUPPORTED) to allow us to detect this.
Data exports are supported in all S^3 builds after early 2009, however,
this macro is only added recently (and thus isn't defined in, eg.
Symbian Foundation PDKs (v3.0.4), or current releases (v0.9) of the S^3
SDK from Nokia).  Thus building Qt against these older S^3 builds will
still result in QtCore and QtSql being unpaged.

Also, remove PAGED keyword from all Qt-based software.  This changes the
code paging field in the Symbian (E32Image) header from "paged" to
"default".  Thus it is left to the configuration of the particular
device whether paging is used for the binary or not.  All devices that
support code paging should have it turned on (the value is stored in
the HAL, so can be checked using eg. fshell); data paging may or may
not be turned on depending on the device characteristics.  Leaving both
code and data paging as "default" means that any limitations in the
device (eg. around flash wear) can be controlled by that device by
disabling the appropriate types of paging.

This change also leaves the way open to deprecated PAGED as a keyword
in the Symbian build systems, so you can only opt out of paging.  This
makes more sense, as the default for code paging will be on, the
default for data paging will be on if the device can handle it, and
binaries should only be opting out of paging if they have some specific
real-time requirements that paging inhibits.

Task-number: QT-3503
Task-number: QTBUG-13931
Reviewed-by: Shane Kearns
(cherry picked from commit 34aca9f03e25e94b4ca730ddd3c88aa95653a0b5)

11 years agorebuild configure in 4.7.2
Oswald Buddenhagen [Fri, 11 Feb 2011 11:54:43 +0000 (12:54 +0100)]
rebuild configure in 4.7.2

11 years agoDon't ignore source-text when generating qsTrId translations for QML
Tor Arne Vestbø [Tue, 1 Feb 2011 14:17:53 +0000 (15:17 +0100)]
Don't ignore source-text when generating qsTrId translations for QML

Reviewed-by: ossi
(cherry picked from commit bb84c5ef4f620af659395b66e6ed792a380b9a1f)

11 years agoFix regression in creating mkspecs/default
Miikka Heikkinen [Wed, 9 Feb 2011 12:12:42 +0000 (14:12 +0200)]
Fix regression in creating mkspecs/default

Copy all files from original mkspec to default one and modify
*.conf, *.prf, and  *.h to include their original counterparts.

Task-number: QTBUG-17258
Reviewed-by: Oswald Buddenhagen
(cherry picked from commit b52bf57e46520fb65d3d4c43bdb9c3d972690cb8)

11 years agoPathView regression: dragging the path didn't update currentIndex
Martin Jones [Wed, 9 Feb 2011 04:57:09 +0000 (14:57 +1000)]
PathView regression: dragging the path didn't update currentIndex

Some refectoring while fixing QTBUG-13687 resulted in the private
setOffset() method being called rather than the public.  The
public version was responsible for updating currentIndex.

Change-Id: Iac9c7a19d6fa64550b9498e77b8983512e199370
Task-number: QTBUG-17319
Reviewed-by: Michael Brasser
(cherry picked from commit eb1db74fb59ecb40d541644ce31ce7ec7b2620d2)

11 years agoRemove dependencies to pre-Symbian3 platforms from Symbian3 packages
Miikka Heikkinen [Thu, 3 Feb 2011 13:33:41 +0000 (15:33 +0200)]
Remove dependencies to pre-Symbian3 platforms from Symbian3 packages

Qt applications built against Symbian3 SDK will not run on older
devices, so remove the platform dependency to those devices so that
the user will get a proper warning if he tries to install incompatible
software to an older device.

Task-number: QTBUG-17187
Reviewed-by: Janne Koskinen
(cherry picked from commit 822151edc065dc89ed331e91e02fb8014ef3ecee)

11 years agoDoc: Adding documentation on configure options for Qt configure
Morten Engvoldsen [Mon, 7 Feb 2011 10:26:57 +0000 (11:26 +0100)]
Doc: Adding documentation on configure options for Qt configure
(cherry picked from commit 776a00b3e8a29552a5db65fb539c0802654bfdff)

11 years agoFix build failure
Gareth Stockwell [Wed, 9 Feb 2011 15:00:26 +0000 (15:00 +0000)]
Fix build failure

Task-number: QTBUG-17288
Reviewed-by: trustme
(cherry picked from commit bf47aa67e286f31db5a8b84060f278f7fea217b2)

11 years agoRecreate Symbian raster backing store when WA_TranslucentBackground set
Gareth Stockwell [Wed, 9 Feb 2011 09:45:09 +0000 (09:45 +0000)]
Recreate Symbian raster backing store when WA_TranslucentBackground set

Task-number: QTBUG-17288
Reviewed-by: Jani Hautakangas
(cherry picked from commit ca663a7252637f8066a0e7368650e72094220b69)

11 years agoFix few QFileDialog static method issues in Symbian^3
Miikka Heikkinen [Wed, 2 Feb 2011 11:40:59 +0000 (13:40 +0200)]
Fix few QFileDialog static method issues in Symbian^3

- The selected file path now uses slashes instead of Symbian native
  backslashes as directory separator.

- If default file is specified in dir parameter of getSaveFileName in
  addition to directory, that will be used as default suggested
  filename.

- Clarified documentation a bit.

Task-number: QTBUG-17135
Reviewed-by: Janne Koskinen
(cherry picked from commit 5b89e67619d15e817a81c8f39072a210c7cd5f4c)

11 years agoFixed a bug where the softkeys would leave a see-through "hole".
axis [Thu, 3 Feb 2011 14:45:00 +0000 (15:45 +0100)]
Fixed a bug where the softkeys would leave a see-through "hole".

In cases where the widget was created from the event loop instead of
main(), the middle three softkeys would not get the right visibility
and would leave a "hole" in the application where one could see what
was beneath it. It could also be clicked, which would bring the app
to the background which was really annoying.

Fixed by setting the visibility manually upon creation. It should
still be possible to alter the visibility of the toolbar manually
after the widget creation, if someone requires that.

Task:     QTBUG-16578
RevBy:    Gareth Stockwell
AutoTest: N/A, but tested with various combinations of fullscreen,
          non-fullscreen and softkey visibility modes. No
          regressions.
(cherry picked from commit 231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c)

11 years agoFix native child window Symbian decoration handling.
Jani Hautakangas [Sun, 6 Feb 2011 21:48:39 +0000 (23:48 +0200)]
Fix native child window Symbian decoration handling.

Resizing native child window like QVideoWidget caused
S60 cba and status pane to appear.

Task-number: QTBUG-17040
Reviewed-by: Gareth Stockwell
(cherry picked from commit 9ae73fcd011e26c920f91cf0b609f051c14920a8)

11 years agoFixed compilerwarnings regression in public headers.
axis [Tue, 8 Feb 2011 09:50:48 +0000 (10:50 +0100)]
Fixed compilerwarnings regression in public headers.

RevBy:    Trust me
(cherry picked from commit 50e7bea8bb4ce5a97ab8ff9c7062fc0fa092aec0)

11 years agoFix duplicate definition error
Shane Kearns [Mon, 7 Feb 2011 15:51:05 +0000 (15:51 +0000)]
Fix duplicate definition error

As the metatype declaration is now in the qnetworksession header file,
it is not needed in the test code (and causes compile error on some platforms)

Reviewed-By: Markus Goetz
(cherry picked from commit d0d0763f6e0c7709208ad1c573266ee527f6e4ff)

11 years agoFix namespace error
Shane Kearns [Mon, 7 Feb 2011 10:06:36 +0000 (10:06 +0000)]
Fix namespace error

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

11 years agoFix random crashes when bearer suddenly goes down
Shane Kearns [Thu, 3 Feb 2011 12:16:35 +0000 (12:16 +0000)]
Fix random crashes when bearer suddenly goes down

1. QNetworkSession being deleted from the closed signal caused data
   abort or E32User-CBase 49 panics. (both observed)
2. Potential E32User-CBase 46 panic in
   ConnectionProgressNotifier::StartNotifications()

Reviewed-by: Aaron Tunney
Reviewed-By: Markus Goetz
Task-Number: QTBUG-17196
(cherry picked from commit 8fe811e14b6db6a9637a5bf6d276613786291762)

11 years agoDon't crash when creating backtrace for built-in JS function (2nd try)
Kent Hansen [Mon, 7 Feb 2011 13:53:59 +0000 (14:53 +0100)]
Don't crash when creating backtrace for built-in JS function (2nd try)

Commit 147df10403ba280b3f04c1e3d6c4b1cf386abe5d did not quite
fix the issue; other places need the same checks.

When the JIT is enabled, frames for built-in JS host calls
(such as Array.prototype.forEach) are not fully initialized.
In particular, the CodeBlock register of such frames is not
set (see comment in JITCall.cpp).

We need to check if the codeBlock is actually valid before we
start using it.

This fixes the crash(es) but not the problem of actually getting
the arguments for such frames through the API. There's also a
related problem when a QtScript function (newFunction()) is called
as a callback of a built-in JS host function (QTBUG-17287).
These problems will go away once JavaScriptCore is updated to a
more recent version (4.8 at the earliest), since the
native-vs-script frame handling has been unified.

Task-number: QTBUG-17137
Reviewed-by: Olivier Goffart
(cherry picked from commit 640436345645b6cf6ff3334399f33c9d1c089492)

11 years agoDon't crash when creating backtrace for built-in JS function
Kent Hansen [Thu, 3 Feb 2011 11:28:27 +0000 (12:28 +0100)]
Don't crash when creating backtrace for built-in JS function

When the JIT is enabled, NativeFunctionWrapper (used for
built-in functions such as Array.prototype.forEach) inherits
JSFunction, so we must check whether the function is
actually a JS (script) function before we start accessing
script-specific properties.

Task-number: QTBUG-17137
Reviewed-by: Olivier Goffart
(cherry picked from commit 147df10403ba280b3f04c1e3d6c4b1cf386abe5d)

11 years agoSupport seperate versions of installed modules
mae [Tue, 8 Feb 2011 11:33:03 +0000 (12:33 +0100)]
Support seperate versions of installed modules

QML supports versioned types in modules. There's a version major and a
version minor.

This makes it possible to have a module com.organisation.fancycomponents
with version 1.0, and later you could ship a new module
com.organisation.fancycomponents which contains a more recent version 1.1
or 2.0 AND also the old versions to keep old code running.

This is good.

The problem is that this is difficult with certain QA procedures. It's
hard to verify that a new module is indeed 100% compatible with the
previous versions.

The change extends the import mechanism by adding optional versioning to
the component patch.

With the patch, you can add a new module
com.organisation.fancycomponents.2.0 which will be loaded when the
QML file specifies "import com.organisation.fancycomponents 2.0".

The patch works as follows: if you try to load
com.organisation.fancycomponents in version 2.0, the engine first
looks for com/organisation/fancycomponents.2.0, then for
com/organisation/fancycomponents.2 then for
com.organisation/fancycomponents.

Reviewed-by: Aaron Kennedy
Task-number: QTBUG-16455
(cherry picked from commit dd49b322b327fe87d8420abcce0e6cee877a88d7)

11 years agoQSqlTableModel/QSqlQueryModel and insertColumns problem.
Michael Goddard [Tue, 2 Nov 2010 02:14:03 +0000 (12:14 +1000)]
QSqlTableModel/QSqlQueryModel and insertColumns problem.

After inserting a column, fetching data through QSqlTableModel was
off by one or more, since it passed the indexInQuery through to
QSQM.  Also, the headerData would sometimes return a blank string
for an inserted column, and sometimes the column number.

The autotests have been beefed up a little to check insertRows and
insertColumns play nicely.

Change-Id: I7399d4c4d94f958884b67ab9b39b5cf2485d8416
Task-number: QTBUG-12626
Reviewed-by: Charles Yin
(cherry picked from commit 9c61e9a40e774fe32b16c133a5cdd6b9d9d29d83)

11 years agoFix some removeRows issues with QSqlTableModel.
Michael Goddard [Wed, 17 Nov 2010 07:30:40 +0000 (17:30 +1000)]
Fix some removeRows issues with QSqlTableModel.

Added some better unit testing around the problem areas.

Change-Id: Ie4749da298aebbae6aec9558ebe8c8f2196c705f
Task-number: QTBUG-14916
Reviewed-by: Charles Yin
(cherry picked from commit bdd4a9149789f60974603e1f7621d51378f0a108)

11 years agoNamespace compilation - OCI typedefs should be outside Qt namespace.
Michael Goddard [Thu, 3 Feb 2011 02:33:27 +0000 (12:33 +1000)]
Namespace compilation - OCI typedefs should be outside Qt namespace.

psql, sqlite2 drivers already do this correctly.

Change-Id: I1f02401432d5c39fa1572e2f6255941b8a67e591
Task-number: QTBUG-17076
Reviewed-by: Charles Yin
(cherry picked from commit 47a134b9a9136dc961dc5dd07e345aeb94b2d401)

11 years agoUpdate some documentation about what happens with select()/setQuery().
Michael Goddard [Wed, 3 Nov 2010 05:45:43 +0000 (15:45 +1000)]
Update some documentation about what happens with select()/setQuery().

Change-Id: I5f1afada766d40273526f2cd7537ad68d5f9d09a
Task-number: QTBUG-12094
Reviewed-by: Charles Yin
(cherry picked from commit 741a5114c2c6bf4d89068d861db90c456cce371b)

11 years agoMention the requirement for OCI when building the SQL oracle driver.
Michael Goddard [Thu, 4 Nov 2010 06:34:02 +0000 (16:34 +1000)]
Mention the requirement for OCI when building the SQL oracle driver.

As suggested by Jean-Louis Mounier.

Change-Id: I2284d00453ddcb981fe3e1b710d4453323fe1e9e
Task-number: QTBUG-8875
Reviewed-by: Charles Yin
(cherry picked from commit 594e46bdd36d2964c20cbc5a8de32abd5e343f43)

11 years agoTry to document that invalid database arguments use the default database.
Michael Goddard [Thu, 4 Nov 2010 05:47:51 +0000 (15:47 +1000)]
Try to document that invalid database arguments use the default database.

Some places documented this, some didn't.

Change-Id: Id66678dbcd9af6ec9687db745ba6f5506e951d1d
Task-number: QTBUG-3240
Reviewed-by: Charles Yin
(cherry picked from commit d300e8208928084b62bbde01fb81bd66bc967bc8)

11 years agoMake sure that setRecord emits dataChanged() with OnManualSubmit.
Michael Goddard [Wed, 3 Nov 2010 01:58:36 +0000 (11:58 +1000)]
Make sure that setRecord emits dataChanged() with OnManualSubmit.

Since the change is immediately visible through data(), this is needed
so that QSortFilterProxyModel etc work correctly.

Change-Id: Ied7afce2e6a1f516b502d3501f9d214df54e52f2
Task-number: QTBUG-14831
Reviewed-by: Charles Yin
(cherry picked from commit 3bed865c35d8eb920ba5a68276fdf1690c834a64)

11 years agoFix qt.sis platform dependencies for Symbian^3 builds.
Miikka Heikkinen [Wed, 2 Feb 2011 13:58:14 +0000 (15:58 +0200)]
Fix qt.sis platform dependencies for Symbian^3 builds.

Symbian^3 build of qt.sis is not compatible with pre-Symbian^3
devices, so remove the platform dependencies to said devices.

Task-number: QTBUG-17150
Reviewed-by: Janne Koskinen
(cherry picked from commit cf2f23225414893a7b061fadbde4739165f0c554)

11 years agoFix QMutex can deadlock when calling tryLock
Olivier Goffart [Wed, 2 Feb 2011 10:31:20 +0000 (11:31 +0100)]
Fix QMutex can deadlock when calling tryLock

in the unix code, if the QMutexPrivate::wait() with a timeout
expires in the same moment that the mutex is released,  wakeup
would be set, but would be then ignored. (reset to false
quickly after)

If we waken up between the timeout and the re-aquisition of
the internal mutex, we consider that the mutex has been locked.

Reviewed-by: brad
Task-number: QTBUG-16115
(cherry picked from commit 7987d4cfd3ce86c20a55b5661a5221f12246b27e)

11 years agoFix potential networking crash due to null-pointer dereference
Simon Hausmann [Fri, 28 Jan 2011 11:23:08 +0000 (12:23 +0100)]
Fix potential networking crash due to null-pointer dereference

An internal bug report suggests that we unconditionally dereference the backend
pointer in QNetworkReplyImpl when checking for the synchronity of the
originating request. The dereferencing code was introduced in commit
ad1e82323225e996720136e8b2d669166b8d8441. Unfortunately the report does not
detail where/how the crash happened, but it appears plausible that the backend
pointer became null, and the surrounding code that has extra checks suggests
this, too. In an attempt of defensive programming this patch introduces
the missing check in the reported line 112 as well as in other places
where it seems appropriate.

Reviewed-by: Peter Hartmann
(cherry picked from commit bdf3782b40b0fc2ebfda960be08c90b549cfd970)

11 years agoInvalidate QScriptPrograms when engine is destroyed
Kent Hansen [Fri, 28 Jan 2011 09:10:31 +0000 (10:10 +0100)]
Invalidate QScriptPrograms when engine is destroyed

If the engine is destroyed before the program, the program
must be invalidated; otherwise the program destructor will
access a stale engine pointer, which can cause a crash
(it crashes on Symbian, but "only" gives a Valgrind warning
on Linux for our autotests).

We need to keep track of all associated programs, just like
we already do for values and strings. This fix follows the
exact same pattern, but uses a QSet to keep the patch minimal.

No new tests, but the evaluateProgram() test runs successfully
on Symbian now, and there are no more Valgrind warnings.

Task-number: QTBUG-16987
Reviewed-by: Olivier Goffart
(cherry picked from commit b127b1036ec75c625920a6c029b64a95e3702bf9)

11 years agoNo longer replace dash and dot in TARGET with underscore in Symbian
Miikka Heikkinen [Thu, 27 Jan 2011 10:40:33 +0000 (12:40 +0200)]
No longer replace dash and dot in TARGET with underscore in Symbian

There is no fundamental reason to not have dash or dot in binary names
in Symbian, so do not replace them with underscore.

One thing that doesn't work with a dot in the filename is launching
an application via resources, so automatic resource generation is
suppressed for applications that have a dot in filename portion of
the TARGET value.

Task-number: QTBUG-16888
Reviewed-by: axis
(cherry picked from commit 4ec245a3e75470186557d00b2383af3872a720b0)

11 years agoFix alignment issue causing crash in QtScript/JavaScriptCore
Kent Hansen [Thu, 27 Jan 2011 15:29:52 +0000 (16:29 +0100)]
Fix alignment issue causing crash in QtScript/JavaScriptCore

When creating a substring, JSC::UStringImpl required that the
base string pointer was 8-byte aligned. However, on platforms
where FastMalloc isn't enabled (such as Symbian), it's possible
that the system malloc() returns a pointer that is only 4-byte
aligned. (On Symbian, this can happen if the argument to malloc()
itself isn't a multiple of 8.)

Cherry-picked http://trac.webkit.org/changeset/54743 from WebKit
trunk, which fixes this issue. (The commit happened shortly after
we rebased QtScript/JSC for 4.7, so it applies cleanly to our copy.)

Task-number: QTBUG-16828
Reviewed-by: Simon Hausmann
(cherry picked from commit ead20f4c1edc2e1c5c39f47bf7c9e56600d6362b)

11 years agoOrientation control implementation for Symbian
mread [Tue, 25 Jan 2011 14:29:41 +0000 (14:29 +0000)]
Orientation control implementation for Symbian

This used the orientation control QWidget attributes API from
maemo5, and provides a simple implementation for Symbian.

The essense of the implementation is that the latest setting
of one of these QWidget orientation attributes will set the
orientation for the whole app. Testing the attributes will return
only the last attribute set, it will not return the app orientation
state.

A new task, QTBUG-16972, has been created to provide a more
comprehensive implementation in the future. This may provide a more
effective emulation of the maemo5 behaviour, or may incorporate
further reaching concepts for QML rotations.

Task-number: QTBUG-11785
Reviewed-by: Shane Kearns
(cherry picked from commit e0489b905d6a31c7a904ca2b62a1e60cd12dba4f)

11 years agoApplication background is incorrect if app locked to landscape.
Sami Merila [Wed, 26 Jan 2011 07:05:19 +0000 (09:05 +0200)]
Application background is incorrect if app locked to landscape.

If application orientation has been locked to landscape and application
is started out while device orientation is portrait, QS60Style draws
the QPalette::background like device would be in landscape. Style
is incorrectly following device orientation, when it should follow
application orientation.

As a fix, style follows now application orientation. As a bonus,
unnecessary fullscreen QPixmap creation is avoided when rotating the
device.

Task-number: QTBUG-16816
Reviewed-by: Jani Hautakangas
(cherry picked from commit 54313b3ba81c276cf06c40c2420b1ff1f30e64c3)

11 years agoadd autotest for digest authentication
Peter Hartmann [Mon, 24 Jan 2011 13:22:57 +0000 (14:22 +0100)]
add autotest for digest authentication

Reviewed-by: Markus Goetz
Task-number: QTBUG-15070
(cherry picked from commit c6a6448272168f0105c973bef5e531114533fc90)

11 years agoTemporary fix for ambiguous cast from four letter char constant
Eckhart Koppen [Tue, 25 Jan 2011 13:11:33 +0000 (15:11 +0200)]
Temporary fix for ambiguous cast from four letter char constant
(cherry picked from commit cb38007cd3b253fb2e3a8587ae9e64080e707a31)

11 years agoFix QMAKE_POST_LINK in Symbian for targets with special characters.
Miikka Heikkinen [Tue, 25 Jan 2011 11:49:46 +0000 (13:49 +0200)]
Fix QMAKE_POST_LINK in Symbian for targets with special characters.

Proper fixed targets was not used to generate the dependency for
QMAKE_POST_LINK in symbian-sbsv2, causing post linking to happen
before actual linking.

Task-number: QTBUG-16881
Reviewed-by: axis
(cherry picked from commit 41297f2d592ef21327b5c7523c52c1ecd3c727f4)

11 years agoImproved QMAKE_POST_LINK support in symbian-sbsv2
Miikka Heikkinen [Thu, 20 Jan 2011 11:58:58 +0000 (13:58 +0200)]
Improved QMAKE_POST_LINK support in symbian-sbsv2

QMAKE_POST_LINK value handling now uses the same automatic replacements
as QMAKE_EXTRA_COMPILERS and QMAKE_EXTRA_TARGETS handling.
In practice this means that it is now possible to use $$QMAKE_COPY and
friends in QMAKE_POST_LINK value also with symbian-sbsv2 mkspec, and
that any backslashes in the value are assumed to be path separators and
will be converted to forward slashes.

Task-number: QTBUG-16753
Reviewed-by: Janne Koskinen
(cherry picked from commit 9fec1802952457178a9b31c55b4c6e3ea60fcb80)

11 years agoQtScript/JSC on Symbian: Enhanced memory allocator for Collector heap
Kent Hansen [Tue, 25 Jan 2011 16:06:16 +0000 (17:06 +0100)]
QtScript/JSC on Symbian: Enhanced memory allocator for Collector heap

Cherry-picked from http://trac.webkit.org/changeset/56370

The old allocator caused QML to crash in MCL (TB10.1, week 1).

Task-number: QTBUG-14293
Reviewed-by: Simon Hausmann
(cherry picked from commit 86a864f906d7dcda1b1ab04d1e25e7020a53be64)

11 years agoFix cursor position adjustment when removing strings
Jiang Jiang [Mon, 24 Jan 2011 18:09:38 +0000 (19:09 +0100)]
Fix cursor position adjustment when removing strings

Commit 0ba1b4d0 introduced a regression to QTextDocument: it postponed
cursor position adjustment until the move operation is done, but
contentsChanged will be triggered by finishEdit() in this move
operation, thus cursor positions in this signal handler will be in
inconsistent states (normally we should first update cursor position
then trigger contentsChanged). In this case we should also postpone
finishEdit() handling after cursor positions have been adjusted, then
the states expose to applications will be consistent.

Task-number: QTBUG-15857
Reviewed-by: Eskil
(cherry picked from commit 34c297faca93e1286573b2a01127e4e7af00aff2)

11 years agoFix loop count in animanted gifs sometimes being incorrect
Simon Hausmann [Mon, 24 Jan 2011 12:06:29 +0000 (13:06 +0100)]
Fix loop count in animanted gifs sometimes being incorrect

Applied patch supplied in QT-4426, which also completes
https://bugs.webkit.org/show_bug.cgi?id=36818

Task-number: QT-4426
Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com>
(cherry picked from commit 14e7c8bf3982d05f6fc5c744ebbad791db6ab191)

11 years agoFixed UTF-8 application names in device application menu in Symbian
Miikka Heikkinen [Mon, 24 Jan 2011 10:35:12 +0000 (12:35 +0200)]
Fixed UTF-8 application names in device application menu in Symbian

CHARACTER_SET UTF8 statement was missing from generated .rss file,
causing localized application names containing UTF-8 characters
to be rendered incorrectly.

Task-number: QT-4476
Reviewed-by: axis
(cherry picked from commit 7a5960b2991e9ac33bec0bb359ba825d0c4889af)

11 years agoHTTP: fix digest authentication
Peter Hartmann [Mon, 24 Jan 2011 13:21:18 +0000 (14:21 +0100)]
HTTP: fix digest authentication

no need to extract the realm from the user; with digest authentication
the realm is an attribute of its own.

Reviewed-by: Markus Goetz
Task-number: QTBUG-15070
(cherry picked from commit 1137379e98cab8cc67fac70b31c97001c4473eb0)

11 years agoAvoid possible font name collisions on fbserv
Alessandro Portale [Mon, 24 Jan 2011 20:43:03 +0000 (21:43 +0100)]
Avoid possible font name collisions on fbserv

QTBUG-6611 implemented the long awaited app font support on Symbian. One
of the problems with the underlying Symbian Api for font loading is that
all fonts go into one system wide font store on fbserv. All fonts are
visible to and accessible by every application. And there is no way to
find out if a font is an app font and whose process' app font it is. If
a font with a certain family name is already loaded on fbserv, no other
application can load its font with the same family name. If two
applications access the same font, bad things can happen (details:
QTBUG-16514).

This patch works around naming collisions on the fbserv. It also
prevents Qt applications from using other Qt applications' app fonts. It
does so by "marking" the name of the temporary ttf file before the file
gets loaded by fbserv. All font name strings in the font's 'name' table
get a marker string appended. The marker is composed by a "Q", the uid3,
and on Symbian^3|PR1&below the pid. The marker length is four characters.
When the QFontDatabase is populated, all own app font names are cleand
from the marker, so that the Qt app can use the original font name. Other
applications' app fonts are detected and filtered out of the own font
database.

Symbian's font Api supports only 24 characters as names for font
families. The name marker reduces the effective characters to 20. The
reduced name length is documented for
QFontDatabase::addApplication[FontFromData] as a note.

Since the app font feature is much safer now, it got re-enabled for
Symbian^1 and below by reverting
25ac59fcf1bb03c9af9a2c967218c96c7c77361a .

Task-number: QTBUG-16514
(cherry picked from commit cfb7c16d738993fc8a594361f4bdf10e24fa754a)

11 years agoFix crash in QtScript/JSC stack allocator on Symbian
Kent Hansen [Mon, 24 Jan 2011 14:32:11 +0000 (15:32 +0100)]
Fix crash in QtScript/JSC stack allocator on Symbian

The reserved (virtual) size of the chunk is not necessarily a
multiple of the "pool" size (the physical growth increment).
The reserved size is only rounded up to a multiple of the page
size (4K), not the pool size (64K).

This meant that the commit of the _last_ part of the chunk could
(and did) fail, because we tried to commit 64K while only a size
<64K was remaining.

Detect this case and reduce the requested size accordingly.
Also add a call to CRASH() in case Commit() returns an error,
to avoid obscure crashes in JSC at a later point (grow() must
not fail).

Task-number: QTBUG-16685
Reviewed-by: Simon Hausmann
(cherry picked from commit 81941e4c5dcd18ef04b2b22dd3f1b4c04620647c)

11 years agopositionViewAtIndex can fail when positioned near end of list.
Martin Jones [Fri, 21 Jan 2011 05:03:35 +0000 (15:03 +1000)]
positionViewAtIndex can fail when positioned near end of list.

We positioned the view beyond the bounds, which in some cases resulted
in only one item being created.  Combined with a bug in the bounds
fixup very many items were created.

Task-number: QT-4441
Reviewed-by: Michael Brasser
(cherry picked from commit c3dd455b03a6c03011e2446f69fc262230e91639)

11 years agoBorderImage fails for .sci source containing a URL
Martin Jones [Fri, 21 Jan 2011 05:38:15 +0000 (15:38 +1000)]
BorderImage fails for .sci source containing a URL

Task-number: QTBUG-16769
Reviewed-by: Bea Lam
(cherry picked from commit 7ddec9f3179bfd854ae53e23ab292de1f9a26377)

11 years agoFix memory leak
Aaron Kennedy [Fri, 14 Jan 2011 00:57:21 +0000 (10:57 +1000)]
Fix memory leak

Task-number: QTBUG-16526
(cherry picked from commit 4f9c026a02c2ecf0d19e7aee4ecae82e64cbaee8)

11 years agoRequest font sizes with only 0.5pt resolution.
Martin Jones [Tue, 18 Jan 2011 00:59:34 +0000 (10:59 +1000)]
Request font sizes with only 0.5pt resolution.

When animating pointSize avoid generating a huge number of fonts with
slightly different point sizes.

Task-number: QTBUG-13960
Reviewed-by: Aaron Kennedy
(cherry picked from commit f111e97adf93a933351eb5658b33a5820097757a)

11 years agoRevert "Fix loaded() signal to be emitted only once"
Bea Lam [Fri, 21 Jan 2011 01:39:28 +0000 (11:39 +1000)]
Revert "Fix loaded() signal to be emitted only once"

This reverts commit 82ff3f484c7ec49e60b7fddf23794937974a6768.

QTBUG-16796 reports that this commit is causing regressions
relating to initial sizing of items.

Task-number: QTBUG-16796
(cherry picked from commit 8c3086aa36b51a9731fce8eb8146b33ab8196aed)

11 years agoBuild failure fix (related to QT-4079)
Sami Merila [Mon, 10 Jan 2011 09:32:15 +0000 (11:32 +0200)]
Build failure fix (related to QT-4079)

Change d281cea3a445aa244901decceffd7d653ed829c8 caused build failure,
due to missing comma (one line missing from commit).

Fixed by adding the missing change.

Task-number: QT-4079
Reviewed-by: Miikka Heikkinen
(cherry picked from commit 19b6e2b944a0d1eeef0fb707a00f567e4ee870e6)

11 years agoQWidgets support for VGA screen
Sami Merila [Mon, 10 Jan 2011 08:36:41 +0000 (10:36 +0200)]
QWidgets support for VGA screen

Add pixelmetrics data for QS60Style to support VGA screensizes.

Task-number: QT-4079
Reviewed-by: Miikka Heikkinen
(cherry picked from commit d281cea3a445aa244901decceffd7d653ed829c8)

11 years agoSwitch default Phonon backend on Symbian from Helix to MMF
Gareth Stockwell [Wed, 19 Jan 2011 18:31:38 +0000 (18:31 +0000)]
Switch default Phonon backend on Symbian from Helix to MMF

If both plugins are present on a device, the MMF backend is now
loaded by default.

Task-number: QT-4472
Reviewed-by: Justin McPherson
(cherry picked from commit 808de6fd2f9835c28986b86de829579196b6163d)

11 years agoTextEdit implicit size varied depending upon wrapMode.
Martin Jones [Wed, 19 Jan 2011 01:25:22 +0000 (11:25 +1000)]
TextEdit implicit size varied depending upon wrapMode.

We failed to reset textWidth before calculating the ideal width of
the text.

Task-number: QTBUG-16710
Reviewed-by: Michael Brasser
(cherry picked from commit b481399c1c02a945e816f9385070883a0d795455)

11 years agoFix compilation error.
Jason McDonald [Wed, 19 Jan 2011 14:39:44 +0000 (00:39 +1000)]
Fix compilation error.

Protect #include of feature-specific header in #ifdef.

Task-number: QTBUG-16652
Reviewed-by: Trust Me
Acked-by: Jani Hautakangas
(cherry picked from commit a2ebd9e3f84fb8fcd2be45e91a7c71f146961e23)

11 years agoDo not load aplication fonts on Symbian^1 and below
Alessandro Portale [Wed, 19 Jan 2011 17:49:34 +0000 (18:49 +0100)]
Do not load aplication fonts on Symbian^1 and below

read http://bugreports.qt.nokia.com/browse/QTBUG-16514 for
a recipy to reboot the phone just by handling with fonts.

Symbian^1 is vulnerable, and Symbain^3 prevents a phone reboot.
Therefore, I prefer to disable the app font feature for
Symbian^1, until QTBUG-16514 us properly handled.

Task-Number: QTBUG-16514
(cherry picked from commit 25ac59fcf1bb03c9af9a2c967218c96c7c77361a)

11 years agoSupporting Qt application fonts on Symbian
Alessandro Portale [Wed, 19 Jan 2011 12:16:13 +0000 (13:16 +0100)]
Supporting Qt application fonts on Symbian

This patch finally implements the missing application font support on
Symbian. QFontDatabase's addApplicationFont[FromData],
applicationFontFamilies and removeApplicationFont are now functional and
allow an application to load, use and unload fonts at run-time.

The underlying Symbian API comes with some restrictions/specialties.
Most of them are worked around in this patch, the missing ones are left
as part of QTBUG-16514:

- The font file must be a file, not a memory buffer. Web fonts and qrc
fonts come as memory buffers. These buffers are saved to a temporary
.ttf file and the file is loaded by the underlying Symbian API. The
temporary file can only be deleted after the font is unloaded.

- The font file must be in a public location in order to be loadable by
Symbian. It can for example not reside in the private application
directory. Therefore, all application fonts (also those that are on the
file system) become a temporary .ttf file in c:\temp\.

- Symbian3/PR2 will come with a font table API which provides direct
access to font tables. Symbian3/PR1 and below are missing this API,
therefore, an own TFontStore is (ab)used to read font tables out of a
font. This patch is considering both code paths in several occasions,
making the Qt Symbian font implementation significantly less
maintainable.

- The fonts are loaded into Symbian's central font server. Loaded fonts
from different processes can have colliding font typeface names (not
file names) on that server. The server does not separate loaded fonts by
their origin processes. Working around such collisions is part of
QTBUG-16514.

The number of fonts loadable at the same time by a Qt application is
limited to the random value 5. Just to prevent abuse of the font
server's memory.

As usual, this patch was looked at by colleagues, and it was adjusted
according to the feedback. But since the bus factor for the
interaction of Qt's and Symbian's font systems is 1, I reviewed this
patch, myself.

Task-Number: QTBUG-6611
Autotest: tst_QFontDatabase::addAppFont
(cherry picked from commit 770fb729929764a1f1c5fbd3d54714cf811c81e0)

11 years agoFix a bug that got revealed by 604c51f1fc5c79b7fad12cda911b06b9e6e5005f
Jan-Arve Sæther [Fri, 17 Dec 2010 13:41:43 +0000 (14:41 +0100)]
Fix a bug that got revealed by 604c51f1fc5c79b7fad12cda911b06b9e6e5005f

The bug has been around for a while, but change 604c51f1fc5c7 made it
emerge.
The problem was that stretches were combined by always *maxing* them.
The values of 'stretch' can be interpreted as this:

-1: (the default) it means that the items should be stretched with
    the stretch factor dervived from the size hints. (In practice this
    means that they are distributed fairly).
 0: Means that the item should not be stretched
>0: Means that the item should be stretch with that number as a factor.

This meant that combining one item with a fixed size(0) and another
item with a default stretch (-1) the combined row stretch would end
up being fixed.

This also fixes how stretches are combined for spanning items too.

Task-number: QTBUG-13551
Reviewed-by: John Tapsell
(cherry picked from commit 7fbf1829e11504eca6a55f1e5dbddf2f658b5302)

11 years agoFix header not found build error
Shane Kearns [Mon, 17 Jan 2011 12:44:06 +0000 (12:44 +0000)]
Fix header not found build error

Task-Number: QT-4378
(cherry picked from commit 1de7a573c1f407d5126cf6ee1e25b4f92cbdda3c)

11 years agoWorkaround crash when multiple QNetworkAccessManager instances are used
Shane Kearns [Wed, 5 Jan 2011 11:07:56 +0000 (11:07 +0000)]
Workaround crash when multiple QNetworkAccessManager instances are used

Instead of each QNetworkAccessManager owning a QNetworkSession, they now
share a QNetworkSession if they have the same QNetworkConfiguration.
QNetworkAccessManager now uses passive roaming instead of application
level roaming. The state change signal (entering connected state) is used
to indicate reconnection instead of being triggered when sending an ALR
accept().
This preserves the previous behaviour, as QNAM always accepted the
suggested access point from bearer mobility.
In the case of multithreaded applications, one QNetworkSession will be
created for each thread which uses QNetworkAccessManager, as QNetworkSession
is not thread safe.

Task-number: QT-4378
Reviewed-by: Markus Goetz
Reviewed-by: juhvu
(cherry picked from commit ec4b73992eb7fb7254bb7a1524b8691ef2123b9f)

11 years agoFix to data detaching in OpenVG pixmap data
Jani Hautakangas [Tue, 18 Jan 2011 08:59:34 +0000 (10:59 +0200)]
Fix to data detaching in OpenVG pixmap data

QImage::converToFormat(format) won't detach QImage if
format stays the same. Because of this, internal QImage
buffer of QVGPixmapData was not deep copied. Drawing
to QPixmap target modified the original QImage that was
used to create QPixmap and in some cases crashed because
paint engine referred to wrong target.

Task-number: QT-4407
Reviewed-by: Jason Barron
(cherry picked from commit b928bab9dde43cf3acace6dfae0ae6a4f6649650)

11 years agoRemove toolcheck from generic clean targets for symbian-sbsv2
Miikka Heikkinen [Tue, 18 Jan 2011 09:44:29 +0000 (11:44 +0200)]
Remove toolcheck from generic clean targets for symbian-sbsv2

Toolcheck can cause generic clean fail (i.e. "make clean" or
"make debug-clean") for e.g. environments where Carbide command
line tools have not been installed, because sbsv2 toolchain does a
check for all tools related to target platforms, even though they are
not needed for actual cleaning.

Task-number: QTBUG-16691
Reviewed-by: Janne Koskinen
(cherry picked from commit c756d5cffdc31228b9ab9388c307bf4eb705b923)

11 years agoDon't crash Qt Creator when debugging an object alias
Aaron Kennedy [Thu, 13 Jan 2011 04:40:31 +0000 (14:40 +1000)]
Don't crash Qt Creator when debugging an object alias

Task-number: QTBUG-16131
(cherry picked from commit 3526db3b8832c357b368014e6c8ebab63d4071da)

11 years agoQTBUG-16110 updating the softkeys when app comes to foreground
mread [Mon, 17 Jan 2011 10:52:14 +0000 (10:52 +0000)]
QTBUG-16110 updating the softkeys when app comes to foreground

When an app is in the background and creates a window with softkeys,
the softkeys are not updated when the app comes to the foreground, so
they look faded. This change updates the softkeys when the app comes
to the forground.

Task-number: QTBUG-16110
Reviewed-by: Jason Barron
(cherry picked from commit 37faa3ba7c66d14e1ecbf75e93d9f0d27fa57a76)

11 years agoFix one character displacement for cursor in line edits
Miikka Heikkinen [Mon, 17 Jan 2011 13:44:44 +0000 (15:44 +0200)]
Fix one character displacement for cursor in line edits

The variable m_inlinePosition was not updated when m_preeditString
was cleared in QCoeFepInputContext. This resulted in cursor displaying
up one character beyond where it logically should have been when
using HW Qwerty keyboard on E7 and similar devices.

Task-number: QTBUG-16238
Reviewed-by: axis
(cherry picked from commit 81351f2c6f9a939e4c34cb3be6280d396c21941f)

11 years agoFix double click event on Mac OS X.
Fabien Freling [Thu, 9 Dec 2010 12:55:32 +0000 (13:55 +0100)]
Fix double click event on Mac OS X.

Fix an issue where the double click would be
triggered even with different mouse buttons.

Task-number: QTBUG-8222
Reviewed-by: Richard Moe Gustavsen
(cherry picked from commit 4ea4bcc2ddea6fc6899c14bb50b22f58b51bf7ca)