profile/ivi/qtbase.git
12 years agodoc: QWindowSurface is dead
Girish Ramakrishnan [Fri, 13 Apr 2012 16:14:59 +0000 (09:14 -0700)]
doc: QWindowSurface is dead

It goes by the name of QBackingStore these days.

Change-Id: Id46254e47ee0abf9e669862eec6c2205d9634368
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQDoc: add missing newline characters in qdoc -help.
Casper van Donderen [Fri, 13 Apr 2012 10:04:55 +0000 (12:04 +0200)]
QDoc: add missing newline characters in qdoc -help.

Change-Id: Ibd50091693be393c6b479d6ca8927ba1ed578709
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoqdoc: Fixed bugs causing invalid DITA XML
Martin Smith [Fri, 13 Apr 2012 10:55:56 +0000 (12:55 +0200)]
qdoc: Fixed bugs causing invalid DITA XML

Fixed a bug in qdoc that caused too many end elements to be generated.
Also fixed some doc errors that caused invalid DITA to be generated.

Task nr: QTBUG-25302

Change-Id: Ifbbf457d28c51c2691a252888447739da7713bc9
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoUpdate accessibility selections in QTextControl.
Frederik Gladhorn [Fri, 20 Jan 2012 18:07:54 +0000 (19:07 +0100)]
Update accessibility selections in QTextControl.

Forwardport from Qt 4.

Change-Id: Iae0c2792b64b8ec2736a9ff621cf7c313a394093
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit d5649547d641b9c5af3c3f814caf8e1ab5bf9f47)

12 years agoFix header inclusion guards
Girish Ramakrishnan [Fri, 13 Apr 2012 16:39:15 +0000 (09:39 -0700)]
Fix header inclusion guards

_QPA_ should only be used for qpa (plugin specific api) files.

Change-Id: I1fb6cd5973fcabec4c7e87eb6ccb048f825e2aad
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQTBUG-1363: fix QSqlField.length() for ODBC
Mark Brand [Thu, 12 Apr 2012 10:49:03 +0000 (12:49 +0200)]
QTBUG-1363: fix QSqlField.length() for ODBC

Applied Bill King's suggestion in QTBUG-1363. Columns of
hStmt must be accessed in order.

Verified using ODBC driver on SQL Server 2005 on Windows 7.

Added test for length of text field for MS SQL Server over ODBC.

Task-Id: QTBUG-1363
Change-Id: I6673dafe75e3ef394d41e439adb45096c1421068
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoWindows: Determine suitable font engine from application.
Friedemann Kleint [Thu, 12 Apr 2012 14:30:23 +0000 (16:30 +0200)]
Windows: Determine suitable font engine from application.

The Freetype engine currently works better for QML2, whereas
the native engine is better suited to the widgets.

Task-number: QTBUG-24205

Change-Id: I76de98c3e7c84a2d72542ea9860b8be1e67f7e04
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFix warnings in manual tests.
Friedemann Kleint [Thu, 12 Apr 2012 11:59:03 +0000 (13:59 +0200)]
Fix warnings in manual tests.

- Constructor order.
- Unused variables.
- size_t -> int conversions.

Change-Id: Ic5b016f41d01a4d8153ae0900b607bf946523c1d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoUse QPointer to store accessible object.
Frederik Gladhorn [Tue, 10 Apr 2012 20:58:05 +0000 (22:58 +0200)]
Use QPointer to store accessible object.

Itemview were not following the established pattern
of keeping the referenced object in a QPointer.
This made them a lot more crash prone.

Port of Qt 4 change.

Conflicts:

src/plugins/accessible/widgets/itemviews.cpp
src/plugins/accessible/widgets/itemviews.h

Change-Id: I210b112b9c3647b246fde2d6c69aba9ce8d25bd3
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
(cherry picked from commit f420ab2870d3c96e9678c24c64b4e26ec8a771bd)

12 years agodoc: Fix QObject::connect documentation
Olivier Goffart [Thu, 12 Apr 2012 20:46:01 +0000 (22:46 +0200)]
doc: Fix QObject::connect documentation

Unfortunately, qdoc is too simple to understand any pointer to member
function syntax.
(the ::* token is not even tokenized. And even if it was, it would be a
difficult way to hack that into the parser. (there is already an ugly
workaround for non-member pointer to function hat works by having '(*'
as a token,but the same hack is not possible for pointer to member function))
So I just put verbatim 'PointerToMemberFunction'

Also remove the obsolete mention that Qt::UniqueConnection is not supported
in that overload. It is now. (And it even contradicts the previous
paragraph)

Change-Id: I8fc9544808c9a462b0f11ccea406e2e33dee15b1
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoMove QPainterPathPrivate to the private header files.
Gunnar Sletta [Fri, 13 Apr 2012 07:28:44 +0000 (09:28 +0200)]
Move QPainterPathPrivate to the private header files.

This was made inline for the sake of performance, but has in hindsight
proven to be not really worth it. It also prevents us from aligning
the internal datastructure of QPainterPath with that of QPolygonF
and the internal QVectorPath class which would make mapping
between the two inside QPainter a lot faster.

Making all this out-of-line now as discussed in the task
https://bugreports.qt-project.org/browse/QTBUG-19998
so we can adress this in a binary compatible fashion during
Qt 5.x

Change-Id: I61058171ed31f8a845fa45517248367c85ce52cd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agodirectfb: Integrate building into configure.
Holger Hans Peter Freyther [Tue, 28 Feb 2012 09:00:32 +0000 (10:00 +0100)]
directfb: Integrate building into configure.

Add DirectFB buildsystem integration by adding a configure target
and adding it as subdirectory to the project file. The default is
to automatically build directfb. Update the Broadcom/9425 build.

Change-Id: I482f865cebd9d5cd4c98c184773f8534f92db9df
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoMinor cleanup of the header file.
Jan-Arve Saether [Wed, 11 Apr 2012 05:58:20 +0000 (07:58 +0200)]
Minor cleanup of the header file.

Move inline implementations to iaccessible2.cpp.
Makes it easier to read and navigate the source code.

Change-Id: I8da44ba0d40395356f612ff6b3ce2a808105838a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agore-enable qabstractnetworkcache autotest
Shane Kearns [Thu, 12 Apr 2012 17:42:51 +0000 (18:42 +0100)]
re-enable qabstractnetworkcache autotest

I have run the test 250 times in each of these configs with no
crashes observed, so assuming the instability has been fixed
by another change.
ubuntu 11.10 64 bit
ubuntu 10.04 32 bit
windows 7 msvc2010 64 bit (debug)
windows 7 msvc2010 32 bit (release)

Task-number: QTBUG-20686
Change-Id: I02bab165c263cf79684c7723eae1e278839b1e37
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQRegularExpression: add more test data
Giuseppe D'Angelo [Mon, 9 Apr 2012 00:38:43 +0000 (01:38 +0100)]
QRegularExpression: add more test data

Change-Id: I44d19f976ced7b073f66d0ea943fafea37940c48
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoWindows QPA plugin: Fix logging.
Friedemann Kleint [Thu, 12 Apr 2012 13:32:45 +0000 (15:32 +0200)]
Windows QPA plugin: Fix logging.

- Remove frequently occurring messages.
- Rename variable to QT_QPA_VERBOSE.

Change-Id: Id930e1422675355a9657edae6505be87aaec98a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agotest: Don't mark tst_qscrollbar as insignificant on Mac OS X
Sergio Ahumada [Thu, 12 Apr 2012 10:23:46 +0000 (12:23 +0200)]
test: Don't mark tst_qscrollbar as insignificant on Mac OS X

Just XFAIL the failing test instead of ignoring the whole test.

Task-number: QTBUG-25272
Change-Id: Iedca9913032f13c6610b049a0313c9e4336216e0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoreplace hardcoded values with a surrogate handling methods
Konstantin Ritt [Thu, 12 Apr 2012 15:21:39 +0000 (18:21 +0300)]
replace hardcoded values with a surrogate handling methods

Change-Id: Ib41e08d835f2e8ca2e32b4025c6f5a99840f2e27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMerge the two overloads of QButtonGroup::addButton().
Jason McDonald [Wed, 11 Apr 2012 13:46:41 +0000 (23:46 +1000)]
Merge the two overloads of QButtonGroup::addButton().

This change is source-compatible, but binary-incompatible.

Task-number: QTBUG-25101
Change-Id: If67aec2ca8dd54ad9315f6497c2dafbbbc0b775f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix unsigned comparison warning.
Stephen Kelly [Wed, 11 Apr 2012 16:04:53 +0000 (18:04 +0200)]
Fix unsigned comparison warning.

Change-Id: I8544f47177b68cf29ce9fbebb152ca73db6e219d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoFix compiling with XCode 4.3
Aron Rosenberg [Sat, 31 Mar 2012 20:03:34 +0000 (13:03 -0700)]
Fix compiling with XCode 4.3

XCode 4.3 moved the location of the SDK dir, so change the qmake
test to not use the old hardcoded location. Also change the test
to look for versions before 10.6 instead of later than 10.6 so 10.8+
gets detected correctly.

Change-Id: I1cb53a18c4b4f484d0d9de9c9d5e9641018f2502
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoQChar: documentation fixes
Konstantin Ritt [Wed, 11 Apr 2012 08:42:31 +0000 (11:42 +0300)]
QChar: documentation fixes

Change-Id: Ic4b58ab811e53cf175ebaf0a67c40c56678f0f35
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix wrong casing in include of qcocoaclipboard.h
Tor Arne Vestbø [Fri, 30 Mar 2012 10:42:02 +0000 (12:42 +0200)]
Fix wrong casing in include of qcocoaclipboard.h

Change-Id: Ib8294849d07abdf957a03ce0cb67c533905247a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdded iOS compatibility.
Qt4iOS [Sat, 24 Mar 2012 14:20:56 +0000 (14:20 +0000)]
Added iOS compatibility.

Put MacOS-specific code in #ifdef blocks to disable compilation on iOS.

Change-Id: I02c99c62b8ceb468b8b58e3c4ef52ca8ae2495f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdded iOS compatibility.
Qt4iOS [Sat, 24 Mar 2012 14:18:43 +0000 (14:18 +0000)]
Added iOS compatibility.

Put MacOS-specific code in #ifdef blocks so that it is not compiled for
iOS. Add iOS implementation for MacOS-specific code, where possible.

Change-Id: I3664c76fcfa8d5497ad1db676b9331e4ae0dca0e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdded iOS compatibility.
Qt4iOS [Sat, 24 Mar 2012 14:15:29 +0000 (14:15 +0000)]
Added iOS compatibility.

Modified OpenGL header inclusion block to support iOS GL include paths.
Removed ability to build for MacOS with GLES2, as no support on MacOS
for OpenGLES.

Change-Id: I2bcf302278545147632b23a86380fa3980ec10a4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdded iOS compatibility.
Qt4iOS [Sat, 24 Mar 2012 14:12:43 +0000 (14:12 +0000)]
Added iOS compatibility.

Put MacOS-specific code into #ifdef blocks to enable compilation on iOS.

Change-Id: I0bb3846f457d1b3a56d99fe182b1718bc8429117
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQDoc: Fix infinite loop when finding items in ditamaps.
Casper van Donderen [Thu, 12 Apr 2012 08:11:59 +0000 (10:11 +0200)]
QDoc: Fix infinite loop when finding items in ditamaps.

Change-Id: Ic033676e21a252db07543fccba0d2a41f4b52294
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoPrevent warning when using QPainter on a QGLWidget.
Samuel Rødal [Thu, 12 Apr 2012 07:39:24 +0000 (09:39 +0200)]
Prevent warning when using QPainter on a QGLWidget.

Prevents warning "QOpenGLContext::swapBuffers() called without
corresponding makeCurrent()".

Change-Id: I7e4f94df8654f899c25b3f41cbf4d007ca293f16
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoImplement modality in the Windows plugin.
Friedemann Kleint [Thu, 29 Mar 2012 10:55:12 +0000 (12:55 +0200)]
Implement modality in the Windows plugin.

Disable blocked windows and flash the active window if
a blocked one is activated (as in Qt 4).

Change-Id: I6b6d230f94a271ce2aa649e3f4e13ebd63e93da4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agotest: Re-enabling tst_QScrollBar::task_209492() on Mac
Sergio Ahumada [Wed, 11 Apr 2012 18:08:29 +0000 (20:08 +0200)]
test: Re-enabling tst_QScrollBar::task_209492() on Mac

This test has been XPASS'ing since a long time now.

Change-Id: Ibfcd1b5078e0b8efed9ed0740a4238d24ef8ca33
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years ago__builtin_unreachable was added to GCC in version 4.5, so fix macros
Thiago Macieira [Thu, 12 Apr 2012 18:40:00 +0000 (15:40 -0300)]
__builtin_unreachable was added to GCC in version 4.5, so fix macros

Change-Id: Ida63bb46f696ae9d60331d863bf1478415a08ff2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoUse the new udev based framework for detecting graphics cards.
Hannu Lyytinen [Thu, 12 Apr 2012 12:15:26 +0000 (15:15 +0300)]
Use the new udev based framework for detecting graphics cards.

Get rid of hard coded device node and support any number of graphics
cards.

Change-Id: I50f07fb1e6ea321a4ae751db8fb49ab439dce51e
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoImplement basic bits for device autodetection via udev.
Hannu Lyytinen [Thu, 12 Apr 2012 12:09:52 +0000 (15:09 +0300)]
Implement basic bits for device autodetection via udev.

The graphics cards and eventually the input devices need to be resolved
via udev. This commit adds a listener class and an abstract base class
for writing device specific handlers.

Change-Id: I62784c98bc7ad4bc1431d61cd5f13c8b48edf330
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agodevice: Introduce hooks for the directfb plugin and use them
Holger Hans Peter Freyther [Fri, 16 Mar 2012 21:50:30 +0000 (22:50 +0100)]
device: Introduce hooks for the directfb plugin and use them

The EGL integration is vendor specific, add platform hooks to the
DirectFB plugin and implement them for the Broadcom 97425. The hook
interface is internal and there are no ABI/API gurantees.

Change-Id: I33359830c51f16895e771837fccb71e03c81cf18
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agomoc: fix compilation of signals returning pointers.
Olivier Goffart [Wed, 11 Apr 2012 12:10:12 +0000 (14:10 +0200)]
moc: fix compilation of signals returning pointers.

That was a regression introduced in 1c5db1aff

Example:
  signals: int *someSignal();
would produce this code:
   int* _t0 = int*();
which does not compile

So have special handling for pointer to change it to '= 0'

Change-Id: Ie695e15e309d15c3cfd5c5a69ac8bf6d61ae9915
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoRemove Q_CORE_EXPORT from the simple QFlag and QIncompatibleFlag
Thiago Macieira [Wed, 28 Mar 2012 19:54:52 +0000 (16:54 -0300)]
Remove Q_CORE_EXPORT from the simple QFlag and QIncompatibleFlag

Change-Id: I0302238e817fc7d3b4682c5cc4f9cb51d181a7d2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove QFlags to qflags.h
Thiago Macieira [Wed, 28 Mar 2012 19:54:15 +0000 (16:54 -0300)]
Move QFlags to qflags.h

This is a verbatim copy of the source code.

Change-Id: I1f7efc75cad1ba05dda31d8ccfd091ae9ae40fd5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix compiler warning in evdevmouse plugin.
Friedemann Kleint [Thu, 12 Apr 2012 07:01:45 +0000 (09:01 +0200)]
Fix compiler warning in evdevmouse plugin.

Change-Id: I3b203b485079ff2cc96044789b06525ab2cde448
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix MinGW warning about qDebug() formats.
Friedemann Kleint [Thu, 12 Apr 2012 14:50:52 +0000 (16:50 +0200)]
Fix MinGW warning about qDebug() formats.

Change-Id: I927d17240a7cc7b88814601b0711aa46ca166ff9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agotest: marked tst_qlocale as insignificant on Windows
Rohan McGovern [Fri, 13 Apr 2012 05:14:35 +0000 (15:14 +1000)]
test: marked tst_qlocale as insignificant on Windows

This test hangs 2-3% of the time.

Task-number: QTBUG-25284
Change-Id: I32e01696262be2de7e015b8f811d1666551426cc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoApply Qt config option "-no-largefile" to SQLite make process
Sergey Gusarov [Thu, 12 Apr 2012 15:15:15 +0000 (19:15 +0400)]
Apply Qt config option "-no-largefile" to SQLite make process

This patch fixes compilation error if there is no
64 bit support in compiler.

Task-number: QTBUG-15395
Change-Id: Ife4afb05491d36af93bf4ad3ba8fa227710655f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDo not ignore tests/auto/corelib/io/qtextstream on Mac OS X
Bradley T. Hughes [Thu, 12 Apr 2012 13:55:20 +0000 (15:55 +0200)]
Do not ignore tests/auto/corelib/io/qtextstream on Mac OS X

This test no longer fails, so we can remove CONFIG+=insignificant_test

Task-number: QTBUG-22767
Change-Id: If3ca194fc982ad8fdc3e9a7f62fc346190ff01ea
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoDo not ignore tests/auto/corelib/io/qiodevice on Mac OS X
Bradley T. Hughes [Thu, 12 Apr 2012 13:50:26 +0000 (15:50 +0200)]
Do not ignore tests/auto/corelib/io/qiodevice on Mac OS X

This test no longer fails, so we can remove CONFIG+=insignificant_test

Task-number: QTBUG-22766
Change-Id: I379873d5c483157e414201e5f8a13c3f4407f9fd
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoDo not ignore tests/auto/corelib/io/qfile on Mac OS X
Bradley T. Hughes [Thu, 12 Apr 2012 13:34:24 +0000 (15:34 +0200)]
Do not ignore tests/auto/corelib/io/qfile on Mac OS X

This does not fail anymore, remove CONFIG+=insignificant_test

Change-Id: I4f98cfad563adfa460910976317c91e852db6872
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agofixed compiling of QDnsRunner for wince and windows desktop
Bjoern Breitmeyer [Thu, 12 Apr 2012 08:35:40 +0000 (10:35 +0200)]
fixed compiling of QDnsRunner for wince and windows desktop

ce only has the utf16 variant desktop has all variants
of the DnsQuery call. Unified it to the utf16 variant.

Change-Id: Ic126c3f53da71c85a41a5c24c85970335700bcf0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix autotest failures in QAbstractNetworkCache
Shane Kearns [Thu, 12 Apr 2012 16:28:37 +0000 (17:28 +0100)]
Fix autotest failures in QAbstractNetworkCache

The cache expiration calculation was previously removed to avoid
calculating it every time an object is fetched from the cache.
This is because the expiration date is calculated from max-age or
expires headers when the object is added to the cache.

However this broke the case where the server only provides a
last-modified header. In this case, the expiration date needs
to be checked at fetch time in order to add the warning if the
object is >24h old.

Change-Id: Iad381da0f91c27ac603abbaa94f268700ad2297f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd OS version detection for windows 8
Shane Kearns [Wed, 11 Apr 2012 14:16:09 +0000 (15:16 +0100)]
Add OS version detection for windows 8

Based on consumer preview, the internal version is 6.2

Change-Id: I9d6ff6c7614f46a20d489e8a8f4aefeb60c547f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix possible crash issue when testing the state of a QAccessibleMenuItem
Yan Shapochnik [Wed, 11 Apr 2012 19:02:49 +0000 (15:02 -0400)]
Fix possible crash issue when testing the state of a QAccessibleMenuItem

The owner widget of a QAccessibleMenuItem may be NULL. Checking for a valid pointer before dereferncing.

Port of Qt 4 patch.

Change-Id: Ic3149ccc5d6ae0ebc83dae58163ae2f60397fd28
(cherry picked from commit 3f526366af14f6c640dd52cd089b00776ab06731)
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoRemove hasDirtyFromPreviousSync from backingstore.
Girish Ramakrishnan [Thu, 12 Apr 2012 05:42:41 +0000 (22:42 -0700)]
Remove hasDirtyFromPreviousSync from backingstore.

It's always false (used to be some qws specific variable).

Change-Id: I3dc185dba4c778797f180410ce8d293336ecfd9c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMove QSurface destructor to qsurface.cpp
Girish Ramakrishnan [Wed, 11 Apr 2012 23:59:39 +0000 (16:59 -0700)]
Move QSurface destructor to qsurface.cpp

fa0407bdb50262f8748e955cf698181cc6906542 moved all QSurface code to
a separate except the destructor.

Change-Id: I2bf426a0b70cbffafae7aca8dd5550192f762aeb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoremove references to qws from backingstore
Girish Ramakrishnan [Thu, 12 Apr 2012 05:38:15 +0000 (22:38 -0700)]
remove references to qws from backingstore

The backingstore code is already hard to read as-is. Let's
simplify things by removing qws code.

Change-Id: Ibefd3ea17d29970d1f7348461959fdc5b01c1f42
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove redundant platformNativeInterface()
Girish Ramakrishnan [Thu, 12 Apr 2012 02:31:39 +0000 (19:31 -0700)]
Remove redundant platformNativeInterface()

platformNativeInterface() is already defined in QGuiApplication.

Change-Id: Ice720fb6f7e4b01c4627219d66a5a3c8980a79a5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove QWidget::setWindowHandle
Girish Ramakrishnan [Thu, 12 Apr 2012 02:42:54 +0000 (19:42 -0700)]
Remove QWidget::setWindowHandle

It's unused. The window (QWidgetWindow) is created and managed implicitly
by QWidget.

Change-Id: I28ee3f120a99c877f318e1abd7d73c9f3e542d03
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove a Qt 5 to-do comment that will not be addressed.
Jason McDonald [Wed, 11 Apr 2012 16:15:57 +0000 (02:15 +1000)]
Remove a Qt 5 to-do comment that will not be addressed.

Task-number: QTBUG-25102
Change-Id: I3fe1878adcf17cb95209df271d062e126e32a8fd
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove Qt 5 to-do comment that will not be addressed.
Jason McDonald [Wed, 11 Apr 2012 14:44:29 +0000 (00:44 +1000)]
Remove Qt 5 to-do comment that will not be addressed.

Task-number: QTBUG-25093
Change-Id: Ib78cffe06f721371ff5c16e24db3abae6dcd4984
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoqss: fix parsing of icon style hints
Girish Ramakrishnan [Thu, 12 Apr 2012 05:06:05 +0000 (22:06 -0700)]
qss: fix parsing of icon style hints

Use cssIconValueToIcon (see 5a0eb4e768435b9ce32b074e620fca33be4df2fb) to
retrieve the QIcon value from the css parser.

Task-number: QTBUG-25120
Change-Id: Ie7c6691514a4b35d416ca09ccf7966689de831c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQRegularExpression: optimize global match
Giuseppe D'Angelo [Sat, 7 Apr 2012 00:08:58 +0000 (01:08 +0100)]
QRegularExpression: optimize global match

PCRE doesn't like illegal Unicode sequences (it's explicitely
documented in pcreunicode(3) that they trigger undefined behaviour,
and the program may crash). Therefore, we always let PCRE check
the validity of both the pattern and the subject string.

However, when performing global matching, the subject string
can be checked only once: subsequent matches can safely skip the check
and avoid a huge performance hit of scanning the whole subject
string for each match (!).

This patch implements that behaviour internally -- it's still
not possible for the user to skip the sanity check. On large
subject strings, this gives a terrific performance benefit.

Change-Id: Ia44cf18782e07966c9cd6ec4ccfef081ed131763
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSupport more scaling factors for JPEG decompression
John Brooks [Wed, 11 Apr 2012 04:52:49 +0000 (22:52 -0600)]
Support more scaling factors for JPEG decompression

Since libjpeg 7, decompression scaling factors of [1,16]/8 have
been supported. Upscaling is slower, but using the entire range
of downscaling factors is significantly faster for sizes between
the power-of-two factors.

Time to decompress a 5184x3456 image and scale to 1900x1200,
slightly less than 3/8ths, changes from 251ms to 203ms.

libjpeg versions prior to 7 will round up to the next largest
factor they support, and continue to work as before.

Change-Id: I00a0655df2ef057e739927a643bfe0b0cabd5602
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: aavit <qt_aavit@ovi.com>
12 years agoCompute overshoot condition before snap points
Alberto Mardegan [Sun, 18 Dec 2011 17:12:42 +0000 (19:12 +0200)]
Compute overshoot condition before snap points

Snap points are not needed if the overshoot condition is met; therefore,
move the overshoot handling before the computation of snap points.

Change-Id: I37556b10c1b1124eaed53b0f2a330085acf70776
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix QScroller diagonal scrolling
Alberto Mardegan [Sun, 18 Dec 2011 17:19:29 +0000 (19:19 +0200)]
Fix QScroller diagonal scrolling

Compute the time needed for the scrolling operation before computing the
movement on the X and Y components. This ensures (except when
overshooting or snapping to snap points) that the scrolling on the X and
Y components takes the same time. That is, scrolling occurs always along
a straight line.

Task-number: QTBUG-23227
Change-Id: Ic3b78b8611dbcbf19711c3dd96485a0d53accaed
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoRefactor navigator event handling
Kevin Krammer [Tue, 10 Apr 2012 09:26:12 +0000 (11:26 +0200)]
Refactor navigator event handling

Separate PPS based navigator event notification handling and implementation
of the actual event handling.

Like the similar refactoring for screen events, this will allow to reuse the
same event handler class for BPS driven event processing.

Change-Id: I29d4a082cb01ff7943b7822ea9aa8ad622fda593
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoBuild manual tests.
Friedemann Kleint [Thu, 12 Apr 2012 10:56:20 +0000 (12:56 +0200)]
Build manual tests.

Add a toplevel manual.pro and other .pro-files to build them and
fix the build.

Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoQDoc: Generate missing image error.
Casper van Donderen [Thu, 12 Apr 2012 11:50:54 +0000 (13:50 +0200)]
QDoc: Generate missing image error.

Change-Id: I98faf3b3422fa0a7ebd3f65c7ba64e6dc31bad86
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoUse Clang by default on Mac OS 10.8 and above.
Morten Sorvig [Wed, 28 Mar 2012 11:27:14 +0000 (13:27 +0200)]
Use Clang by default on Mac OS 10.8 and above.

Change-Id: Ieaf65a86f2a0ccc5dac007030ea345ce6ccc7185
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFixes a regression; missing cursor blink when input mask is set.
Andreas Aardal Hanssen [Sun, 8 Apr 2012 09:58:30 +0000 (11:58 +0200)]
Fixes a regression; missing cursor blink when input mask is set.

I can't say for sure why q*linecontrol passes an empty rect to
the updateNeeded() signal when an input mask is set; presumably
the empty rect at some point has meant "full update", but there
are a few problems with this. Surely a full update is wrong,
even if the semantics have been lost in translation somewhere
(likely the qlinecontrol refactoring). This fix ensures
that empty rects from updateNeeded() are interpreted as a request
to update the whole widget. A further improvement would be to
ensure the line control doesn't request a full update when an
input mask is set. The cursor is usually wider when a mask is
set but because of QLineEdit::paintEvent()'s implementation,
there is currently a mismatch between the cursor width as seen
by q*linecontrol and what is actually drawn, which causes
rendering artifacts if updateNeeded() sends the cursorRect().

Since QLineEdit and Q*LineControl aren't actively developed, it's
best to keep this fix minimal, although the performance cost of
updating the whole line edit when an input mask is set is
unfortunate.

Task-number: QTBUG-7174
Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoSuppress warnings caused by ignoring chdir retval
Girish Ramakrishnan [Thu, 12 Apr 2012 00:35:47 +0000 (17:35 -0700)]
Suppress warnings caused by ignoring chdir retval

Using g++ 4.6.1, we get warnings like below:
qprocess_unix.cpp:1376:69: warning: ignoring return value of
‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result]

g++ is pretty adamant and prints the warning even if you explicitly
ignore using (void). So, just check for error and print a warning.

Change-Id: Ifd6f3b6bb9e17d44aa235815b06a762131ca8751
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCocoa: use specified window modality in native print dialogs
Bradley T. Hughes [Fri, 30 Mar 2012 08:11:48 +0000 (10:11 +0200)]
Cocoa: use specified window modality in native print dialogs

Don't pick the modality type based on the presences of a parent widget,
use QWidget::windowModality() instead. If modality hasn't been
specified, then use presence of the parent to chose an appropriate
modality type.

Change-Id: Ib39c166ba3293174c55748f63222367e3e1c56bc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoRemove input plugins hard libudev dependency
Bhooshan Supe [Tue, 10 Apr 2012 17:57:38 +0000 (10:57 -0700)]
Remove input plugins hard libudev dependency

libudev extends the base functionality of these plugins but should not
be mandatory as it is missing on many embedded devices that still
actually require input devices (keyboard and/or mouse and/or
touchscreen) support

Change-Id: Ieeb949f1af5e774578f689a63f47a8c48f546ac1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agodevice: Add device support for Trident's Shiner
Bhooshan Supe [Tue, 10 Apr 2012 00:13:23 +0000 (17:13 -0700)]
device: Add device support for Trident's Shiner

Add mkspec for the Trident's Shiner platform to be used in conjunction
with the -device support in configure. This allows you to build Qt

Change-Id: I68d8e8eb78f073e98f72207e9c5de6a0da0ed35d
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agodevice: Add device support for STMicroelectronic's ST7108
Bhooshan Supe [Tue, 10 Apr 2012 17:02:13 +0000 (10:02 -0700)]
device: Add device support for STMicroelectronic's ST7108

Add mkspec for the STMicroelectronic's ST7108 platform to be used in
conjunction with the -device support in configure. This allows you
to build Qt with the application libraries provided by STM SDK 35.

Change-Id: I36aa174200f034ccd6ee285e3f8a8ffec99b3e70
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agodevice: Add device support for STMicroelectronic's ST7540
Bhooshan Supe [Wed, 11 Apr 2012 01:51:42 +0000 (18:51 -0700)]
device: Add device support for STMicroelectronic's ST7540

Add mkspec for the STMicroelectronic's ST7540 platform to be used in
conjunction with the -device support in configure. This allows you
to build Qt with the application libraries provided by STM SDK 36.

Change-Id: I4369b23b9a0c9063417e5cc71969f65e967e4019
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoRemove Qt 5 to-do comment that will not be addressed.
Jason McDonald [Wed, 11 Apr 2012 16:04:07 +0000 (02:04 +1000)]
Remove Qt 5 to-do comment that will not be addressed.

The suggested behavioural change had the potential to break existing
code, so the change won't be made for Qt 5.

Task-number: QTBUG-25119
Change-Id: Ie03271d12b21a800c998e073eeb9ca1cd03ffe19
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCocoa: Proper handling of mDelegate
Christoph Schleifenbaum [Tue, 10 Apr 2012 15:15:44 +0000 (17:15 +0200)]
Cocoa: Proper handling of mDelegate

mDelegate keeps the pointer to a QNSFontPanelDelegate, which reacts
on the NSFontPanel used by this dialog helper. It has to be created
before it can be used. On a read-only access, this has been fixed to
return a default-constructed value (like QFont()). For writing access
(like setting the font) the delegate was already created.

The same applies to mDelegate to QNSColorPanelDelegate respective.

Change-Id: I36b89c16d98db9275aa31d399fe094b1d56d800d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix ownership / lifetime of QCocoaNativeInterface
James Turner [Mon, 9 Apr 2012 13:23:45 +0000 (14:23 +0100)]
Fix ownership / lifetime of QCocoaNativeInterface

Change-Id: I21dd1e3186e0dbbc60294f807de0db6aad8b9eee
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoqmake vc(x)project generator: fix VC++ Express detection
Joerg Bornemann [Tue, 10 Apr 2012 16:46:06 +0000 (18:46 +0200)]
qmake vc(x)project generator: fix VC++ Express detection

If VC++ 2010 Express and VC# 2010 Express are installed, then the
installation path is written in two places into the registry.
We're now filtering detected installations with the same installation
path.

Task-number: QTBUG-24956

Change-Id: I401430e7aa81d96c523d8172d2a2e9d40ebdb3ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMerge "Merge commit 'qt-v5.0.0-alpha1'" into refs/staging/master
Rohan McGovern [Thu, 12 Apr 2012 02:15:02 +0000 (04:15 +0200)]
Merge "Merge commit 'qt-v5.0.0-alpha1'" into refs/staging/master

12 years agoMerge commit 'qt-v5.0.0-alpha1'
Marius Storm-Olsen [Wed, 11 Apr 2012 18:20:45 +0000 (13:20 -0500)]
Merge commit 'qt-v5.0.0-alpha1'

Change-Id: Iad20a9a374d7cf13b88e722b405cc5c2ddbc78ac

12 years agoFix tst_qtextedit and remove insignification.
Friedemann Kleint [Wed, 11 Apr 2012 14:36:11 +0000 (16:36 +0200)]
Fix tst_qtextedit and remove insignification.

- The crash on XCB can no longer be reproduced.
- Use QFINDTESTDATA instead of SRCDIR defines.
- Remove Windows CE specific profile section.

Task-number: QTBUG-20756
Change-Id: I6077b3a0daacb15ab440a90c7bda247aa3756fa5
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agofix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef]
Konstantin Ritt [Wed, 11 Apr 2012 14:33:22 +0000 (17:33 +0300)]
fix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef]

0xfdef-0xfdd0 is definitely 31 and not 15 :)
also fix all copy-pastes of this code (greping for '0xfdd0' helps ;)

Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoUpdate Qt 5 to-do comment in QDom.
Jason McDonald [Wed, 11 Apr 2012 08:45:57 +0000 (18:45 +1000)]
Update Qt 5 to-do comment in QDom.

The change discussed in the comment doesn't have to be done in a major
release if it isn't source-incompatible.

Task-number: QTBUG-25103
Change-Id: I50036ab13611871ede01b7b7a17ce4c325476b00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMinimally resolve Qt 5 to-do's in QXmlSimpleReader
Jason McDonald [Wed, 11 Apr 2012 08:32:13 +0000 (18:32 +1000)]
Minimally resolve Qt 5 to-do's in QXmlSimpleReader

Task-number: QTBUG-25104
Change-Id: Ic5200e2671f60f314d68ef5b341073e04d690c00
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove insignification from tst_qgraphicsgridlayout.
Friedemann Kleint [Wed, 11 Apr 2012 14:53:49 +0000 (16:53 +0200)]
Remove insignification from tst_qgraphicsgridlayout.

Crash on XCB can no longer be reproduced.

Task-number: QTBUG-20756
Change-Id: I057231a397573f2a28a1325c6d6f728735ebbee6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRemove Qt 5 to-do comments from qgraphicslayoutitem.h.
Jason McDonald [Wed, 11 Apr 2012 14:21:42 +0000 (00:21 +1000)]
Remove Qt 5 to-do comments from qgraphicslayoutitem.h.

Neither of these comments will be actioned for Qt 5: the first because
would be source-incompatible with Qt 4, the second becuase it would be
a significant behavioural change.

Task-number: QTBUG-25090
Change-Id: I5f8f7cce3007c3188b2f0184138fa8e55a165654
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMinor doc fix - show -> hide in QWindow::hideEvent()
Julian de Bhal [Fri, 30 Mar 2012 00:11:54 +0000 (10:11 +1000)]
Minor doc fix - show -> hide in QWindow::hideEvent()

Change-Id: I91c5b7f7b688c4f99c6a364692fd96603a38c9bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoconfigure: add -pkg-config option to control pkg-config usage
Girish Ramakrishnan [Wed, 4 Apr 2012 22:02:11 +0000 (15:02 -0700)]
configure: add -pkg-config option to control pkg-config usage

Currently, for host builds, pkg-config usage is autodetected based
on it's availability in the mkspec or the PATH. For xcompile builds,
pkg-config is disabled unless -force-pkg-config is passed.

-force-pkg-config is poorly named since it doesn't reflect the fact
that it applies only to xplatform builds. It is in fact the only way to
enable pkg-config in xcompile builds. And when passed, it doesn't actually
force anything since all it does is check env variables. To add to the
confusion, it prints a warning even if the env variables are setup correctly.

This patch remedies the situation. It adds (-no)-pkg-config. The flag works
for both host and xcompile builds.

By default, the value is 'auto'. In this mode, it will try try to detect pkg-config
from the path. If found, it will be used. For xcompiled builds, we use some heuristics
to determine if the pkg-config is actually usable:
1. if -sysroot is not set and the environment variables PKG_CONFIG_LIBDIR or
    PKG_CONFIG_SYSROOT_DIR are not set, we disable pkg-config.
2. if -sysroot is set, then we setup PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR
   automatically (provided $SYSROOT/usr/lib/pkgconfig exists).

If the value is 'yes', configure will error if it's heuristics fail to detect a usable
pkg-config.

If the value is 'no', pkg-config usage is disabled.

If the value is 'force', configure will skip it's heuristics and use pkg-config anyway.
This mode is useful, for example, when compiling for 32-bit on 64-bit systems.

This change also removes references to PKG_CONFIG_SYSROOT (PKG_CONFIG_SYSROOT_DIR
is the correct environment variable).

Change-Id: I07fc8d48603c65a60de0336fc6276e90fcb41430
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoPropagate window state changes to QWidget.
Friedemann Kleint [Wed, 11 Apr 2012 10:07:59 +0000 (12:07 +0200)]
Propagate window state changes to QWidget.

Apply the state in QWidgetWindow and send an event to
the widget unless the code is triggered by
QWidget::setWindowState().

Change-Id: Ibf2f4e730384e41636841b9216eecfdff35b7bcb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoXCB: Compress window state change events.
Friedemann Kleint [Tue, 10 Apr 2012 11:52:12 +0000 (13:52 +0200)]
XCB: Compress window state change events.

- Avoid sending Window State change events from
  WM_STATE/NET_WM_STATE changes irrelevant to Qt::WindowState.
- Introduce QFlags for the NetWmState getter and setter to
  avoid passing QVector<> around.

Change-Id: I74730928c7fffca0fa1cab3b90ded90b06304c06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQWidget: allow modal top-levels to have WA_DontShowOnScreen
Bradley T. Hughes [Fri, 30 Mar 2012 07:53:12 +0000 (09:53 +0200)]
QWidget: allow modal top-levels to have WA_DontShowOnScreen

If a modal top-level widget has WA_DontShowOnScreen set, we need to call
QGuiApplicationPrivate::showModalWindow() and hideModalWindow()
ourselves, since we will not be calling QWindow::setVisible() (which
would normally do the call for us).

Change-Id: I1b22dd177c5956a2290f3ee031c95ab50d88f153
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdd tst_QGuiApplication::modalWindow()
Bradley T. Hughes [Wed, 4 Apr 2012 18:41:50 +0000 (20:41 +0200)]
Add tst_QGuiApplication::modalWindow()

This tests that modalWindow() returns the expected value and that
QEvent::WindowBlocked and QEvent::WindowUnblocked are sent correctly
when modal windows are hidden and shown.

Change-Id: I872f35e0240c928566ab35fa5764fad6cfda6db6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImplement window modality in QtGui
Bradley T. Hughes [Wed, 28 Mar 2012 13:26:17 +0000 (15:26 +0200)]
Implement window modality in QtGui

QWindow already has windowModality() and setWindowModality() as part of
its API from commit 516f4e283ba4626d7239630397ef867ab0366071. Platform
plugins can use this already to setup modality hints on windows that
they create, but it's not enough to implement modality fully.

QGuiApplication gets a modalWindow() static method, which is similar to
QApplication::activeModalWidget() in that it returns the last modal
window to be shown.

The modal window "stack" moves from QApplicationPrivate to
QGuiApplicationPrivate. The enterModal*() and leaveModal*() functions in
QApplicationPrivate are removed and replaced by
QGuiApplicationPrivate::showModalWindow() and hideModalWindow(), which
are called by QWindow::setVisible() just before calling
QPlatformWindow::setVisible().

The virtual QGuiApplicationPrivate::isWindowBlocked() will tell us if a
window is blocked by a modal window (and tell which modal window for any
interested callers). The default implementation works on the QWindow
level. QApplicationPrivate reimplements isWindowBlocked() and adds popup
and WA_GroupLeader support.

QGuiApplication uses the state set from isWindowBlocked() to block
user-input events: mouse press, mouse move, mouse release, wheel, key
presses, key releases, enter/leave events, close events, and touch
begin, update, and end events.

Note also that the modality helper functions in QtWidgets and
QApplicationPrivate are left in place and working as they always have.
The behavior of QWidget in the presence of modal windows/dialogs should
not change.

Change-Id: I2c89e6026d40160387787a6e009ae1fdc12dfd69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoDon't crash when comparing values containing empty arrays/objects
Lars Knoll [Thu, 5 Apr 2012 09:35:09 +0000 (11:35 +0200)]
Don't crash when comparing values containing empty arrays/objects

Task-number: QTBUG-25164

Change-Id: I1fa00e359ef3583b9a7136bb888cdf5e1c3e75ac
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
12 years agoQDoc: Fix no-examples option.
Martin Smith [Wed, 11 Apr 2012 13:25:59 +0000 (15:25 +0200)]
QDoc: Fix no-examples option.

This was accidentally removed in the big change regarding searching in
the internal QDoc tree.

Change-Id: I2496d7497d239f1ec5fbd01be6a918c1ef29fc95
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoqdoc: Fixed to report read-only QML properties correctly
Martin Smith [Wed, 11 Apr 2012 10:50:22 +0000 (12:50 +0200)]
qdoc: Fixed to report read-only QML properties correctly

Now the default for a QML property is writable. If qdoc
can't detect the actual read-only status, writable is
assumed. There were some cases where qdoc could not
determine the actual read-only/writable status for a
QML property. In these cases, qdoc reported read-only
because the default was read-only, which was not optimal.

Change-Id: I55aeb2bedcde92a414f4d48a8d995e5e9dbca5da
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoQChar: optimize some methods a bit for general case
Konstantin Ritt [Tue, 10 Apr 2012 20:36:21 +0000 (23:36 +0300)]
QChar: optimize some methods a bit for general case

by reordering and regrouping conditions so that they lead to result earlier
in most-common usecases (l.letters, spaces and puncts, u.letters, other);
there are no title cased letters in range [0..127] -> use this in isTitleCase();
test for 0xa0 (nbsp) early in isSpace() as it is quite common in HTML, etc.;
add early test to isNumber().

Change-Id: Ib415f34cb1212d9ccf8753de2d1beaece1aa2243
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoUse windows API to update missing CA roots
Shane Kearns [Fri, 23 Mar 2012 11:01:42 +0000 (11:01 +0000)]
Use windows API to update missing CA roots

Windows ships with a minimal set of CA roots.
When using windows API to verify a certificate, it will fetch the
root certificate from windows update (assuming it is part of the
Microsoft trust program).

As we are using openssl, this does not happen transparently.

If SSL errors occur which indicate a broken chain then attempt
to fix it using the windows API before emitting sslErrors.

If the system CA certs are not in use (a CA bundle has been set
on the socket or as the global configuration), then this is skipped.
This is so an application can continue to use its own cert bundle
rather than trusting the system certs.

Key usage is specified, so that windows will return not trusted
status if the root is not suitable for SSL (server auth or
client auth OID).

Testability:
 - to test, must delete the CA cert(s) from the "third party
   root certification authorities" section of the cert store
   using mmc.exe.
 - If the workaround of installing the windows XP cert bundle was
   performed, then you also need to delete certs from the "trusted
   root certification authorities" section.
   This is dangerous, be careful not to delete the required
   certificates which are documented on MS website
 - Naturally, modifying these areas of the cert store requires
   elevated privilege.

Task-number: QTBUG-24827
Change-Id: I5cfe71c8a10595731f6bbbbabaaefa3313496654
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoModified project files to be iOS compatible.
Qt4iOS [Sat, 24 Mar 2012 14:00:56 +0000 (14:00 +0000)]
Modified project files to be iOS compatible.

Removed some MacOS source code files from iOS build. Use unix standard
paths for now (iOS-specific implementation will come later).

Change-Id: I8b2731b431b3a379a1ec4ec07d227e886209e3e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoAdd support for QPlatformNativeInterface.
Hannu Lyytinen [Wed, 11 Apr 2012 06:41:21 +0000 (09:41 +0300)]
Add support for QPlatformNativeInterface.

Initial bits to enable figuring out the EGL display and context.

Change-Id: I4b578e356dceb40b4456f0590d32c8df1f51fa53
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoUse correct framebuffer object.
Hannu Lyytinen [Tue, 10 Apr 2012 17:29:33 +0000 (20:29 +0300)]
Use correct framebuffer object.

KMS plugin deals with FBO IDs not equal to zero (the default FBO),
so return the correct ID.

Change-Id: I904fc0b8d732f856b4526bd7f73cc48c358c8441
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoRelease the EGL context after initialization.
Hannu Lyytinen [Tue, 10 Apr 2012 17:10:03 +0000 (20:10 +0300)]
Release the EGL context after initialization.

Threaded applications like qmlscene could not bind the EGL context if
the context is already bound in the other thread.

Change-Id: Ia75ef9e76ebff48aa2c9b348101ab2f388e18c5e
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>