profile/ivi/qtbase.git
13 years agoEncapsulate pointer manipulations to createFileTemplate function
João Abecasis [Fri, 5 Aug 2011 08:35:55 +0000 (10:35 +0200)]
Encapsulate pointer manipulations to createFileTemplate function

, where we actually control how we use the pointers. Reduce some code
duplication in #ifdefs.
(cherry picked from commit d69788728ccd843e3d4a372680185fdf5e711c86)

Change-Id: I50aafbcac520837f9dc751e85f59a482a2f5225f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoWidgets: Remove Q_WS_QPA and qpa-sections from .pro files.
Friedemann Kleint [Thu, 20 Oct 2011 14:36:05 +0000 (16:36 +0200)]
Widgets: Remove Q_WS_QPA and qpa-sections from .pro files.

Enable compilation without -qpa.

- Remove conditionals from Q_WS_QPA sections.
- Rename precompiled header.
- Remove gui-related Q_OS_SYMBIAN-#ifdef sections.
- Leave other Q_WS code in for reference.

Change-Id: I16326b631fff483aec8edd2f7a2e7a1822eab814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years ago[directfb] Implement grab/ungrab of keyboard/pointer
Holger Hans Peter Freyther [Tue, 18 Oct 2011 13:10:23 +0000 (15:10 +0200)]
[directfb] Implement grab/ungrab of keyboard/pointer

Change-Id: Ie2b99bb659e324c63bfd23e96d6c89c13a8df3b4
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Remove grabbing of the pointer on input
Holger Hans Peter Freyther [Tue, 18 Oct 2011 12:32:29 +0000 (14:32 +0200)]
[directfb] Remove grabbing of the pointer on input

This should not be done on the input level but we should handle the
requests on the QWindow to grab/ungrab the pointer

Change-Id: Ibc61b300bf8de20f576fb8972fadf18de4a142c1
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Implement QPixmap::fromFile using DirectFB routines
Holger Hans Peter Freyther [Thu, 29 Sep 2011 16:14:15 +0000 (18:14 +0200)]
[directfb] Implement QPixmap::fromFile using DirectFB routines

The code is based on Qt 4.8 DirectFB support, it was reduced
in size (cosmetic changes, by using the outPtr()) and it has a
bugfix to pass loadAsBitmapOrPixmap that assumes the loadFromFile
routine will add '.png' and other extensions to the file.

Change-Id: I25b11206053c02be5c04730fba5bb42bd07426d1
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Prepare to select the alpha/opaque pixel formats
Holger Hans Peter Freyther [Thu, 29 Sep 2011 16:10:15 +0000 (18:10 +0200)]
[directfb] Prepare to select the alpha/opaque pixel formats

Right now we assume to use 32bpp but depending on the hardware
this might not be optimal at all. Begin to prepare the code for
not having a 32bpp surfaces.

Change-Id: Iedfa49c568559e074dfaeae2a216c9eb93721d2c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Manage the font database with a QScopedPointer
Holger Hans Peter Freyther [Thu, 29 Sep 2011 15:54:28 +0000 (17:54 +0200)]
[directfb] Manage the font database with a QScopedPointer

Attempt to fix a memory leak on exit by deleting the font database.

Change-Id: I07b0865c97bb8ef26950bf231b5239ca01e95c56
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Remove some duplication in the QDirectFbBlitter c'tor.
Holger Hans Peter Freyther [Mon, 26 Sep 2011 17:30:37 +0000 (19:30 +0200)]
[directfb] Remove some duplication in the QDirectFbBlitter c'tor.

Introduce dfb_blitter_capabilities that returns the QBlittable::Capabilities
of the DirectFB blitter.

Change-Id: Ifb803ff4f07376d5333ad2d05ff72d9a63d17fff
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agodirectfb: Initialize m_dfb after DirectFBInit has been called
Holger Hans Peter Freyther [Sun, 25 Sep 2011 17:31:02 +0000 (19:31 +0200)]
directfb: Initialize m_dfb after DirectFBInit has been called

The QDirectFBIntegration is responsibe for deleting the DirectFB
instance but it can only initialize the DirectFB instance after
the DirectFBInit has been called. Change the order. This issue
got introduced by myself in 3faa89f4.

Change-Id: Ia67d439152d895e2e0a47f35eed57348c629f79f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Introduce the QDirectFBPointer from QWS/gfxdrivers
Holger Hans Peter Freyther [Sun, 18 Sep 2011 22:57:45 +0000 (00:57 +0200)]
[directfb] Introduce the QDirectFBPointer from QWS/gfxdrivers

Introduce QDirectFBPointer and use it throughout the code to
fix various resource leaks in the DirectFB backend. Fix the surface
ownership of the IDirectFBSurface in the Blittable/BackingStore
code.

Change-Id: I0d4572eaab80b3558e644f26d76222461bf37bbb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Make QDirectFBInput a QThread to allow proper exits
Holger Hans Peter Freyther [Sun, 18 Sep 2011 22:11:24 +0000 (00:11 +0200)]
[directfb] Make QDirectFBInput a QThread to allow proper exits

Without this patch the application will get stuck waiting for the
IDFBEventBuffer to report an event. We will use the
IDFBEventBuffer::WakeUp function to interrupt the waiting but this
produces the below error on exit:
QEventLoop: Cannot be used without QApplication
QThread: Destroyed while thread is still running

This is solved by making the QDirectFBInput a QThread, reimplement
the run() method to handle the events. It should work as this is
only posting events to the QApplication event loop.

Change-Id: I24adf2b080f96c72ede6a5499f484ac33fdd44fc
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Use QScopedPointer to manage heap allocated objects
Holger Hans Peter Freyther [Sun, 18 Sep 2011 20:04:09 +0000 (22:04 +0200)]
[directfb] Use QScopedPointer to manage heap allocated objects

Use QScopedPointer to avoid trying to manually delete objects. For
some of the cases the leak would only be viewable when things are
getting shut down. Leave in some more warnings for cleaning it up,
e.g. the m_eventBuffer of the Input is leaked and the input task will
only stop after another key event.

Change-Id: Ic54568343605b4ab7094a7dece40e22250184a37
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Fix memory leak when passing arguments to directFB
Holger Hans Peter Freyther [Sun, 18 Sep 2011 23:04:59 +0000 (01:04 +0200)]
[directfb] Fix memory leak when passing arguments to directFB

We need to delete the array but also the elements inside it.

Change-Id: Ib61beeca569802638b9ff3b94ede79c0beebb399
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Do not call a pure virtual function
Holger Hans Peter Freyther [Sun, 11 Sep 2011 17:05:15 +0000 (19:05 +0200)]
[directfb] Do not call a pure virtual function

In 688d9f6ec0a0da5539a3d11fa1dc6e1ae0558cda the base class
was changed from QWindowSurface to QPlatformBackingStore but
QPlatformBackingStore::resize is pure virtual now.

Change-Id: Ib36f177d80e9458e7e8e34f587e4554c0462e35c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[directfb] Rename class from WindowSurface to BackingStore
Holger Hans Peter Freyther [Sun, 11 Sep 2011 12:54:20 +0000 (14:54 +0200)]
[directfb] Rename class from WindowSurface to BackingStore

Catch up with the naming by renaming the file from windowsurface
to backingstore, update the class names and include files.

Change-Id: I1b16826b60c19490946a77f61518e18f8099adce
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years ago[blitter] Work on tst_QPixmap::clear()
Holger Hans Peter Freyther [Mon, 26 Sep 2011 17:02:57 +0000 (19:02 +0200)]
[blitter] Work on tst_QPixmap::clear()

By default QPixmap may not hasAlphaChannel(), only if setMask()
or fill() with a transparent color is called a QPixmap will
hasAlphaChannel().

Make the QBlittablePlatformPixmap remember if there is an alpha
channel, pass this as parameter in createBlittable to make it
clear that this is required and not optional.

Update the DirectFB plugin to handle this parameter to create a
RGB32 or ARGB Surface depending on the alpha value, also only use
PreMultiplied alpha when using ARGB. Separate the two constructors
for the QDirectFbBlitter to either adopt a DirectFB Surface or to
create one.

Change-Id: I8abf82408ecd2d075fc6f241ace8be2a34ac56e7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoFix compilation on Harmattan
Simon Hausmann [Fri, 21 Oct 2011 10:38:00 +0000 (12:38 +0200)]
Fix compilation on Harmattan

Commit 87274e272d2a854563066489e20d019b4e6320de removed the maemo "specific"
bearer monitory example .ui file, but the .pro file wasn't updated.

Change-Id: I9daa000fe3e4b69789519f53541c106d01748ffd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years ago[blitter] Generate a new serial number when resizing the pixmap
Holger Hans Peter Freyther [Thu, 29 Sep 2011 16:02:47 +0000 (18:02 +0200)]
[blitter] Generate a new serial number when resizing the pixmap

The raster pixmap is generating a new serial number when the pixmap
is resized, do the same for the blitter code.

Change-Id: I05c74df7ea0f3a99ec9c24dacb41562da21c2d6d
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
13 years agoTestlib: Fixed compilation with MSVC.
Friedemann Kleint [Fri, 21 Oct 2011 09:11:28 +0000 (11:11 +0200)]
Testlib: Fixed compilation with MSVC.

MSVC does not like VA_ARGS tricks.

Change-Id: I947dcb89e519c18a482a504725213a3f4d9670ff
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
13 years agoFix compiler warnings when using QT_DEPRECATED
Sergio Ahumada [Fri, 21 Oct 2011 08:12:26 +0000 (10:12 +0200)]
Fix compiler warnings when using QT_DEPRECATED

Change-Id: If62cff5d1cbd1c8051d709db8747777606797056
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoRemove mtdev dependency from the touchscreen QPA plugin.
Laszlo Agocs [Fri, 21 Oct 2011 07:36:56 +0000 (10:36 +0300)]
Remove mtdev dependency from the touchscreen QPA plugin.

There is no reason to enforce the usage of the mtdev library. As long
as ABS_MT_TRACKING_ID is provided protocol type A is perfectly enough.

This makes the plugin more suitable for embedded systems.

Change-Id: I73ce4a1056a6dc27daacb69dc4761bca393a7e43
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agoqmake: Replace Q_WS_WIN by Q_OS_WIN
Friedemann Kleint [Fri, 21 Oct 2011 07:35:57 +0000 (09:35 +0200)]
qmake: Replace Q_WS_WIN by Q_OS_WIN

Change-Id: I6c63cda81a15759294321696feffa1150bd2a315
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoUse QBasicAtomicInt as a static variable
Shane Kearns [Wed, 19 Oct 2011 10:07:40 +0000 (11:07 +0100)]
Use QBasicAtomicInt as a static variable

QAtomicInt has a constructor, so QBasicAtomicInt needs to be used
instead to allow compile time initialisation.

Task-Number: QTBUG-20343
Reviewed-By: Olivier Goffart
(cherry picked from commit 29495592d27505feff024d574e1333809794c304)

Change-Id: Ia531c74f47daa86ba24a1b01bee36ddb1101af11
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoExpand QT_TR_NOOP("str") to "str", not ("str").
Jan-Arve Saether [Fri, 21 Oct 2011 07:10:43 +0000 (09:10 +0200)]
Expand QT_TR_NOOP("str") to "str", not ("str").

This enables us to write code like :
    QStringLiteral(QT_TR_NOOP("Press"))
or just:
    QT_UNICODE_LITERAL(QT_TR_NOOP("Press"))

It also makes it consistent with the QT_TRANSLATE_NOOP3,
QT_TRANSLATE_NOOP3_UTF8 and QT_TRID_NOOP macros, as they don't surround
the string literals with parenthesis.

Change-Id: I67c30bcd88609f897bd22afb44266affa4dcfc8f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoFix some compiler warnings on Mac
Sergio Ahumada [Thu, 20 Oct 2011 17:39:36 +0000 (19:39 +0200)]
Fix some compiler warnings on Mac

Change-Id: I52b5c1822f9530f75eeebfcafbade6f89062e369
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoMake testlib use #include consistently.
Jason McDonald [Fri, 21 Oct 2011 00:07:51 +0000 (10:07 +1000)]
Make testlib use #include consistently.

Change-Id: I36b5da3f832d2588072405d93143173edc29f4af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix shadow build error for qmltest
Charles Yin [Thu, 20 Oct 2011 01:42:37 +0000 (11:42 +1000)]
Fix shadow build error for qmltest

Both $$OUT_PWD and $$PWD can't be used here, the real .pro directory
should be $$_PRO_FILE_PWD_

Task-number:QTBUG-22169
Change-Id: I0aebfe7503703fe2b264c7c47b828a8fc4ffac47
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoFix misleading comment on test execution order.
Jason McDonald [Thu, 20 Oct 2011 02:16:49 +0000 (12:16 +1000)]
Fix misleading comment on test execution order.

When executing a data-driven test, testlib executes the _data function
once, then repeatedly executes init(), then the test function, then
cleanup() for each row of test data.

Change-Id: Icfa1dd19a52fb1debbc92b7cbe13d85bfb0418c7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoUpdate QSKIP documentation.
Jason McDonald [Thu, 20 Oct 2011 02:12:43 +0000 (12:12 +1000)]
Update QSKIP documentation.

Task-number: QTBUG-21851, QTBUG-21652

Change-Id: I3d4cf8e11756b92fe9d97f01a02c61cbf2df1556
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove SkipMode parameter from QSKIP calls.
Jason McDonald [Wed, 19 Oct 2011 02:53:13 +0000 (12:53 +1000)]
Remove SkipMode parameter from QSKIP calls.

The previous commit removed SkipMode from the testlib APi.  This commit
removes the parameter from all calls to QSKIP.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove QTest::SkipMode from qtestlib API.
Jason McDonald [Tue, 18 Oct 2011 04:53:23 +0000 (14:53 +1000)]
Remove QTest::SkipMode from qtestlib API.

When the SkipAll mode is used, tests only report a SKIP for the first
line of test data and subsequent lines are not reported at all.  This
behaviour makes it impossible for anything post-processing test results
to accurately report test pass- and run- rates because they cannot see
how many lines of test data were skipped.

This commit removes SkipMode.  QSKIPs in regular test functions and data
functions are treated the same as SkipSingle, so that every skipped line
of local or global test data is reported in the test log.  QSKIPs
elsewhere are treated the same as SkipAll -- skipping in init() causes
the next test function to be skipped entirely, and skipping in
initTestCase() or initTestCase_data() causes all test functions to be
skipped.

This commit only changes qtestlib and the selftests. A further commit
will change the autotests to remove the SkipMode parameter from QSKIP
calls.

Note that the change in expected output for the globaldata selftest is
deliberate, as the QSKIP in the skipLocal test function has effectively
changed from SkipAll to SkipSingle.

Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I7b1c53fe7ca9dde032810b789d967e2a402bbe5d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
13 years agoFix FTP example to handle failure to open network session
Shane Kearns [Wed, 19 Oct 2011 13:00:28 +0000 (14:00 +0100)]
Fix FTP example to handle failure to open network session

The example code only dealt with successful opening of the session.
If the session open failed, the application is stuck because the
connect button is disabled.
Moved the session open to be part of connection.
Handled session open failure by puttin the UI back in the default
state where connection button is enabled.

Task-Number: QTBUG-9909
Reviewed-By: Miikka Heikkinen
(cherry picked from commit 104c22a68c422152ff3cf03eb3615e7826fefbd0)

Change-Id: Ifa40fcd8b83c43cda364b3ec5e58f80b539aa244
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoFTP - fix interoperability issues with SIZE command
Shane Kearns [Tue, 18 Oct 2011 15:18:06 +0000 (16:18 +0100)]
FTP - fix interoperability issues with SIZE command

Certain FTP servers refuse the SIZE command in ASCII mode (proftpd)
or refuse the SIZE command in ASCII mode for large files.
This is a security feature, as the SIZE command requires reading
the whole file and counting line ends which can cause denial of
services. In binary mode, the file size on disc is reported, which
is a relatively quick operation.

Qt had two problems here:
1. when size command fails, the total size was reported as -1,
   whereas the documentation of QFtp::dataTransferProgress states
   it should be reported as 0 (so that QProgressDialog can display
   a wait note rather than progress bar)
2. SIZE command was sent before setting the type of the transfer
   to ASCII / Binary. This is a problem as the size reported by
   the server is incorrect. Also it usually means sending ASCII
   SIZE for Binary transfers, which results in the 550 error on
   FTP servers with DOS protection.

Task-Number: QTTH-1428
Reviewed-By: Peter Hartmann
(cherry picked from commit 72bf6105214bfc26cff33632f7f4bdeed9cdf362)

Change-Id: Ie1f356c34d6a04362eaca64befb00788f85c0ccb
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoTeach syncqt to handle multiple %moduleheaders directories
Tor Arne Vestbø [Thu, 20 Oct 2011 13:45:20 +0000 (15:45 +0200)]
Teach syncqt to handle multiple %moduleheaders directories

Each directory is separated by a ';'. The syntax was chosen over the
regular perl [] syntax as ';' was used already in other places.

Change-Id: I7a07a1facb7c08d7a9de6ec45ad57f6057cb0150
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoMoved tests into integrationtests/ and widgets/
Jo Asplin [Thu, 20 Oct 2011 11:17:26 +0000 (13:17 +0200)]
Moved tests into integrationtests/ and widgets/

Task-number: QTBUG-19013

Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
13 years agoAdd the ability to enable various SSL bug workarounds.
Richard Moore [Wed, 19 Oct 2011 09:40:57 +0000 (11:40 +0200)]
Add the ability to enable various SSL bug workarounds.

There are lots of buggy SSL servers around and to connect to them you
need to disable various features. This commit adds the ability to
disable the SSL ticket extension, the ability to disable the insertion
of empty fragments, and the ability to disable compression.

Task-number: QTBUG-21906

Change-Id: I3e1d0347a46e9030b889bbf15b2aad19b8513b73
Merge-request: 68
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoret is an "internal" path, no need to re-process it
João Abecasis [Fri, 26 Aug 2011 09:01:48 +0000 (11:01 +0200)]
ret is an "internal" path, no need to re-process it

Where "internal" means that it uses Qt's separator '/', regardless of
the native one.
(cherry picked from commit d4aa1777389f41da60a862a8c371d13839938d43)

Change-Id: Ic23ba0b360020b2e910b1256b38522db5c57f49b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoWe prefer capitalized drive letters, make it so sooner
João Abecasis [Fri, 26 Aug 2011 09:03:55 +0000 (11:03 +0200)]
We prefer capitalized drive letters, make it so sooner

Reviewed-by: Prasanth Ullattil
(cherry picked from commit 13899108ed57548d3c4f40e595481f8ee76e4fcf)

Change-Id: I70132c19af34715c92718f9b06e4f2dfba28d255
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoAvoid spurious detaching in QDir::to/fromNativeSeparators
João Abecasis [Fri, 5 Aug 2011 08:40:46 +0000 (10:40 +0200)]
Avoid spurious detaching in QDir::to/fromNativeSeparators

The new code avoids non-const detaching operations until needed and uses
a pointer into the "raw" QChar data from then on, thus skipping unneeded
checks on the reference count for further detaching.

These functions are used all the time by the file system classes so this
small optimization won't hurt. In particular, it will help users who
already use '/' when passing paths into Qt.

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

Change-Id: I27787e787b544a63c9ea1e4138bd548500104dff
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoFix tst_qsocketnotifier
Shane Kearns [Wed, 19 Oct 2011 14:54:35 +0000 (15:54 +0100)]
Fix tst_qsocketnotifier

Removed the bogusFds test, as it is only run on symbian in 4.8
Forward ported the posixSockets fix from 4.8

Task-number: QTBUG-20892
Change-Id: I8a8c67e12eae402724bbb07fe37e7ea1770aaeee
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
13 years agoGenerate dependencies for moc_ style includes when using CONFIG+=GNUmake
Tor Arne Vestbø [Thu, 20 Oct 2011 08:53:28 +0000 (10:53 +0200)]
Generate dependencies for moc_ style includes when using CONFIG+=GNUmake

Sometimes you will include "moc_foo.cpp" from a a cpp file, not to tell
qmake to run moc on it (that's handled by having foo.h in HEADERS), but
so that the moc'ed sources are compiled as part of foo.cpp instead of a
separate compilation unit, or if the moc'ed sources need defintions from
the cpp file.

The dependency logic for CONFIG+=GNUmake failed to take this case into
account, resulting in failures to find files when generating dependency
information for those files.

Change-Id: Iac00424e2d196b518b1ef576d7567335b8ff24f0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoRevert "Update V8"
Kent Hansen [Thu, 20 Oct 2011 08:31:42 +0000 (10:31 +0200)]
Revert "Update V8"

This reverts commit 1c4a5fcab76d1b769a4c0369d40dd0dd7c0e7495

Several of the qtdeclarative tests and examples are dying randomly with messages like this:
>
> #
> # Fatal error in ../3rdparty/v8/src/objects-inl.h, line 2169
> # CHECK(object->IsJSFunction()) failed
> #
>
>
> ==== Stack trace ============================================
>
>
> ==== Details ================================================
>
> ==== Key         ============================================
>
> =====================
>
> Aborted (core dumped)

Change-Id: Iebaa2497a6f6ef616ef4c3576c217d2a8a2c1ea5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
13 years agoMake foreground and backgroundColor proper functions.
Frederik Gladhorn [Mon, 10 Oct 2011 13:24:17 +0000 (15:24 +0200)]
Make foreground and backgroundColor proper functions.

Change-Id: I93d4355a6c0b6edb1902df6399df7884b25ea744
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoMove the non-atomic and implicit functions from QBasicAtomicXXX
Thiago Macieira [Tue, 5 Jul 2011 21:52:29 +0000 (23:52 +0200)]
Move the non-atomic and implicit functions from QBasicAtomicXXX

Now, users of QBasicAtomicInt and QBasicAtomicPointer must be sure to
use .load() and .store() to access the values.

Change-Id: I6b48ed175618baf387dd38d821bd50e6e93c082e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoRemove unused variable from qdbusintegrator.cpp.
Jędrzej Nowacki [Wed, 19 Oct 2011 10:57:16 +0000 (12:57 +0200)]
Remove unused variable from qdbusintegrator.cpp.

The variable was set but unused.

Change-Id: Ibce123916f56ec90662f6118a696dfb2f4962169
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
13 years agoUse fromLocal8Bit for reversing toLocal8Bit
João Abecasis [Fri, 5 Aug 2011 08:32:51 +0000 (10:32 +0200)]
Use fromLocal8Bit for reversing toLocal8Bit

path is converted to 8-bit encoding using toLocal8Bit in
QTemporaryFileEngine::open. The reverse operation should be used here.
(cherry picked from commit 023976f9dd48a3deb947905d32d5fc0692da7318)

Change-Id: Idb4c1ca3415300367c46a09d68df640e17b7bfdc
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoDon't convert template's path separators again
João Abecasis [Fri, 5 Aug 2011 08:32:25 +0000 (10:32 +0200)]
Don't convert template's path separators again
(cherry picked from commit 19880c1bdf75455b645fb8d5ee12bcb6e37e5aff)

Change-Id: Iec201da5c09d76711d994bc1da6d15a70a66b0c8
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoChanged if/if/else/if/eleven chain to switch
João Abecasis [Fri, 5 Aug 2011 08:32:08 +0000 (10:32 +0200)]
Changed if/if/else/if/eleven chain to switch

Inlined isdigit in switch statement. Removed unused #includes.
Documented unreachable segment with code (Q_ASSERT).

Reviewed-by: Denis Dzyubenko
(cherry picked from commit 3596db6c9bb8db42476d0c7b52fa2043dc67135b)

Change-Id: I98c33801fd8794e95ba8fc0b5c4efe9b1910682b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoModulus of negative dividends is undefined or negative
João Abecasis [Fri, 5 Aug 2011 08:30:32 +0000 (10:30 +0200)]
Modulus of negative dividends is undefined or negative

... depending on who you ask. Since it is possible for applicationPid to
return negative values this means we would introduce garbage ['()*+,-./]
in the generated filenames.

Reviewed-by: Denis Dzyubenko
(cherry picked from commit cb7cb1d3884ae8a032f3ad2ed3a6d8e3ffc06206)

Change-Id: Ie4f74b961397f97508ea67a0c835e45773d1cc0e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoMark the most important MSAA functions as "moz: [important]"
Jan-Arve Saether [Mon, 17 Oct 2011 13:10:06 +0000 (15:10 +0200)]
Mark the most important MSAA functions as "moz: [important]"

See comment inside commit for explanation.

Change-Id: Ifc05d479ac5094f21f8db0390ae21d99eef0dbe1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
13 years agoAdd files from qtdoc for documentation modularization.
Casper van Donderen [Tue, 18 Oct 2011 11:18:58 +0000 (13:18 +0200)]
Add files from qtdoc for documentation modularization.

Change-Id: I6ea5c139e632460c516116a302f27f5c902f5561
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
13 years agoMove a11y inspector from tools to util.
Morten Sorvig [Wed, 19 Oct 2011 08:57:32 +0000 (10:57 +0200)]
Move a11y inspector from tools to util.

Change-Id: Ifc032c511aea72a8f7a4ec62d304e89718f712db
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoUpdate keyToValue and keysToValue in QMetaEnum
Liang Qi [Tue, 18 Oct 2011 09:06:42 +0000 (11:06 +0200)]
Update keyToValue and keysToValue in QMetaEnum

Add a ok return value for whether found or not.

Task-number: QTBUG-21672
Reviewed-by: Olivier Goffart
Change-Id: Ic0ea7455dccf1ac91705bcc1479444eb4091ded3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
13 years agoFixed missing return statement in QPrintSupport
Kevin Simons [Wed, 19 Oct 2011 12:12:28 +0000 (14:12 +0200)]
Fixed missing return statement in QPrintSupport

Change-Id: I8da63b7d4c5a456b0150b14e089d8f5e69c6a70a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoWindows: Fix Geometry, OpenGL formats
Friedemann Kleint [Wed, 19 Oct 2011 14:32:05 +0000 (16:32 +0200)]
Windows: Fix Geometry, OpenGL formats

- Do not use size returned by GetWindowRect for child windows
- Turn Open GL samples off if number is 1.

Change-Id: I2f44606d965fe691548094771deda7bca51ef9a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoMake pkg-config cross-compile aware
Harald Fernengel [Wed, 19 Oct 2011 13:36:33 +0000 (15:36 +0200)]
Make pkg-config cross-compile aware

Introduce PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR for
cross-compilation environments

Change-Id: I859d55f125b18d6bdef0f1dfaeb43721b85d22f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoUpdate V8
Aaron Kennedy [Tue, 11 Oct 2011 05:06:25 +0000 (15:06 +1000)]
Update V8

Change-Id: I7a9da7dbb2116a441788407d60ed10155cded941
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
13 years agoRefactor QAccessibleActionInterface.
Frederik Gladhorn [Thu, 6 Oct 2011 12:54:49 +0000 (14:54 +0200)]
Refactor QAccessibleActionInterface.

Some refinements done by Jan-Arve Sæther.

Change-Id: I99195b3c7273316cfa9c46e451924bbcfddd11a9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
13 years agoIntroduce Q_STATIC_ASSERT
Jędrzej Nowacki [Fri, 14 Oct 2011 10:58:54 +0000 (12:58 +0200)]
Introduce Q_STATIC_ASSERT

Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300):
tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’
to incomplete type ‘QStaticAssertFailure<false>’

Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoMetatype: Silence MSVC warnings about unused variables.
Friedemann Kleint [Wed, 19 Oct 2011 13:51:34 +0000 (15:51 +0200)]
Metatype: Silence MSVC warnings about unused variables.

Turn around if's.

Change-Id: Ica6f7f54098a567816ce3918f6fe5d8d2c072e01
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
13 years agoWidgets: Fix a startup crash in QSplashScreen (Linguist).
Friedemann Kleint [Wed, 19 Oct 2011 08:29:01 +0000 (10:29 +0200)]
Widgets: Fix a startup crash in QSplashScreen (Linguist).

Change-Id: I38f5920fb62277f97e9b3b45651527c2475556ac
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoFix "may be used uninitialized" compiler warning.
Morten Sorvig [Wed, 19 Oct 2011 09:00:04 +0000 (11:00 +0200)]
Fix "may be used uninitialized" compiler warning.

Change-Id: I96e9dbf0f3df527785e03661b9c25bd2d214cd44
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoAdd benchmarks for QMetaType::construct()
Kent Hansen [Mon, 10 Oct 2011 12:33:56 +0000 (14:33 +0200)]
Add benchmarks for QMetaType::construct()

Change-Id: Ia5883c5712e5d634b0e62189b639209eb3d5cd93
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
13 years agoProvide API for "placement new" construction of meta-types
Kent Hansen [Mon, 10 Oct 2011 09:56:43 +0000 (11:56 +0200)]
Provide API for "placement new" construction of meta-types

By making it possible to specify the place in memory where a
type should be constructed, any meta-type can be allocated on
the stack, for example. In the QML/JS QObject binding, this
makes it possible to call slots and access properties from
JavaScript without having to perform any mallocs (e.g. due to
QVariant creation) in the C++ <--> JS value conversion, in
the best case.

In addition to QMetaType::construct() and QMetaType::destruct(),
this change introduces QMetaType::typeSize(), which returns the
size of a type in bytes. This can be used to prepare a suitable
buffer for constructing a type using construct().

Benchmarks indicate that in-place construction is 2-5x faster
than normal construction for core and GUI types on linux-g++.

Note that there is already a QMetaType::construct() function
in Qt 4, which has been renamed to QMetaType::create() in Qt 5.
In order to avoid existing usages of construct() in user code
to call the Qt 5 construct() (when they really meant to call
create()), the third argument ("copy") of construct() is made
mandatory. Hence, calls to QMetaType::construct() written for
Qt 4 will cause a compile error when compiled with Qt 5, and
the user must adapt his code.

Task-number: QTBUG-12574
Change-Id: I836f06f6ee1c1c3edbd199a03424c78c942bdd3e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
13 years agoWidgets: Remove Symbian-specific code.
Friedemann Kleint [Tue, 18 Oct 2011 06:38:05 +0000 (08:38 +0200)]
Widgets: Remove Symbian-specific code.

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Change-Id: Ieee43d6650f5b1968fc7d77e618096701ffef941
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoDestroy generic plugins on exit.
Laszlo Agocs [Tue, 18 Oct 2011 06:07:46 +0000 (09:07 +0300)]
Destroy generic plugins on exit.

Change-Id: I9037cabae74f9a7d8743630d0f530aaa1593266f
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
13 years agoSanitize paths in selftest data.
Jason McDonald [Tue, 18 Oct 2011 07:11:12 +0000 (17:11 +1000)]
Sanitize paths in selftest data.

Use a standard path for filenames that appear in the selftest's expected
test data.  This will make future patches smaller.

Change-Id: I04b2e739d261f80d20b834e5b33c5b6e88d26379
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove skipglobal testlib selftest.
Jason McDonald [Tue, 18 Oct 2011 03:48:54 +0000 (13:48 +1000)]
Remove skipglobal testlib selftest.

This test duplicates the skipinitdata selftest and has slightly less
informative output.

Change-Id: Ifd40e3ef8030059ec8fa0089ce5b2a994624abeb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove DEPENDS_ON from qtestlib API.
Jason McDonald [Tue, 18 Oct 2011 02:50:36 +0000 (12:50 +1000)]
Remove DEPENDS_ON from qtestlib API.

The DEPENDS_ON macro didn't do anything and has misled many users to
think that they can write test functions that depend on other test
functions.

Task-number: QTBUG-21851
Change-Id: Ibe65b2d5d88bb81b6a0ebbe0b220f7d409a1446c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoMove QTRY_VERIFY/QTRY_COMPARE into testlib.
Jason McDonald [Mon, 17 Oct 2011 08:51:44 +0000 (18:51 +1000)]
Move QTRY_VERIFY/QTRY_COMPARE into testlib.

These functions have lived in tests/shared/util.h for a long time, but
they really belong in qtestlib.

Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove QTEST_NOOP_MAIN from qtestlib API.
Jason McDonald [Mon, 17 Oct 2011 07:04:39 +0000 (17:04 +1000)]
Remove QTEST_NOOP_MAIN from qtestlib API.

This macro is no longer used in Qt's tests and encourages writing tests
in a way that makes test reporting less accurate -- remove it to prevent
further misuse.  If a test can be determined at compile-time to be
inapplicable, it should be omitted from the build via .pro file logic.
If that is not possible (e.g. there is no suitable qmake variable), the
test's initTestCase() function should call QSKIP to skip the entire test
with a meaningful explanation.

Task-number: QTBUG-21851
Change-Id: Icacc8c5567a700191b6ef3fa94ee52ede94c5b34
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoPrefer QSKIP to QTEST_NOOP_MAIN.
Jason McDonald [Mon, 17 Oct 2011 06:39:59 +0000 (16:39 +1000)]
Prefer QSKIP to QTEST_NOOP_MAIN.

Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that this test won't be testing anything until it gets fixed
for Qt5.

Change-Id: I4fa73883f58d8d4a533a7c21ecd4dd5b3c55b174
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoRemove Sensors and Location related macros/defines from qglobal.h.
alex [Tue, 18 Oct 2011 03:16:01 +0000 (13:16 +1000)]
Remove Sensors and Location related macros/defines from qglobal.h.

This reduces interdependencies between QtCore and other modules.
Individual modules handle this by themselves.

Change-Id: I82cb96326b8ccb0b6acb88d899ed811f80f47ec1
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoPrefer QSKIP to QTEST_NOOP_MAIN.
Jason McDonald [Mon, 17 Oct 2011 05:11:12 +0000 (15:11 +1000)]
Prefer QSKIP to QTEST_NOOP_MAIN.

Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that this test isn't testing anything when not built for X11.

Change-Id: I9e9ef8fe738c06eb86f2ce398f6a515bf17e220a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoCocoa: Add initial accessibility implementation.
Morten Sorvig [Tue, 11 Oct 2011 09:04:59 +0000 (11:04 +0200)]
Cocoa: Add initial accessibility implementation.

See qcocoaaccessiblity.h for details.

For now only the first level of the hierarchy is
made accessible.

Also add tools/accessibilityinspector which is an
utility for inspecting and debugging the Qt
accessibility tree.

Change-Id: Iff520bec26b3761feb0c2e00471feb379daaa735
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
13 years agoPrefer QSKIP to QTEST_NOOP_MAIN.
Jason McDonald [Mon, 17 Oct 2011 04:15:17 +0000 (14:15 +1000)]
Prefer QSKIP to QTEST_NOOP_MAIN.

There is no way for a .pro file to know if QProcess is in the Qt build,
so the QProcess autotest cannot be omitted from the build if QProcess is
not available.  Because of this limitation, the test was using
QTEST_NOOP_MAIN when QProcess was not available, making the test appear
to pass.  This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user
receives a clear indication that the test isn't testing anything when
QProcess is not available.

Change-Id: I79f667b17ff98dfc47eb61fb977365abef8883fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoWindows platform: Improve Open GL.
Friedemann Kleint [Tue, 18 Oct 2011 13:33:19 +0000 (15:33 +0200)]
Windows platform: Improve Open GL.

- Pass on version to ARB.
- Query obtained ARB format more fine-grained depending on version,
  indicate failures
- Fix GDI contexts and introduce gl=gdi to activate the GDI
  functionality
- Adapt window flags after setParent if top level state changes
- Remove unused OpenGL flag from integration/context

Change-Id: I59ca74ee1fa727bd2bcfd605b3907bc82cca18fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoQtBase examples: Remove Maemo/Symbian-specific code.
Friedemann Kleint [Tue, 18 Oct 2011 07:54:31 +0000 (09:54 +0200)]
QtBase examples: Remove Maemo/Symbian-specific code.

- Maemo/Symbian are no longer supported and QWidget-based examples
  are no longer supposed to run on mobile platforms, so, remove any
  Maemo/Symbian or mobile-specific code from source files and
  profiles.
- Remove Maemo/Symbian vibration examples.
- Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate.

Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
13 years agoQSurfaceFormat: Use version in comparison and debug, fix setter.
Friedemann Kleint [Tue, 18 Oct 2011 09:46:13 +0000 (11:46 +0200)]
QSurfaceFormat: Use version in comparison and debug, fix setter.

Change-Id: Id123ca9366b97a172e08a4608ccdffafb7caaf09
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoMake some more methods private
Lars Knoll [Wed, 12 Oct 2011 21:00:13 +0000 (23:00 +0200)]
Make some more methods private

Change-Id: I0644ee287201866596dccd96e443e7e62fd89360
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agomake fromWCharArray() and toWCharArray() inlined
Konstantin Ritt [Tue, 18 Oct 2011 10:27:24 +0000 (12:27 +0200)]
make fromWCharArray() and toWCharArray() inlined

because we may have the size of wchar_t varying,
we need to know which is the correct encoding: UTF-16 or UCS-4

Merge-request: 49
Change-Id: Ib5a1e7dea51d0cd8394e686634a36aae984fa072
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
13 years agoMove QShortcutMap to QtGui
Lars Knoll [Wed, 12 Oct 2011 20:29:41 +0000 (22:29 +0200)]
Move QShortcutMap to QtGui

QShortcut stays in QtWidgets, what we need in QtGui
is only the basic functionality of the shortcut map.
QML can integrate directly with the map where required.

Change-Id: Ie39e9242f24cbebf824e5c3d2926880325ea4187
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoMove the widget dependent code away from the shortcutmap
Lars Knoll [Wed, 12 Oct 2011 20:21:44 +0000 (22:21 +0200)]
Move the widget dependent code away from the shortcutmap

qshortcut.cpp now has the honour of hosting the code that
detects whether the a given shortcutcontext is actually
valid.

Change-Id: I59d299bbd2fd62fca074a51d96e85b81a50ae73c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoDo not call swapBuffers when surfaceHandle is NULL.
Laszlo Agocs [Tue, 18 Oct 2011 09:06:24 +0000 (12:06 +0300)]
Do not call swapBuffers when surfaceHandle is NULL.

Calling swapBuffers with the surfaceHandle of 0 returned by QWindow
during application exit causes a crash when using GLX. The patch
avoids swapBuffer calls to platformGLContext when there is no surface
handle anymore.

Change-Id: I09c5bbafd4e7af6648ca54a58ed0267d0a2f343d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoInclude threads docs from qtdoc, rename old threads to threads-basics.
Casper van Donderen [Mon, 17 Oct 2011 12:18:06 +0000 (14:18 +0200)]
Include threads docs from qtdoc, rename old threads to threads-basics.

Change-Id: Ie603582809e61c2e46566a46cfc81fead4168aad
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
13 years agoRemove stale documentation.
Casper van Donderen [Mon, 17 Oct 2011 12:18:42 +0000 (14:18 +0200)]
Remove stale documentation.

Change-Id: I85139e0334b648bee0d18129cef9387dcc6c3222
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
13 years agoRemove Q_WS_ in text codecs.
Friedemann Kleint [Mon, 17 Oct 2011 10:39:11 +0000 (12:39 +0200)]
Remove Q_WS_ in text codecs.

Change-Id: Id27d82f91a21107f31f73d7f2920629a512dc2a1
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
13 years agoOpenGL: Remove Q_WS_ defines.
Friedemann Kleint [Mon, 17 Oct 2011 10:05:57 +0000 (12:05 +0200)]
OpenGL: Remove Q_WS_ defines.

Change-Id: I351a910968ff7f46550af5b3742959cb0cab540d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoPrefer QSKIP to QTEST_NOOP_MAIN.
Jason McDonald [Mon, 17 Oct 2011 05:06:58 +0000 (15:06 +1000)]
Prefer QSKIP to QTEST_NOOP_MAIN.

Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that these tests aren't testing anything when the required
defines are not defined.

Change-Id: I977e24205a1bb7787ecddbdb1ebbeda1f2ded321
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoPrefer QSKIP to QTEST_NOOP_MAIN.
Jason McDonald [Mon, 17 Oct 2011 04:50:39 +0000 (14:50 +1000)]
Prefer QSKIP to QTEST_NOOP_MAIN.

Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear
indication that these tests aren't testing anything when the required
defines are not defined.

Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoReduce the runtime of tst_selftests
Rohan McGovern [Mon, 17 Oct 2011 04:11:13 +0000 (14:11 +1000)]
Reduce the runtime of tst_selftests

The addition of testing for multiple loggers greatly increased the total
runtime of this test, in fact making it the slowest testcase in Qt.
Fortunately this is only due to a couple of slow subtests whose behavior
is unlikely to be affected by the loggers.  Change it to run these slow
subtests just for a couple of loggers, instead of all the combinations.

Change-Id: Ie90f6c0ca29470ed6a7c4e2e185f852602a2d162
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
13 years agoFix TouchEnd events not being received on Harmattan.
Jocelyn Turcotte [Mon, 17 Oct 2011 12:24:41 +0000 (14:24 +0200)]
Fix TouchEnd events not being received on Harmattan.

TouchEnd is sent when all the touch points have a TouchPointReleased state,
and we would clear all touch points on finger release before sending them
up the stack.

Change-Id: I14e7347090ce9a1865743202f6926ae2fc035bd3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
13 years agoAdd multipoint touch support for Harmattan to the xcb platform plugin.
Jocelyn Turcotte [Fri, 14 Oct 2011 13:55:35 +0000 (15:55 +0200)]
Add multipoint touch support for Harmattan to the xcb platform plugin.

Proper multipoint touch support was only introduced in XInput2.1, but Harmattan uses
a tweaked version of XInput2.0 that transfers touch data through mouse events.

This patch applies on the xcb plugin a subset of the changes that were applied on the
Qt 4.7 that was shipped to Harmattan to get similar multipoint touch support.

Change-Id: Ifda7ad40de29d7ded1443d4f78b3ec3807303a9f
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
13 years agoFix TouchPoint::lastPos() after TouchPointStationary only events.
Jocelyn Turcotte [Mon, 17 Oct 2011 12:45:45 +0000 (14:45 +0200)]
Fix TouchPoint::lastPos() after TouchPointStationary only events.

lastPos is copied from the last point's position, and the position has
to be resolved according the the receiving item's transformation.

However, if a QTouchEvent contains only stationary points, it won't be
delivered, it's pos()/rect() will still be uninitialized, and the
touch point of the next event will be delivered with the uninitialized
pos() as it's lastPos().

This patch makes sure that the lastPos() won't be filled with a
previous incomplete stationary point state even if the platform is
sending us stationary-point-only touch events.

Change-Id: Ia7d10423c8fbe78348edbb0a89fbfa66d1b8b5d1
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
13 years agoFix scaled text rendering with the raster paint engine & FreeType
Simon Hausmann [Mon, 17 Oct 2011 13:51:55 +0000 (15:51 +0200)]
Fix scaled text rendering with the raster paint engine & FreeType

Before commit 070d9c00c488a5ee6811f04170cf488ead79bf80, the raster paint engine used
to call loadGlyphs() on the FT engine, which ensures that the glyphs are loaded
and (more importantly) that the correct transformation matrix is applied on the
freetype face. After commit 070d9c0 lockedAlphaMapForGlyph is called for each glyph,
which unfortunately doesn't respect the provided transformation matrix. Therefore
when drawing scaled text, it was never actually scaled.

This patch applies the combination of the fontengine transform and the requested
transform on the freetype face actually used, similarly to loadGlyphs.

Change-Id: I0956a9e71784582db6bb90475a001a63800773f4
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
13 years agoAdd documentation from qtdoc for modularization of docs.
Casper van Donderen [Wed, 12 Oct 2011 11:51:30 +0000 (13:51 +0200)]
Add documentation from qtdoc for modularization of docs.

Change-Id: Ic9c4502f19ff077d8416ccb890678e64490349ca
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
13 years agoUse a QFunctionPointer for getProcAddress()
Casper van Donderen [Wed, 12 Oct 2011 11:52:04 +0000 (13:52 +0200)]
Use a QFunctionPointer for getProcAddress()

qdoc does not understand the void (*) syntax, there is a typedef to
QFunctionPointer that does work.

Change-Id: Idbe9d43d00f8676304d088d72795b6ddb7e4ee72
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
13 years agoReplace Q_WS_WIN by Q_OS_WIN in uic/network.
Friedemann Kleint [Mon, 17 Oct 2011 10:15:29 +0000 (12:15 +0200)]
Replace Q_WS_WIN by Q_OS_WIN in uic/network.

Change-Id: I592936859f6932fcd1aa47f0617ba9f8efee86dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
13 years agoPrefer QSKIP to QTEST_NOOP_MAIN.
Jason McDonald [Mon, 17 Oct 2011 04:32:54 +0000 (14:32 +1000)]
Prefer QSKIP to QTEST_NOOP_MAIN.

There is no way for a .pro file to know if exceptions are supported in
the Qt build, so these tests cannot be omitted from the build if
exceptions are not supported. Because of this limitation, these tests
were using QTEST_NOOP_MAIN when exceptions were not available, making
the tests appear to pass.  This commit changes QTEST_NOOP_MAIN to QSKIP,
so that the user receives a clear indication that the test isn't testing
anything when exceptions are not available.

Change-Id: I2facf08ba69e6f985e2da50dd36ad2658246b22e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
13 years agoAdd a warning and a return value to xcb's createGLPlatformContext
Laszlo Agocs [Fri, 14 Oct 2011 21:17:30 +0000 (00:17 +0300)]
Add a warning and a return value to xcb's createGLPlatformContext

There was no value returned previously when none of GLX, EGL, DRI was
enabled. Now we show a warning message and return null (resulting in a
crash). Previously not returning a value resulted in obscure crashes
with strange-looking call stacks, now it will be clear what the
problem is.

This is particularly important because not having libx11-xcb-dev
installed results in silently disabled xlib support which in turn
disallows the usage of glx too. The result is an obscure crash in any
GL (e.g. QML2) app. Now there will be a proper warning message at
least.

Change-Id: I15cf3a6c16ca373d4ada7abb6d3c8f7e30c1e03d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>