profile/ivi/qtbase.git
12 years agoDocument the new connection syntax
Olivier Goffart [Thu, 10 Nov 2011 11:17:53 +0000 (12:17 +0100)]
Document the new connection syntax

It is already documented in the QObject API documentation, but
Also update the overview

Change-Id: I92f44a50222738530928e3f4e6e463b3210d3a29
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMac Core Text font database for QPA
Jiang Jiang [Tue, 15 Nov 2011 12:59:36 +0000 (13:59 +0100)]
Mac Core Text font database for QPA

Add Core Text fontdatabase for Mac and use it as default. It also
reenabled Core Text font engine for native font rendering on Mac,
though it's not used in declarative UI (by default declarative
will still use scenegraph, which will only use this font engine
for retrieving font metrics and outlines).

With the new fontdatabase it's now possible to load all the fonts
installed in the system as well as adding application fonts.

Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFix sqlite driver memory eating due to close failure
Honglei Zhang [Tue, 29 Nov 2011 11:00:16 +0000 (13:00 +0200)]
Fix sqlite driver memory eating due to close failure

If an ongoing query is not finalized before close function is
called, sqlite driver still tries to close the connection to
sqlite. In this case, sqlite reports an error to sqlite driver
which is not reported to the client. The failure in close causes
connection to sqlite unclosed and memory is not freed. This
fix tries to finalize all queries before close function is called.
The close function should succeed.

Task-number: QTBUG-16967
Change-Id: I2f10a2a9017446a9d44b693b00464a89625e3602
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoInclude qglobal.h first in qnsview.mm compilation unit.
Zeno Albisser [Tue, 29 Nov 2011 17:30:34 +0000 (18:30 +0100)]
Include qglobal.h first in qnsview.mm compilation unit.

If cocoa headers are being included first, this messes up
the defines MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED
when compiling with clang.

Change-Id: I07177d07a0ac7c5f7e72b04f42d6343e689e0d33
Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoFix casting. Casting is now done through the virtual interface_cast.
Jan-Arve Saether [Wed, 30 Nov 2011 08:48:51 +0000 (09:48 +0100)]
Fix casting. Casting is now done through the virtual interface_cast.

Change interface_cast to return void* to avoid using virtual
inheritance.
Get rid of the magic Q_ACCESSIBLE_OBJECT macro.

Change-Id: I94b824aef53f2ba657d39d406b387c8681d47ee4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agomkspec win32-msvc2003 moved to unsupported
Joerg Bornemann [Thu, 24 Nov 2011 09:59:42 +0000 (10:59 +0100)]
mkspec win32-msvc2003 moved to unsupported

Change-Id: Idabdd08a033f3e77dae2de21b6544f57893abd59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMoved integrationtests/* into other/
Jo Asplin [Fri, 25 Nov 2011 08:30:03 +0000 (09:30 +0100)]
Moved integrationtests/* into other/

Currently there seems to be no precise definition of what
an integrationtest is in the context of Qt testing.

To avoid confusion, the tests under integrationtests/ are
moved into other/ (which is effectively where we keep
tests that don't clearly fit into any other category).

Tests can be moved back into an integrationtests/ directory
at a later point, should an unambiguous definition be established.

Change-Id: I3bb289be2dc2aca11b51a8ce8fcc5942f06d6c5c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCleanup corelib autotests
Jason McDonald [Tue, 29 Nov 2011 06:37:01 +0000 (16:37 +1000)]
Cleanup corelib autotests

Remove references to the old bug tracker.  The data from the old bug
tracker is no longer accessible, so these markers are meaningless.

Change-Id: Ib9d029d52b70fd0a512b9532d65f03763eabfe57
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoBenchmark the new signal slot connection syntax.
Olivier Goffart [Fri, 25 Nov 2011 18:00:01 +0000 (19:00 +0100)]
Benchmark the new signal slot connection syntax.

 - Added emition of a slot connected using the new syntax, as well as a
   functor

 - Replaced the old connect_disconnect_benchmark by a new one. The old
   one was of little interest as it tried to connect to every signal,
   producing a lot of similar results.
   The new test tests different ways of connecting and disconnecting

Change-Id: I3c04c24027252308f8942bcd9562110104cdb4e9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix Qt::QueuedConnection when signal has a return value
Olivier Goffart [Tue, 29 Nov 2011 00:44:18 +0000 (01:44 +0100)]
Fix Qt::QueuedConnection when signal has a return value

For queued connections, the args[0] is set to null as it make no sens to
forward the return value to the signal.
So we need to check in the operator, that the pointer is not null.
(container.data is args[0])

Change-Id: I80bde66f1ec19de0f4962c80e5b2797d2819075c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix a deadlock in QMetaType.
Jędrzej Nowacki [Tue, 29 Nov 2011 09:07:38 +0000 (10:07 +0100)]
Fix a deadlock in QMetaType.

QMetaType should unlock all mutexes guarding custom types data before
calling an user code.

Task-number: QTBUG-22930
Change-Id: I501d011d6cbd467d8f22402d668e84aa848061b8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQByteArray: Fix MSVC warning.
Friedemann Kleint [Tue, 29 Nov 2011 10:58:57 +0000 (11:58 +0100)]
QByteArray: Fix MSVC warning.

Warning C4308: negative integral constant converted
to unsigned type.

Change-Id: Ibdb14ad2ceebd56715fda861151e92f6dc10f955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAccessible debug stream: don't print details for invalid objects
Frederik Gladhorn [Tue, 29 Nov 2011 12:25:37 +0000 (13:25 +0100)]
Accessible debug stream: don't print details for invalid objects

Print "invalid" instead of the details.

Change-Id: I785a896b680fad9e9bb81769d9e3361542fbaafe
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoSupport Qt::UniqueConnection in the new connection syntax
Olivier Goffart [Fri, 25 Nov 2011 21:35:32 +0000 (22:35 +0100)]
Support Qt::UniqueConnection in the new connection syntax

This commit also improves the related documentation a bit.

The test is copied from the test with the old syntax, but all the
connection statement are changed to use the new syntax

Change-Id: Ia5630ca4335b9f8ca6d724ae3c8750d6f0804d8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoReduce code dupplication in QObject::connect
Olivier Goffart [Tue, 29 Nov 2011 06:21:10 +0000 (07:21 +0100)]
Reduce code dupplication in QObject::connect

Move from each implementation of QObject::connect to
QObjectPrivate::addConnection the code that adds the
QObjectPrivate::Connection* to the sender's list.

Change-Id: I665af016d5e6673eb0e9c06965e5deed50454b28
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoInitialize the return value of signals
Olivier Goffart [Tue, 8 Nov 2011 23:11:30 +0000 (00:11 +0100)]
Initialize the return value of signals

Before, the constructor was called for complex objects, but
POD were left unitinialized. Now, they are zero-initialized.

Also add test for return values

Change-Id: Iff9bf6687589d7b7395a71fb6f650ab8aa2b6bd1
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQObject::disconnect with new syntax
Olivier Goffart [Fri, 18 Nov 2011 09:57:04 +0000 (10:57 +0100)]
QObject::disconnect with new syntax

This add an overload to disconnect which is symetrical to the new
syntax of connect.

It is possible to diconnect connection like this:

QObject::connect( sender, &Sender::valueChanged,
                  receiver, &Receiver::updateValue );
QObject::disconnect( sender, &Sender::valueChanged,
                     receiver, &Receiver::updateValue );

This overload only work with pointer to member function, and not static
functions or functors.

The test is copied from tst_QObject::disconnect(), just
changed the syntax of the connection and disconnection

Change-Id: Ia8f819100cb12098e32877522b97b732b1e676a8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoInstall CMake config files from Qt.
Stephen Kelly [Tue, 1 Nov 2011 13:59:23 +0000 (14:59 +0100)]
Install CMake config files from Qt.

This includes a BSD licenced file Qt5CoreMacros.cmake which is
adapted from Qt4Macros.cmake in the CMake source tree.

Change-Id: I54326b808795535490a0489659b351a8da72cdbb
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agomkspec win32-borland moved to unsupported
Joerg Bornemann [Thu, 24 Nov 2011 09:58:09 +0000 (10:58 +0100)]
mkspec win32-borland moved to unsupported

Change-Id: Ie34157318733a700214ff68708db8127644f65ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd deprecated headers support to syncqt
Kent Hansen [Fri, 25 Nov 2011 13:53:39 +0000 (14:53 +0100)]
Add deprecated headers support to syncqt

When renaming classes, or when moving classes from one module to
another, it's useful to have a simple way of supporting the old
API/location for some time. To this end, syncqt shall now recognize
a "deprecatedheaders" section in sync.profile. It looks like this:

%deprecatedheaders = (
    "QtDeclarative" => {
        "qquickcanvas.h" => "QtQuick2/qquickcanvas.h",
        "qquickitem.h" => "QtQuick2/qquickitem.h",
        "QQuickCanvas" => "QtQuick2/QQuickCanvas",
        "QQuickItem" => "QtQuick2/QQuickItem",
    }
);

In the above example, syncqt would generate a header called
qquickcanvas.h for the QtDeclarative module; when included, this
header will issue a warning and include <QtQuick2/qquickcanvas.h>.
And so on, for the other entries.

Deprecated headers are installed along with the module's normal
headers.

Change-Id: Ie2518b42275c2b2ff44216f07d376ccf5be6dc45
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoPrevented Xlib sequence errors in xcb plugin.
Samuel Rødal [Tue, 29 Nov 2011 09:16:57 +0000 (10:16 +0100)]
Prevented Xlib sequence errors in xcb plugin.

Prevent Xlib errors of the form
"Xlib: sequence lost (0x2716a > 0x1717c) in reply type 0x11!" from
being printed. We know the cause of these is because we're manually
calling the XESetWireToEvent handlers since those are not handled by
XCB, and this confuses Xlib since it's then seeing events with old
sequence numbers. We simply set the sequence number to the latest
sequence number and the errors go away.

Change-Id: I2a9e7a7cfd0ba8692e43ce61f796a8189305e0d3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
12 years agoRemove QPlatformPrinterSupport usage
Johannes Zellner [Mon, 28 Nov 2011 18:45:14 +0000 (19:45 +0100)]
Remove QPlatformPrinterSupport usage

QPlatformPrinterSupport seems to not exist anymore.

Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdded screenChanged() signal and handle screen destruction in QWindow.
Samuel Rødal [Mon, 28 Nov 2011 14:58:03 +0000 (15:58 +0100)]
Added screenChanged() signal and handle screen destruction in QWindow.

It can be useful to get a signal when the QScreen changes, for example
when having bindings to QScreen properties in QML.

Change-Id: I919dd12c656485b28b393aec5eedac4c01593afc
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoMake the default ssloptions testable.
Richard Moore [Sun, 27 Nov 2011 12:45:30 +0000 (12:45 +0000)]
Make the default ssloptions testable.

Centralise the specification of the default ssloptions to make the code
clearer and more testable.

Change-Id: I4f4bae72736dd063ee4cd64c6375e82d0600a105
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRedefinition of QVariant::Type.
Jędrzej Nowacki [Mon, 28 Nov 2011 09:33:50 +0000 (10:33 +0100)]
Redefinition of QVariant::Type.

QVariant::Type is redundant, it copies QMetaType::Type enum. In long
term it might be removed completely, but it wouldn't be a source
compatible change.

Change-Id: Ibe79ca0ab43918b4cf767cd7a5040f865abbf03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix linking of autotests on Windows.
Friedemann Kleint [Tue, 29 Nov 2011 07:49:23 +0000 (08:49 +0100)]
Fix linking of autotests on Windows.

Partial revert of 94fc8750797ffd3ef867d0cdc7849492cfee2c23. All dependent
modules need to be specified in the QT variable, except core and gui, which
are there by default.

Change-Id: Ie8ffed56de03a37da191772fa321ed162e44a50d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFix compilation of qeasingcurve autotest on Windows.
Friedemann Kleint [Tue, 29 Nov 2011 07:51:44 +0000 (08:51 +0100)]
Fix compilation of qeasingcurve autotest on Windows.

MSVC cannot decide on an overload for pow().

Change-Id: Ied3fbc0de403774d9f85738852cf671ce42cd1c1
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoTemporarily disable Windows-specific QPrinter autotest.
Friedemann Kleint [Tue, 29 Nov 2011 07:54:26 +0000 (08:54 +0100)]
Temporarily disable Windows-specific QPrinter autotest.

See QTBUG-22927.

Change-Id: I6022d795bf893797c2ab1a91ffffa7b482109137
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoQtGui: Fix a crash in OpenGL on Windows.
Friedemann Kleint [Tue, 29 Nov 2011 08:59:26 +0000 (09:59 +0100)]
QtGui: Fix a crash in OpenGL on Windows.

Add missing WINAPI calling convention for QOpenGLFunctions.

Change-Id: I43827d801c5ecc3859d8d4ba0bb9bccc108880e7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoconfigure.exe: Build tests by default.
Friedemann Kleint [Tue, 29 Nov 2011 11:00:17 +0000 (12:00 +0100)]
configure.exe: Build tests by default.

As does configure[.sh].

Change-Id: I5561d83a0c3959d6ae1efa5231cf2a149ad28377
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoFix compilation of some benchmark tests on Windows.
Friedemann Kleint [Mon, 28 Nov 2011 16:21:50 +0000 (17:21 +0100)]
Fix compilation of some benchmark tests on Windows.

Change-Id: Iab6b83f3d4693a3b5deaaf88043dde75a84866fd
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQtCore/IO: Fix some warnings on Windows (64bit).
Friedemann Kleint [Mon, 28 Nov 2011 15:02:50 +0000 (16:02 +0100)]
QtCore/IO: Fix some warnings on Windows (64bit).

- Warnings about conversion from size_t to int
- Unused variable.

Change-Id: I4a79fa6dc4b95551a64d282ae4307b0edff41201
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoV8/arm: Add relevant float defines
Kent Hansen [Mon, 28 Nov 2011 08:07:30 +0000 (09:07 +0100)]
V8/arm: Add relevant float defines

CAN_USE_VFP_INSTRUCTIONS implies arm7.
This is the only arm configuration we currently support.
These defines also ensure that a suitable snapshot is generated
when cross-compiling (i.e., when using the arm simulator).

Change-Id: I3a8a4224b9127a549b3987bcf5651ed1ffb8079a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove obsolete QMetaObject::activate() overloads.
Bradley T. Hughes [Mon, 28 Nov 2011 10:49:23 +0000 (11:49 +0100)]
Remove obsolete QMetaObject::activate() overloads.

The overloads taking a range were previously used for cloned signals
(ones that had default arguments). Commit
919b723088b8617b202b92d80b8d0983e4fd9500 changed how cloned signals are
handled, making the from,to overloads obsolete.

The 3 argument activate() overload that does not take a QMetaObject
argument was marked obsolete by the same commit, but considering that it
is used by our autotests, I've decided to keep it and not mark it as
obsolete anymore.

Change-Id: I631ce84dce156dec68cf26e10787cb35e3f50e18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoCleanup corelib autotests
Jason McDonald [Tue, 29 Nov 2011 02:53:30 +0000 (12:53 +1000)]
Cleanup corelib autotests

Don't name test functions using task identifiers from obsolete bug
trackers.

Change-Id: Iba6ae8ad3b39e365c5510ed5c86749a167572829
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed Qtbase OSX specific namespace compilation.
Toby Tomkins [Mon, 28 Nov 2011 01:33:08 +0000 (11:33 +1000)]
Fixed Qtbase OSX specific namespace compilation.

Change-Id: Idacfa679df7aa6417f8017f80928907830d15df2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix a small memory leak in QXcbIntegration.
Jędrzej Nowacki [Fri, 18 Nov 2011 09:05:25 +0000 (10:05 +0100)]
Fix a small memory leak in QXcbIntegration.

Prefer to use a smart pointer over a raw pointer.

Change-Id: If8b5cbef8767433eab2f82c14abaa9608b8e61d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix crash in tst_qatomicpointer test
Olivier Goffart [Fri, 25 Nov 2011 09:53:38 +0000 (10:53 +0100)]
Fix crash in tst_qatomicpointer test

if given char*, QCOMPARE will try to compare the strings pointed by the
char*

In this case, the char* just point to garbage, we just want to compare
the addresses.

(Was changed in commit 6fcfae99d3615c7a850e4933691763097078c8e4)

Change-Id: I9edb2b676aedf67a252aea6a41d56cd1eef7befc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix documentation for QVariant::Type enum.
Jędrzej Nowacki [Mon, 28 Nov 2011 11:15:09 +0000 (12:15 +0100)]
Fix documentation for QVariant::Type enum.

QPolygonF was missing. QPointArray doesn't exist anymore.

Change-Id: I764508f67d859c8519b44a6a1ee19d1f96ebe1cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix clang warning about bool to pointer conversion.
Jędrzej Nowacki [Thu, 17 Nov 2011 13:42:48 +0000 (14:42 +0100)]
Fix clang warning about bool to pointer conversion.

The operation is legal from C++ perspective but only for "false" as it
is guaranteed to be 0. Anyway returning 0 instead of "false" is
logical and it follows coding style used in the modified functions.

Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix linking of the QObject test under Windows.
Friedemann Kleint [Mon, 28 Nov 2011 15:29:41 +0000 (16:29 +0100)]
Fix linking of the QObject test under Windows.

Change-Id: Iced5a37893969f555f39d3f4683b32ca2a399365
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQtGui: Bring back HBITMAP/HICON conversion functions.
Friedemann Kleint [Mon, 28 Nov 2011 13:33:54 +0000 (14:33 +0100)]
QtGui: Bring back HBITMAP/HICON conversion functions.

- Move the conversion functions from the Lighthouse plugin
  to QtGui as qt_pixmap/From/To/HBITMAP/HICON().
- Re-enable them in Widgets (QFileIconProvider, QWindowsStyle).
- Use them in QtPrintSupport.

Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMake input events work for widgets on wayland
Jørgen Lind [Mon, 28 Nov 2011 14:04:37 +0000 (15:04 +0100)]
Make input events work for widgets on wayland

Wayland windows does not know about their position

Change-Id: Ia37dd0fe6e33073eeeba22c88da9bd4bcad5421f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoPolish the HelloWindow example.
Friedemann Kleint [Mon, 28 Nov 2011 10:32:39 +0000 (11:32 +0100)]
Polish the HelloWindow example.

- Add window menu (enabling the close button on Windows)
- Query threaded Open GL capability.

Change-Id: I938f154e242dba584e2f597ac44294ab5d3b7141
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd comment to the obscure initialization of QOpenGLFunctions.
Friedemann Kleint [Mon, 28 Nov 2011 10:20:02 +0000 (11:20 +0100)]
Add comment to the obscure initialization of QOpenGLFunctions.

Change-Id: I9386c0e3b158a675e2dcbce34eecb57edf0ac27b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqmake: Don't assume that GNUmake is able to resolve arbitrary dependencies
Tor Arne Vestbø [Wed, 23 Nov 2011 14:41:08 +0000 (15:41 +0100)]
qmake: Don't assume that GNUmake is able to resolve arbitrary dependencies

Extra compilers may define a depend_command that's used to generate
dependencies for each input. When GNUmake was enabled we failed to
run this command, which was affecting resource files, as resource
dependencies are handled by an extra compiler defined in resources.prf.

The result was that changes to resources included in a resources-file
did not trigger a re-run of qrc and subsequent recompile of the
resource object file.

We must always run these custom dependency commands, even when GNUmake
(and the extended gcc_MD_depends option) is enabled, as GCC is only able
to handle regular #include-type dependencies. Hence, the check for the
'include_deps' flag was removed from doDepends(), and the check for
GNUmake was moved to the one place where it still made sense -- when
deciding whether or not to do recursive dependency checking.

Change-Id: I5ddb75c873120c90f798808efc52e81500786301
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoRemove network module from widgets dependencies.
Stephen Kelly [Sat, 26 Nov 2011 16:39:52 +0000 (17:39 +0100)]
Remove network module from widgets dependencies.

QtWidgets does not depend on QtNetwork.

Change-Id: I50958033fd93a44be24c78fb5a20d7006b262b82
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoqmake: Allow extra compilers to have the makefile depend on its inputs
Tor Arne Vestbø [Thu, 24 Nov 2011 15:03:19 +0000 (16:03 +0100)]
qmake: Allow extra compilers to have the makefile depend on its inputs

And enable this configuration option for the resource compiler. This
results in a re-run of qmake whenever you touch a qrc file, which is
needed to keep the dependencies up to date. Otherwise you might end
up in the situation where you add a file to a qrc, edit the file some
time later, but a rebuild does not regenerate a cpp file and compile
that, so the final binary is stale.

Technically this dependency problem is present for all source files,
and qrc files are no different than any cpp file that you add a new
header #include to, or adding a Q_OBJECT macro to a header. To pick
up these changes we have to re-run qmake, so that qmake can run its
internal dependency checking, and any extra compiler dependency
commands.

The reason we're making this change for rcc files it that conceptually
people treat them as a "project" files, and expect them to behave similarly
to .pro or .pri files, in that editing the file will invalidate the
makefile. In practice this is often what happens when adding new
headers, as you touch the project file when changing the HEADERS
variable.

Task-number: QTBUG-13334
Change-Id: If69149678e7fba6d812d31dcc17877427f9a6122
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
12 years agoImproved failure messages from tst_qlibrary
Rohan McGovern [Thu, 24 Nov 2011 05:01:49 +0000 (15:01 +1000)]
Improved failure messages from tst_qlibrary

Use QVERIFY2 to include errorString() in the failure message.

Change-Id: Iecb4e7694c3d71bfb786908a6a6c26b187d60c8f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoFix sanity check of network test server
Jason McDonald [Fri, 25 Nov 2011 07:04:12 +0000 (17:04 +1000)]
Fix sanity check of network test server

Some of Qt's autotests depend on access to a test server.  For each test
that used the test server, tests/auto/network-settings.h created a
global object to verify at startup that host lookups to the test server
will succeed (and abort the test otherwise).

There are two problems with that approach:

First, the sanity check happens before main(), and thus before the test
framework has started logging test results.  This means that if the
sanity check aborts the test, the failure message will not be visible in
the test output if logging to a file or will cause the output to be
malformed if logging to the console in XML format.

Second, since Qt 4.7, the host lookup uses a class that connects to the
QCoreApplication instance, which doesn't exist before main(), and this
caused all tests that included network-settings.h to output an error
message from QObject::connect() at the beginning of the test.

Both of these problems are solved by removing the global object from
network-settings.h and instead performing the sanity check in the
initTestCase() function of each test.

Task-number: QTBUG-22876
Change-Id: Id49c1826906327bf571686cc11527f0265e5af44
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCorrect usage of network-settings.h.
Jason McDonald [Mon, 28 Nov 2011 02:02:52 +0000 (12:02 +1000)]
Correct usage of network-settings.h.

Four of the modified files only use functions from network-settings.h
on Windows, and the other three files don't use anything from that
header.

Change-Id: Ifa4b0319d14367735b859e538921fa0eeeccce1a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed QUnifiedTimer cleanup.
Kim Motoyoshi Kalland [Thu, 24 Nov 2011 17:09:04 +0000 (18:09 +0100)]
Fixed QUnifiedTimer cleanup.

When destroying QUnifiedTimer's instance, its default animation
driver is destroyed as well. This patch avoids creating another
QUnifiedTimer instance when the animation driver's destructor
calls QUnifiedTimer::instance().

Change-Id: I9cf254a9d04d79447baa8f27625c3890c3645f08
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoFix style. 4 spaces not 2.
Stephen Kelly [Thu, 24 Nov 2011 22:26:17 +0000 (23:26 +0100)]
Fix style. 4 spaces not 2.

Change-Id: I0a595557ad0cdff6fbb43b6812c57525dbd29526
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdd support to moc for registering non-local enums via Q_ENUMS.
Glenn Watson [Fri, 25 Nov 2011 01:58:37 +0000 (11:58 +1000)]
Add support to moc for registering non-local enums via Q_ENUMS.

When using the Q_ENUMS macro to register an enumeration in a class
with moc, it's now possible to provide a scoped enumeration that
exists in another class. This adds the enum class scope to
a metaobject's list of related classes stored in the extradata
field.

This allows the declarative code to handle non-local enums in
signal and slot functions that are exposed to QML.

Task-number: QTBUG-20639
Change-Id: I94f5292818095fda75762bd1508ba5c69de19503
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoUse Q_FOREACH in headers.
Stephen Kelly [Sat, 26 Nov 2011 17:07:03 +0000 (18:07 +0100)]
Use Q_FOREACH in headers.

Downstreams must be able to use QT_NO_KEYWORDS.

Change-Id: Ica75b348c1c9461750b5ae2426557ed8b9e2a8a1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoTest QAtomicPointer<const T>
Olivier Goffart [Fri, 25 Nov 2011 10:06:57 +0000 (11:06 +0100)]
Test QAtomicPointer<const T>

Commit f4b6628083bf98ffa9169d8a8b890d84b6046867 fixed it on windows.
Now test it work within QAtomicPtr

Change-Id: Ibf5c31a133d6d544a78ce626fac9085b73c97fd5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSSL certificate blacklist: reformat serial numbers to hexadecimal
Peter Hartmann [Wed, 23 Nov 2011 13:40:26 +0000 (14:40 +0100)]
SSL certificate blacklist: reformat serial numbers to hexadecimal

Since recently QSslCertificate::serialNumber() always returns the
hexadecimal format, so we need to adapt to that when checking the
serial numbers for the blacklisted certificates.

Change-Id: I43bdb1be77faad7ad79a835c896fc39477452e75
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoIntroduce QWindowSystemInterface::handleSynchronousCloseEvent
Gunnar Sletta [Fri, 25 Nov 2011 13:02:12 +0000 (14:02 +0100)]
Introduce QWindowSystemInterface::handleSynchronousCloseEvent

And use it from the Cocoa backend.

In general, for threaded GL rendering to work, any function that
affect the surface must be synchronous, so the implementor (such as
QQuickCanvas) can pick it up and block until the GL context has
released the surface. Otherwise, we will crash.

Change-Id: Id8484dac7452fe96fa80ade4ea321145f32124b4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFixed memory leak in windowing system event handling
Gunnar Sletta [Fri, 25 Nov 2011 12:28:12 +0000 (13:28 +0100)]
Fixed memory leak in windowing system event handling

processWindowSystemEvent does not delete the event, so
allocate it on the stack instead.

Change-Id: Iffda940ffc86ef1fabfbf101e08956fa07c49689
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoSSL: fix build when compiled with -openssl-linked
Peter Hartmann [Thu, 24 Nov 2011 12:15:18 +0000 (13:15 +0100)]
SSL: fix build when compiled with -openssl-linked

... and only resolve the functions when the methods are available.
SSL 2 functionality is not always available in OpenSSL anymore.

Change-Id: Ia3178685b26c67ac55447476789e06710b596181
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoMake QBasicAtomicPointer work with T=const (int|any type) on Windows
Jan-Arve Saether [Fri, 25 Nov 2011 12:28:40 +0000 (13:28 +0100)]
Make QBasicAtomicPointer work with T=const (int|any type) on Windows

Change-Id: I2301ea3fa399bcc5d6d8c6b487a3fb78db19c67a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoBe specific about what part of the model is being re-layouted.
Stephen Kelly [Thu, 24 Nov 2011 20:21:28 +0000 (21:21 +0100)]
Be specific about what part of the model is being re-layouted.

Change-Id: I6b6fe98929543447f945a335c33960823c0d1a4a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove the QApplicationBase define
Bradley T. Hughes [Mon, 21 Nov 2011 13:10:37 +0000 (14:10 +0100)]
Remove the QApplicationBase define

Use QGuiApplication instead, since QApplicationBase was unconditionally
defined to QGuiApplication anyway.

Change-Id: I9d0c96835693e5ca6218c330b2d243579a5b0b38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoChange default implementation of window() to just return 0
Jan-Arve Saether [Thu, 24 Nov 2011 14:33:29 +0000 (15:33 +0100)]
Change default implementation of window() to just return 0

Instead move the traversal up to the ancestors to the bridge.
This simplifies the default implementation to just return 0

Change-Id: Ic3ec60851f378587f4a23363aec2039d0e8a08a1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoQMetaTypeInterface: Fix warning about multiple default Constructors
Friedemann Kleint [Fri, 25 Nov 2011 08:54:18 +0000 (09:54 +0100)]
QMetaTypeInterface: Fix warning about multiple default Constructors

Change-Id: Ifc806d63a743c68ce830f44f14dd1434bbdbc40e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMake cocoa opengl backend threadsafe.
Gunnar Sletta [Thu, 24 Nov 2011 15:38:40 +0000 (16:38 +0100)]
Make cocoa opengl backend threadsafe.

The current implementation on Mac OS X called update() inside
the cocoa plugin from the GUI thread, which breaks when trying
to use the GL context from another thread and the window gets
resized. We now only call it from makeCurrent()

Change-Id: I025aad3a3b140e85e729816bf3b68827337cc80d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCleanup corelib autotests
Jason McDonald [Thu, 24 Nov 2011 07:34:51 +0000 (17:34 +1000)]
Cleanup corelib autotests

Bug trackers come and go, so using bug identifiers in function and test
case names will ensure that those names eventually become meaningless.
It is better to choose a meaningful name and provide explanatory
comments where appropriate.

Change-Id: I67c27782ef21b5d4eaab4854079a043c8ef6957b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMore tests for the new connection syntax.
Olivier Goffart [Wed, 9 Nov 2011 11:32:10 +0000 (12:32 +0100)]
More tests for the new connection syntax.

Those tests are the one from Thiago's C++0X implementation
The rvalue references ones are commented out because moc do not
understand them yet
But supporting them may come later.

Change-Id: I6b0720e7f2992be9f7e34770960fa58fa456a54b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd support for QueuedConnection when connecting using the new syntax
Olivier Goffart [Wed, 23 Nov 2011 14:03:04 +0000 (15:03 +0100)]
Add support for QueuedConnection when connecting using the new syntax

QMetaCallEvent now can handle a pointer to QSlotObjectBase

Change-Id: I94da1e68ce9bb1fd96a9ae013a389552eb625faa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoNew QObject connection syntax
Olivier Goffart [Wed, 23 Nov 2011 14:06:30 +0000 (15:06 +0100)]
New QObject connection syntax

In addition to the old connection syntax, you can now connect using function pointers.

    connect(sender, &Sender::valueChanged,
            receiver, &Receiver::updateValue );

You can connect also to functor or C++11 lambdas

The connections are now type safe (no more problems with namespaces
or typedefs).  Implicit type conversion is also supported.

The new syntax forces us to change the meaning of signal form
protected to public, in order to be able to access the signal's
address everywhere

The way it works is by introducing new overload of QObject::connect
that take function pointer as parametter. Those new overload are template
function, that are implemented inline. The actual implementation is
in QObject::connectImpl which take a QObject::QSlotObject* as parametter
for the slot.  That slot object contains a virtual function which call
the slot which has to be implemented in the header as it depends on the
template parametter.  So the internals of QObjectPrivate::Connection
will store this QObjectSlot* in order to be able to make the call.

You can read a full description here:
http://developer.qt.nokia.com/wiki/New_Signal_Slot_Syntax

History of commits before it was imported on gerrit:
https://qt.gitorious.org/~ogoffart/qt/ogoffarts-qtbase/commits/qobject_connect_ptr

Thread on the mailing list:
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000796.html
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-September/001248.html
(The discussions on the mailing list were about trying to find a
solution that do not need making signals public, but no user friendly
solution was found)

Note: support for QueuedConnection, and the symetric QObject::disconnect is
added in another commit.
Qt::UniqueConnection is not supported yet in the new overload.

Change-Id: I67d08436b0720e7f2992be9f7e34770960fa58fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoChange the return value of QObject::connect
Olivier Goffart [Fri, 11 Nov 2011 16:01:06 +0000 (17:01 +0100)]
Change the return value of QObject::connect

From a bool to a handle to to connection.

Also added a new overload of disconnect that disconnect a handle

This is required because with the new syntax taking lambda or functors,
it is the only way to disconnect a connection (as it is impossible to
compare functors)

The new return value is QMetaObject::Connection, it is a wrapper around
the internal QObjectPrivate::Connection.
QObjectPrivate::Connection is now reference counted.

tst_qglobal.cpp:
   This test set up an internal callback, and the callback do not set any
   proper connection handle (and tbh,  it would be hard for it to do so).
   So the returned QMetaObject::Connection is invalid, and ok is false
   (Internal callbacks are only used for jambi and should probably be removed)

Change-Id: I111626fb4f47efc4db5e2ea5bff9da15f08fea7b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoImproved usage of TESTDATA with relative paths beginning with ".."
Rohan McGovern [Thu, 24 Nov 2011 00:31:24 +0000 (10:31 +1000)]
Improved usage of TESTDATA with relative paths beginning with ".."

Support the common construct of a top-level test directory having
a test/test.pro with:

  TARGET = ../tst_sometest
  TESTDATA = ../data1.txt ../data2.txt

Prior to this change, the ".." in TESTDATA would cause the data to
break out of the test's installation directory.

Change-Id: I22860bf3a148f278b3f4e18b476fd151f7f0f775
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix navigate returning invalid pointer.
Frederik Gladhorn [Thu, 24 Nov 2011 13:01:57 +0000 (14:01 +0100)]
Fix navigate returning invalid pointer.

Navigate would return a random pointer here when asked for example for
not handled relations (label etc).

Change-Id: Iec4de94e6f76f14e89b43fe7327d98878aad58ee
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoRemoving unnecessary hidden property "_q_user-agent".
Jonas M. Gastal [Thu, 24 Nov 2011 15:34:04 +0000 (13:34 -0200)]
Removing unnecessary hidden property "_q_user-agent".

This property is no longer necessary because we can now set the user
agent directly on the proxy.

Task-number: QTBUG-17223
Change-Id: I27cb126dd401f02525290d2317650f55cae9f4ef
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdds support for headers in QNetworkProxy.
Jonas M. Gastal [Wed, 23 Nov 2011 17:11:03 +0000 (15:11 -0200)]
Adds support for headers in QNetworkProxy.

The API is the same that is present on QNetworkRequest class. Since
these are HTTP headers, this only affects proxies of type HttpProxy and
HttpCachingProxy.

This was created as a general solution to the problem pointed out in
QTBUG-19569(some proxies only accept request with specific User Agents).
In the same way that there are cases where setting the User Agent is
desired there might be reasons to set other headers, hence the support
for any header.

Change-Id: Ifd04f34d29eedb6c2a3f0b50708244996b12a123
Task: QTBUG-19569
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd a parents parameter to layoutChange signals.
Stephen Kelly [Wed, 23 Nov 2011 19:50:55 +0000 (20:50 +0100)]
Add a parents parameter to layoutChange signals.

This allows for more focussed notification of what part of the
model has changed layout.

The slots in the proxy models can be more optimized later.

Change-Id: I1bd17465b4be6f8efdc107036db897c557fcb519
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdd a note in the QScreen documentation about logical vs physical DPI.
Samuel Rødal [Tue, 22 Nov 2011 09:53:40 +0000 (10:53 +0100)]
Add a note in the QScreen documentation about logical vs physical DPI.

Change-Id: I1d536711cbbc0ea8a21c6917e5e0066c1ad4ccae
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoMake v8 snapshots work in debug-and-release mode
Kent Hansen [Thu, 24 Nov 2011 07:01:08 +0000 (08:01 +0100)]
Make v8 snapshots work in debug-and-release mode

Debug snapshots and release snapshots aren't compatible. Both a
debug version and release version of the mkv8snapshot tool must be
built, and the corresponding executable selected when building v8.

Adopt the library naming convention for naming the mkv8snapshot
executable ("mkv8snapshot" in release, "mkv8snapshot_debug" in debug
on Mac, "mkv8snapshotd" in debug on Windows).

Change-Id: I7a94b09e7db7ed8bbaa293637c092a1d1d1dbaba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMove QScopedLoopLevelCounter to qthread_p.h
Bradley T. Hughes [Mon, 21 Nov 2011 14:28:57 +0000 (15:28 +0100)]
Move QScopedLoopLevelCounter to qthread_p.h

... and use it in QCoreApplication::notifyInterna() instead of
"reinventing" the wheel there. The constructor and destructor for
QScopedLoopLevelCounter are inline, so the class does not need to be
exported.

Change-Id: I7af5a4ef0987f277bcc50c1057f3c74152f3d79d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoemit width/height changes for the new rect
Gunnar Sletta [Thu, 24 Nov 2011 10:53:58 +0000 (11:53 +0100)]
emit width/height changes for the new rect

Change-Id: I789a45bc60aaa949d18e9fb72a186a259548ec1d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDon't forward declare types form openssl in public headers
Lars Knoll [Thu, 24 Nov 2011 08:43:36 +0000 (09:43 +0100)]
Don't forward declare types form openssl in public headers

There's no real reason for the typedef here, QtNetwork
will compile without it and it might conflict with
openssl.

Change-Id: Id352ccc98d84ca9ee9ea3c7b4a942382882173f1
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agodirectfb: Use the QPlatformWindow in the DirectFB Backingstore
Holger Hans Peter Freyther [Mon, 21 Nov 2011 12:50:48 +0000 (13:50 +0100)]
directfb: Use the QPlatformWindow in the DirectFB Backingstore

Remove usage of QDirectFbConvenience::dfbDisplayLayer in the
QDirectFbBackingStore code and resolve the IDirectFBWindow through
the QPlatformWindow.

Change-Id: Ia7db8dedc91096648bc9de029d034002ba0d6a03
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Get the IDirectFBDisplayLayer through the QPlatformScreen
Holger Hans Peter Freyther [Mon, 21 Nov 2011 13:59:26 +0000 (14:59 +0100)]
directfb: Get the IDirectFBDisplayLayer through the QPlatformScreen

Change-Id: I1e8bacc2a5c39065f1c0667cda900730c5670066
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Fix the typo in the parameter
Holger Hans Peter Freyther [Mon, 21 Nov 2011 13:17:01 +0000 (14:17 +0100)]
directfb: Fix the typo in the parameter

Change-Id: I3d373872c533bc4b6f4f010f5cce4dbb41dbb561
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Remove dfbDisplayLayer from QDirectFbInput
Holger Hans Peter Freyther [Mon, 21 Nov 2011 13:15:03 +0000 (14:15 +0100)]
directfb: Remove dfbDisplayLayer from QDirectFbInput

Change-Id: I2ae61c40c28b337448077cff5643a007b54a3d71
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Pass the IDirectFBWindow to the QDirectFbInput methods
Holger Hans Peter Freyther [Mon, 21 Nov 2011 13:07:11 +0000 (14:07 +0100)]
directfb: Pass the IDirectFBWindow to the QDirectFbInput methods

No need to go from IDirectFBWindow -> WindowID -> IDirectFBWindow
to attach the event buffer for the event system.

Change-Id: Ia5f7c20d06e8e1da5142f1bd99ca69906107adba
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Use DirectFBErrorFatal for errors we don't handle well
Holger Hans Peter Freyther [Mon, 21 Nov 2011 12:37:59 +0000 (13:37 +0100)]
directfb: Use DirectFBErrorFatal for errors we don't handle well

In case we fail to initialize DirectFB, use the DirectFBErrorFatal
to quit as there is no way we can recover from this error and the
QPA backend has already been selected.

Change-Id: I8001bf32d0a14ba21c2ec13121748a6384b87c2b
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix HarfBuzz Thai character SARA AM handling
Jiang Jiang [Wed, 16 Nov 2011 14:27:28 +0000 (15:27 +0100)]
Fix HarfBuzz Thai character SARA AM handling

This patch is contributed by Thanomsub Noppaburana from libthai. It
added a special thai shaping function to handle SARA AM character
for fonts without OpenType rules to support it, like Nokia Pure Text
AS.

With modification to logClusters assignment to make sure that
QTextLine::glyphRuns(int from, int length) returns correct glyphs.

Task-number: QTBUG-21206
Change-Id: I5a78ee1ab2b4c874c7d0df17d4ee6d264ed5a790
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agosyncqt: Don't generate deprecated forwarding headers anymore
Tor Arne Vestbø [Tue, 22 Nov 2011 20:41:06 +0000 (21:41 +0100)]
syncqt: Don't generate deprecated forwarding headers anymore

The forwarding headers in 'include/Qt' were deprectated in Qt 4. This is
Qt 5, so time to remove them.

Change-Id: I4bf3797475b91f58af1761ed4165b552613299b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoImprove QVector autotest
Jason McDonald [Thu, 24 Nov 2011 06:09:21 +0000 (16:09 +1000)]
Improve QVector autotest

Ensure that data row names are unique.

Change-Id: Ia6cf6e440d631928ae3352d7305c6cf2ee5b2a0c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agodirectfb: Access the screen layer through QWindow::screen()
Holger Hans Peter Freyther [Fri, 18 Nov 2011 20:09:03 +0000 (21:09 +0100)]
directfb: Access the screen layer through QWindow::screen()

Instead of assuming which layer was assigned to Qt, resolve the to
be used layer via QWindow::screen()->handle(). Add a method to the
DirectFB QPlatformScreen to provide a pointer to the IDirectFBDisplayLayer

Change-Id: Iaea9466ca84daff752a4932deafbe38f48123715
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agodirectfb: Move QDirectFbScreen into a separate file
Holger Hans Peter Freyther [Fri, 18 Nov 2011 13:30:00 +0000 (21:30 +0800)]
directfb: Move QDirectFbScreen into a separate file

The screen handling will get a bit more complex due the integration
of different ways to do OpenGL. Move to a new file.

Change-Id: Ibe3e397d13da1b270ec4afaf046d28be50e976f9
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoOnly use QVERIFY in test functions.
Jason McDonald [Thu, 24 Nov 2011 03:46:46 +0000 (13:46 +1000)]
Only use QVERIFY in test functions.

The modified test was using QVERIFY in the destructor of a local class,
but QVERIFY should only be used directly in a test function.  This
commit changes the local class to record the result of the test and
verifies that result in the test function.

Change-Id: Ie68ac6aa880368c961ebfa67cd452f0fbf26db89
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd missing indentation to QFuture test.
Jason McDonald [Thu, 24 Nov 2011 03:15:12 +0000 (13:15 +1000)]
Add missing indentation to QFuture test.

Change-Id: Iaceaa79237d5ef6e81d1d16dc5e3fd3d97631f3a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed regression in tst_qscreen.
Samuel Rødal [Tue, 22 Nov 2011 16:16:11 +0000 (17:16 +0100)]
Fixed regression in tst_qscreen.

The ScreenOrientation enum was changed so that the values are power of
twos, angleBetween() needed to be fixed in order to reflect this.

Task-number: QTBUG-22554
Change-Id: Ia45dd6643b40b14204abf967b00c0d04834736a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix stack overwrite in QDBusDemarshaller
Sami Rosendahl [Wed, 23 Nov 2011 08:03:26 +0000 (10:03 +0200)]
Fix stack overwrite in QDBusDemarshaller

QDBusArgument extraction operators and QDBusDemarshaller that implements
the extraction do not check the type of the extracted value.
Helper function template qIterGet in qdbusdemarshaller.cpp that is used
for extracting basic data types only reserves space from the stack for
the expected type as specified by client.
If the actual type in the DBus parameter is larger stack will be
overwritten in the helper function by at most 7 bytes (expected one byte,
received dbus_uint_64_t of size 8 bytes).

The fix always reserves space for the largest basic type dbus_uint64_t
readable by dbus_message_iter_get_basic API.

See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d04

Task-number: QTBUG-22735
Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix QT_DEPRECATED_SINCE on windows.
Olivier Goffart [Wed, 23 Nov 2011 15:13:44 +0000 (16:13 +0100)]
Fix QT_DEPRECATED_SINCE on windows.

Apparently, MSVC preprocessor do not understand correctly the defined()
in that macro (used in another #if)

Change-Id: I9bd102eb4e0cbaa65bea48db786a45d861491ad7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoImprove docs for Accessibility.
Frederik Gladhorn [Tue, 22 Nov 2011 22:12:01 +0000 (23:12 +0100)]
Improve docs for Accessibility.

While still lacking, at least try to reflect reality a bit.

Change-Id: I8fcd0bd540806f3d1e314c60d854d2a90f66c14e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoUpdate changelog - Accessibility
Frederik Gladhorn [Tue, 22 Nov 2011 13:33:15 +0000 (14:33 +0100)]
Update changelog - Accessibility

Change-Id: I03a2d8c53ebc84ebf7219bff751821e00fbfa170
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoRemove virtual child integers.
Frederik Gladhorn [Sat, 22 Oct 2011 20:38:14 +0000 (22:38 +0200)]
Remove virtual child integers.

This makes the accessibility apis much
simpler and less error prone.

Disable the itemviews implementation that is in complex widgets.
The itemviews will use the new code from itemviews.h/cpp everywhere now.

QToolBox was broken before, now at least it simply exposes all its children.
The children are the buttons (tabs of the toolbox) and their contents.

Change-Id: I45e218f49f02aebbd678ddfe29f94c2a112a2125
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>