profile/ivi/qtbase.git
12 years agoRestructure how we initialize hash nodes a little
Lars Knoll [Mon, 30 Apr 2012 09:01:05 +0000 (11:01 +0200)]
Restructure how we initialize hash nodes a little

This should help to silence coverity which was complaining
hundreds of times about Qt not initializing h and next in
QHashNode.

Change-Id: Ib7977693e9786d4b310799e4f428115c65bb3fee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoInitialize members
Lars Knoll [Mon, 30 Apr 2012 07:19:31 +0000 (09:19 +0200)]
Initialize members

Change-Id: I786de497af63a45d9c38780e856a3f27c5ce8468
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqdoc: Further changes to the QML specialization
Martin Smith [Mon, 30 Apr 2012 11:30:12 +0000 (13:30 +0200)]
qdoc: Further changes to the QML specialization

Re-adding <qmlInherits>, <qmlInheritedBy>,
<qmlInstantiates>, and <qmlSince>. Also adding
<qmlAttached>.

Change-Id: Iebd70a37b083bc404ce621d0bb9d3090dbc1109e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoNever attempt to run the dbus tests on APPLE.
Stephen Kelly [Fri, 27 Apr 2012 12:30:46 +0000 (14:30 +0200)]
Never attempt to run the dbus tests on APPLE.

The Qt buildsystem is creating the config files for it even
when it is not building QtDBus, so Qt5DBus_FOUND = True.

Re-enable the CI testing on mac with this change.

Task-number: QTBUG-25522

Change-Id: I5d2690d17fde6c5aabcbdd3e2eef9f0846edd97d
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoTemporarily disable -Woverloaded-virtual in headersclean test
Kent Hansen [Mon, 30 Apr 2012 10:45:15 +0000 (12:45 +0200)]
Temporarily disable -Woverloaded-virtual in headersclean test

This autotest fails to build after the introduction of the
QMetaMethod-based connect/disconnectNotify() functions; we are
intentionally keeping the old const char * versions (overloads) for
a limited time, to avoid disrupting other modules.

This commit will be reverted as soon as the compatibility overloads
have been removed.

Change-Id: I9b5a40b51ffa3bfa3d185410389678c262ca7b45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPort bearer plugins to QMetaMethod-based connectNotify()
Kent Hansen [Mon, 23 Apr 2012 19:36:04 +0000 (21:36 +0200)]
Port bearer plugins to QMetaMethod-based connectNotify()

The const char *-based API is deprecated and will be removed in Qt5.

Some of the reimplementations were commented out since the signals
being checked for aren't even declared by the relevant classes.

Change-Id: I4486d1f3242db21cebd55fb53def3904f7c236ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPort QtDBus to QMetaMethod-based connectNotify()
Kent Hansen [Sun, 22 Apr 2012 13:05:56 +0000 (15:05 +0200)]
Port QtDBus to QMetaMethod-based connectNotify()

The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: I1c7f0e46149964367f42faccfff4b89acbf16511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPort QNetworkSession to QMetaMethod-based connectNotify()
Kent Hansen [Sun, 22 Apr 2012 12:35:56 +0000 (14:35 +0200)]
Port QNetworkSession to QMetaMethod-based connectNotify()

The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: I36f6dc761e3b5a087e38db29b761c3e9237958b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoPort QBuffer to QMetaMethod-based connectNotify()
Kent Hansen [Sun, 22 Apr 2012 12:30:32 +0000 (14:30 +0200)]
Port QBuffer to QMetaMethod-based connectNotify()

The const char *-based API is deprecated and will be removed in Qt5.

Also fix a bug in the disconnectNotify() reimplementation; when all
signals are disconnected at once, disconnectNotify() is only called
a single time, with an invalid method as argument. Thus, the signal
connection count should be set to 0, instead of decremented.

Change-Id: Ieee92293777bff87f8b28e56e23ab55d0b8b8101
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPort QtConcurrent to QMetaMethod-based connectNotify()
Kent Hansen [Sun, 22 Apr 2012 12:23:53 +0000 (14:23 +0200)]
Port QtConcurrent to QMetaMethod-based connectNotify()

The const char *-based API is deprecated and will be removed in Qt5.

Change-Id: Ica5b2c5020adf972db5005be8c062ddcdae8c0b4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd QMetaMethod-based QObject::connect/disconnectNotify() API
Kent Hansen [Fri, 20 Apr 2012 18:19:12 +0000 (20:19 +0200)]
Add QMetaMethod-based QObject::connect/disconnectNotify() API

This API will fully replace the const char *-based connectNotify()
and disconnectNotify() in Qt5; the old functions will be REMOVED
before Qt 5.0 final.

The new implementation fixes the long-standing issue of
connectNotify() not being called when using the (internal)
index-based QMetaObject::connect() (e.g., from QML).

As with the old API, there are still two "unintuitive" behaviors
concerning disconnectNotify():
- disconnectNotify() is not called when the signal is disconnected
  using the QObject::disconnect(QMetaObject::Connection) overload.
- disconnectNotify() is not called when a receiver is destroyed
  (i.e., when a connection is implicitly removed).

The old versions of connectNotify() and disconnectNotify() are kept
for now, and they are still called. They will be removed once known
existing reimplementations (e.g., QtNetwork, QtDBus) have been
ported to the new API.

Change-Id: I8b4f007f3c6d89199c1ba04a3e23c8ca314e0896
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoFix compiler warning in qdrawhelper.cpp
Olivier Goffart [Mon, 30 Apr 2012 11:21:57 +0000 (13:21 +0200)]
Fix compiler warning in qdrawhelper.cpp

warning: always_inline function might not be inlinable [-Wattributes]

Those function are only used in array of function pointers. They
cannot be inlined.

Change-Id: I82b10d82ac8915129dc8921b1a74d42d8547bc40
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoSupport all modality types in QPlatformDialogHelper
Bradley T. Hughes [Thu, 26 Apr 2012 11:32:14 +0000 (13:32 +0200)]
Support all modality types in QPlatformDialogHelper

Modality is not a boolean property in Qt. There are 2 types: window
modality and application modality. Native dialogs can support both of
these types as well (e.g. on Cocoa, a window modal file dialog should be
displayed as a Sheet). Remove the QPlatformDialogHelper::ShowFlags enum
and instead pass a Qt::WindowModality parameter to
QPlatformDialogHelper::show_sys().

The Windows implementation has been updated to check for
Qt::ApplicationModal instead of the ShowModal flag (since only
Qt::ApplicationModal dialogs are blocking).

The Cocoa implementation has been updated to only use non-modal and
application modal native color and font dialogs (which restores Qt 4
behavior). These are shared Cocoa panels that cannot be shown as sheets,
however. If the programmer asks for window modal color/font dialogs, we
use the Qt versions, not the native ones. The file dialog can be shown
either as a Sheet (but we need to pass an NSWindow parent for it to work
properly) or as an application modal dialog.

This change has been tested on Mac OS X with
tests/manual/windowmodality.

Change-Id: I9064987433895c55f68aac979ef8e8207fb24bbe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoMake QGtkStyle work on Qt 5.
Morten Johan Sorvig [Tue, 24 Apr 2012 12:23:02 +0000 (14:23 +0200)]
Make QGtkStyle work on Qt 5.

Mostly straightforward porting: Add configure test from Qt 4. Add X11
include to qgtkstyle_p.cpp. Use renamed QGuiApplicationPrivate::showModalWindow.

Change-Id: I83020e13ec00b49f3fe346814f881bce19a6f602
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoCocoa: Fix beep-on-show for Creator menus.
Morten Johan Sorvig [Thu, 26 Apr 2012 10:29:01 +0000 (12:29 +0200)]
Cocoa: Fix beep-on-show for Creator menus.

Maintain a current window state variable in QCocoaWindnow
and use it when setting the new window state on the
NSWindow.

The NSWindow state accessors can apparently not be
trusted, in particular isZoomed always returns true
for the Creator popup menu.

Change-Id: I78f13de251f3730752813bba17459011f8558aee
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove unused code
Lars Knoll [Mon, 30 Apr 2012 07:01:00 +0000 (09:01 +0200)]
Remove unused code

Change-Id: I185db2361990dd1d503488a364826738270388b5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoDisable force_align_arg_pointer function attribute with MinGW-w64
Jonathan Liu [Thu, 26 Apr 2012 14:57:56 +0000 (00:57 +1000)]
Disable force_align_arg_pointer function attribute with MinGW-w64

The force_align_arg_pointer function attribute is not necessary for
MinGW-w64 to align stack for SSE and generates a compiler warning as
it is ignored. Do not use force_align_arg_pointer with MinGW-w64 to
silence the warning.

Change-Id: I58a754dc3ec01b36a1d3c9490f45ccf0824468ba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix the tst_QOpenGL::sharedResourceCleanup() test case in Windows
Miikka Heikkinen [Mon, 30 Apr 2012 10:14:58 +0000 (13:14 +0300)]
Fix the tst_QOpenGL::sharedResourceCleanup() test case in Windows

QWindowsGLContext was returning always false for isSharing() query,
as it was falling back to default implementation.

Task-number: QTBUG-24192
Change-Id: I884d559d69545ef85a0d07d7287bc50ce459c1bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse BPS based event dispatcher
Kevin Krammer [Tue, 27 Mar 2012 12:01:38 +0000 (14:01 +0200)]
Use BPS based event dispatcher

Create a QPA specific subclass of the blackberry event dispatcher
(basically the BPS equivalent to the QUnixEventDispatcherQPA created
by createUnixEventDispatcher()).

Create an event dispatcher event filter that will receive all BPS events
and then either handle them itself or delegate to event subtype
specific handlers.

Change-Id: I112e0274156727d3aa9e5693b59d041c65be4daf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoRemove declaration of QWindowsFontEngine::createEngine()
Miikka Heikkinen [Mon, 30 Apr 2012 08:59:37 +0000 (11:59 +0300)]
Remove declaration of QWindowsFontEngine::createEngine()

There is no implementation for this function so might as well remove
the declaration. The function is actually implemented by
QWindowsFontDatabase class, where it is also properly declared.

Change-Id: I8f5c050fa3f3c48b07e10f205eb0f7b16e12b737
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemoved insignification from QBackingStore test
Miikka Heikkinen [Mon, 30 Apr 2012 08:40:24 +0000 (11:40 +0300)]
Removed insignification from QBackingStore test

The test is passing in CI for both Mac and Windows, so removed the
insignification from it.

Task-number: QTBUG-24885
Change-Id: Ida39d98b72e49fc82358d016b8de725bbfc5d6de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove unused private and protected members from QClipboard
Laszlo Agocs [Mon, 30 Apr 2012 07:52:51 +0000 (10:52 +0300)]
Remove unused private and protected members from QClipboard

Change-Id: I1d5ce0db4a9a6582629e2c0b74e9ab998b405788
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix Qt::MouseButton Documentation for Qt::ExtraButton24,
stockton [Mon, 30 Apr 2012 05:21:43 +0000 (22:21 -0700)]
Fix Qt::MouseButton Documentation for Qt::ExtraButton24,

Documentation for the 'more mouse buttons' feature has a Typo on
Qt::ExtraButton24 (is shown as "Qt::ExtraButton44", no value.)
Also, the order of BackButton/Xbutton1/ExtraButton1 causes the
'BackButton' value to be a forward reference to XButton1, which
makes it awkward and hard to understand. Same with ForwardButton/
XButton2/ExtraButton2.

Task-number: QTBUG-25529

Change-Id: I04b76d91d7a2155c1917a809a51700059320f510
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoRemove insignification of lancelot test on Mac OS X.
Jason McDonald [Fri, 27 Apr 2012 07:55:26 +0000 (17:55 +1000)]
Remove insignification of lancelot test on Mac OS X.

This test has been passing consistently since the previous crash was
skipped in commit 6dbd00b12052d749492763ee2a768d952fdddba9.

Task-number: QTBUG-22792
Change-Id: I41ac001a3b9e16cde4d674dc9f34ab2dffb848cd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove insignficiation from qgraphicsscene test on Windows.
Jason McDonald [Fri, 27 Apr 2012 09:06:07 +0000 (19:06 +1000)]
Remove insignficiation from qgraphicsscene test on Windows.

This test has been passing consistently since it started running in CI.

Task-number: QTBUG-24295
Change-Id: If2a163607ae72cae9e28619dd5de1b333aea4ed9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove insignification from qsslsocket_onDemandCertificates_* tests
Jason McDonald [Fri, 27 Apr 2012 08:50:12 +0000 (18:50 +1000)]
Remove insignification from qsslsocket_onDemandCertificates_* tests

These tests have been passing consistently since they started running
on Windows in CI.

Change-Id: I4505497afc477a7f4fbda0acc29987d0d0cf220a
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRemove insignification from qtcpserver test on Mac OS X.
Jason McDonald [Fri, 27 Apr 2012 08:59:47 +0000 (18:59 +1000)]
Remove insignification from qtcpserver test on Mac OS X.

This test has been passing consistently since starting to run in CI.

Task-number: QTBUG-25445
Change-Id: Id024921b18ea4ef94ad2f47d9db2ccda3212eaaa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRemove insignification of qsslsocket test on Windows and Mac.
Jason McDonald [Fri, 27 Apr 2012 08:41:05 +0000 (18:41 +1000)]
Remove insignification of qsslsocket test on Windows and Mac.

The test has a single stable failure on both of these platforms. Mark
the failure with QEXPECT_FAIL (that was already the case on Ubuntu
11.10) and re-enable the test.

Note also the elimination of duplicate bug numbers.

Task-number: QTBUG-24234
Change-Id: Ica11e7d1f3cd9487647127984fef7c75e0e764fe
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix MinGW-w64 compilation
Jonathan Liu [Fri, 27 Apr 2012 10:50:08 +0000 (20:50 +1000)]
Fix MinGW-w64 compilation

Use qintptr and quintptr for exchanging data with registers for cpuid
as the size of long does not match the size of the register on Win64
which uses the LLP64 data model.

Change-Id: I23b8c8e0977166f7e62795c16e9080e44d9f25f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoIf a dependency was not found, and we were not called with REQUIRED, we are not found.
Stephen Kelly [Fri, 27 Apr 2012 14:45:20 +0000 (16:45 +0200)]
If a dependency was not found, and we were not called with REQUIRED, we are not found.

This only works with CMake 2.8.8, but it is no harm to earlier versions.

Change-Id: I62c220e4b24f951e83c23eb57d5f833de4d181c5
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoProperly quote the dependencies string.
Stephen Kelly [Sun, 29 Apr 2012 18:03:16 +0000 (20:03 +0200)]
Properly quote the dependencies string.

Change-Id: I319b04cdb21860652658ee8d3e577d41a913ed5a
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoGet rid of most warnings related to QInputMethod
Lars Knoll [Fri, 27 Apr 2012 21:25:57 +0000 (23:25 +0200)]
Get rid of most warnings related to QInputMethod

Change-Id: Id0b1235a5dc209c5c06e0a64613364c89e733005
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
12 years agoMake sure different modules do not overwrite each others dependencies.
Stephen Kelly [Fri, 27 Apr 2012 14:50:33 +0000 (16:50 +0200)]
Make sure different modules do not overwrite each others dependencies.

Change-Id: I30ca05d3c692a707cfe829ad5fee099549bab540
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoForward the REQUIRED and QUIET arguments when finding dependencies.
Stephen Kelly [Fri, 27 Apr 2012 14:40:55 +0000 (16:40 +0200)]
Forward the REQUIRED and QUIET arguments when finding dependencies.

Change-Id: I5d7c26f12a296ac3527575149978b18c5e9a4a67
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoSimplify the cmake version check.
Stephen Kelly [Fri, 27 Apr 2012 13:30:22 +0000 (15:30 +0200)]
Simplify the cmake version check.

Change-Id: Ifdd89397f88b090a6b43d40636dbeac029faaed8
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoAdd some more useful output when about the cmake version
Stephen Kelly [Fri, 27 Apr 2012 13:11:26 +0000 (15:11 +0200)]
Add some more useful output when about the cmake version

Change-Id: I58efa1f295dbc652b1882937ca27ea52d9f4a923
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years ago[SIC] Make non-const the QRegExp methods that modify the internals
Thiago Macieira [Fri, 20 Apr 2012 14:50:36 +0000 (16:50 +0200)]
[SIC] Make non-const the QRegExp methods that modify the internals

These methods modify QRegExp internals and should not have been
const. It's actually dangerous to have them const, since users may
think it's safe to use the matching method in a thread-safe manner.

Task-number: QTBUG-25064
Change-Id: Ia370eb42fd0407a94924f420297c5e83d3908214
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDoc: Fix most qdoc errors in QtSql.
Casper van Donderen [Fri, 27 Apr 2012 13:18:27 +0000 (15:18 +0200)]
Doc: Fix most qdoc errors in QtSql.

- Move 2 images from qtdoc.
- Add "make docs" command for qtsql
- Fix qdoc command usage errors.

Change-Id: Id2f0548d09ed8f77b2317863d443c19d1cccdd83
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoqdoc: Further changes to the QML specialization
Martin Smith [Fri, 27 Apr 2012 14:08:16 +0000 (16:08 +0200)]
qdoc: Further changes to the QML specialization

The <qmlPropertyGroup> tag now has an id attribute
of the form "id-qml-propertygroup-xxx" where the
xxx is the property name. //This should be unique
within the document.

Change-Id: I20b30266dbe92b85b60400de30ebf9b1f1e292ea
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoDon't generate compiler warnings for using deprecated methods
Lars Knoll [Fri, 27 Apr 2012 21:12:13 +0000 (23:12 +0200)]
Don't generate compiler warnings for using deprecated methods

We need to construct QImageTextKeyLang objects for the deprecated
method in QImage. That's impossible to do if we don't have a
constructor for the class that's non deprecated. So add a private
constructor and make QImage a fried of the class so it can use
that constructor.

Change-Id: I6359e9943fe031ed3dca85479ee9ec47ceaf776b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoGet rid of some deprecation warnings
Lars Knoll [Fri, 27 Apr 2012 21:24:00 +0000 (23:24 +0200)]
Get rid of some deprecation warnings

Change-Id: I05e6f9479789652cc1536cb5bced2bc8fa664c84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRe-enable casting to and from "ASCII" on tst_qstring.cpp
Thiago Macieira [Wed, 25 Apr 2012 11:33:03 +0000 (13:33 +0200)]
Re-enable casting to and from "ASCII" on tst_qstring.cpp

Turns out that we've had some old unit tests commented out that did not
compile. QString does not have a std::string constructor nor overloads
to many other methods. And std::string does not cast to char* on its
own. So these tests need to be removed.

Change-Id: I22df66fc3ccc68bc2840f2d83747234418e480f5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDon't use the QRegExp methods that modify the object [QtCore]
Thiago Macieira [Fri, 20 Apr 2012 12:59:30 +0000 (14:59 +0200)]
Don't use the QRegExp methods that modify the object [QtCore]

QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: Icf22986cd5f6fd086518c78a7d56e6cadfe9f5f6
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoWrap the non-ASCII testcases with QString::fromUtf8
Thiago Macieira [Mon, 23 Apr 2012 21:11:40 +0000 (23:11 +0200)]
Wrap the non-ASCII testcases with QString::fromUtf8

And use QString::toUtf8() to recover the byte array original.

Change-Id: Ic94de12e7ac67479e85a64a86f8467428b4d22ba
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoWrap all Latin 1 strings with QString::fromLatin1 or QLatin1Strings
Thiago Macieira [Mon, 23 Apr 2012 14:38:17 +0000 (16:38 +0200)]
Wrap all Latin 1 strings with QString::fromLatin1 or QLatin1Strings

Change-Id: I1a1891b9126a2546c1872ec25aba9581cc84bb2f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoConvert these files to ASCII or UTF-8
Thiago Macieira [Mon, 23 Apr 2012 13:14:24 +0000 (15:14 +0200)]
Convert these files to ASCII or UTF-8

Remove all non-UTF-8 sequences from source code in Qt.

Change-Id: I46d9cb23ef2199894896f171d553b3144822f36c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoForce tst_qstring to use fromLatin1 where it has Latin 1 literals
Thiago Macieira [Mon, 23 Apr 2012 13:01:33 +0000 (15:01 +0200)]
Force tst_qstring to use fromLatin1 where it has Latin 1 literals

Change-Id: I941d20733da2987ca7ced14c314adebaf6a431f6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix QWindow autotest for Windows.
Miikka Heikkinen [Fri, 27 Apr 2012 13:45:24 +0000 (16:45 +0300)]
Fix QWindow autotest for Windows.

The test was flawed, as it didn't process queued events before checking
for received event counts, which caused window minimum size enforcement
triggered resizes to be missed. Added event processing steps before
critical checks and also increased the size of the windows so that
event counts are predictable also on Windows.

Note that this might also fix the issues this test has on Mac, but I
can't test that.

Task-number: QTBUG-24904
Change-Id: I01a4bd1ddabcf3650a8abff67b03c75b9c40a626
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove old Qt4 to-do comment.
Jason McDonald [Fri, 27 Apr 2012 09:47:33 +0000 (19:47 +1000)]
Remove old Qt4 to-do comment.

Addressing the comment would likely break existing applications, so
leave things as they are for now.

Task-number: QTBUG-25099
Change-Id: I7dfd0e1ae121dcae57c2babc3373c2e5d16ad44b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMove QWinEventNotifier data members to a private class
Shane Kearns [Tue, 24 Apr 2012 12:33:22 +0000 (13:33 +0100)]
Move QWinEventNotifier data members to a private class

This is a binary incompatible change to allow future changes
to QWinEventNotifier to be possible in a binary compatible way.

Change-Id: I268d3e01d8ee237ecbd164ee0f7cae1eb73dd725
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
12 years agoReplace QGuiApplication::activeWindow by focusWindow().
Friedemann Kleint [Thu, 26 Apr 2012 07:33:16 +0000 (09:33 +0200)]
Replace QGuiApplication::activeWindow by focusWindow().

Fix deprecation warnings.

Change-Id: I8d33aa8c035df6f5ef3fff6a402e980e43e03406
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindows: Fix warning about retrieving the handle from non-toplevels.
Friedemann Kleint [Fri, 27 Apr 2012 09:06:41 +0000 (11:06 +0200)]
Windows: Fix warning about retrieving the handle from non-toplevels.

Change-Id: I967f218c98309e77371717aa16e46995a767caa3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQWindowsBackingStore: Flush to correct window.
Friedemann Kleint [Fri, 27 Apr 2012 12:01:26 +0000 (14:01 +0200)]
QWindowsBackingStore: Flush to correct window.

Task-number: QTBUG-25435

Change-Id: I13f57a328a7ac3402fe0def9d724f7e700016c80
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove deprecation tags from QWheelEvent.
Morten Johan Sorvig [Thu, 26 Apr 2012 08:29:16 +0000 (10:29 +0200)]
Remove deprecation tags from QWheelEvent.

0df1c9f1 enabled deprecation warnings from Qt,
causing warnings from QWheelEvent use.

Using delta() and orientation() in new code is still
not advised, but since QtWidgets uses them the
"deprecated" tag is not suitable.

Change-Id: I597e8ddf9fd2dc911d0e30044e96df744982ff81
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoWindows/Vista style: Fix painting of QGroupBox.
Friedemann Kleint [Thu, 26 Apr 2012 13:38:17 +0000 (15:38 +0200)]
Windows/Vista style: Fix painting of QGroupBox.

QGroupBox in Vista style does not show a frame, currently.

drawBackgroundDirectly should also be called if the paintDevice
is a backing store.

Task-number: QTBUG-25395
Change-Id: Ifa20802dea6c182904f68271ddd0d175007e4b0e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix warning about int-truncation (MSVC2010, 64bit).
Friedemann Kleint [Tue, 24 Apr 2012 14:48:40 +0000 (16:48 +0200)]
Fix warning about int-truncation (MSVC2010, 64bit).

Change-Id: Idfc483ccb80a8bbad128672052edfa04635bd532
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agodoc: removed wrong license headers from several .pro snippets
Rohan McGovern [Fri, 27 Apr 2012 02:45:22 +0000 (12:45 +1000)]
doc: removed wrong license headers from several .pro snippets

qmake can't parse /* C-style comments */.  The license headers in these
files should use # as the comment delimiter.  However, .pro files anyway
don't need license headers, so just remove them.

Continues from commit 8dea79701579f78023c6b40c4b5cbea278bc62c1, which
removed the header from one file.

Change-Id: Ib227aabb27224fc1fe89b7ced4fbbf7b1af8b193
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoAdd QMetaMethod::fromSignal() function
Kent Hansen [Sun, 22 Apr 2012 20:44:58 +0000 (22:44 +0200)]
Add QMetaMethod::fromSignal() function

Given a member function that's a signal, returns the corresponding
QMetaMethod. Inspired by the implementation of the template-based
QObject::connect().

The primary use case for this function is to have an effective and
exact (not subject to shadowing) way of checking whether a known
signal was connected to in reimplementations of
QObject::connectNotify(QMetaMethod), avoiding string comparisons.
Example:

void MyObject::connectNotify(const QMetaMethod &signal)
{
    if (signal == QMetaMethod::fromSignal(&MyObject::mySignal)) {
        // Someone connected to mySignal ...
    }
}

Change-Id: I5e4de434275fe543c004d569dcaa9ceda3442f03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix workaround for image readers that can scale but not clip
aavit [Wed, 18 Apr 2012 14:15:41 +0000 (16:15 +0200)]
Fix workaround for image readers that can scale but not clip

If both scaling and clipping was requested from an image reader that
only supports scaling, the code failed to apply the intended
workaround (i.e. read normal and do clipping and scaling afterwards).
Ref. the comment just above about "Only enable the ScaledSize option if
..."

Change-Id: I273edba60bf9f785f2082aa8f236505ec3ce0776
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoImplement inline downscaling in png reader, to save memory
aavit [Wed, 18 Apr 2012 13:02:21 +0000 (15:02 +0200)]
Implement inline downscaling in png reader, to save memory

Instead of allocating and reading the entire image and then scaling it
down, this code reads only one line at a time and scales it on the
fly.

Change-Id: I61fde307146c11dcd90ca617cc2e7f85dd3b66c4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemoved parallel_test from parallel-unsafe autotest.
Rohan McGovern [Fri, 27 Apr 2012 05:09:08 +0000 (15:09 +1000)]
Removed parallel_test from parallel-unsafe autotest.

This autotest passes when run alone, but sometimes fails when run
concurrently with other tests.

Change-Id: I327de7f4a9f8af385351e4c6b09a57311efd6eb6
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
12 years agoRespect the DontUseNativeDialog flag.
Christoph Schleifenbaum [Tue, 10 Apr 2012 15:17:41 +0000 (17:17 +0200)]
Respect the DontUseNativeDialog flag.

QFontDialog and QColorDialog were ignoring the DontUseNativeDialog. This
lead to a native (Cocoa) dialog created all the time.

Fix the testcase for QFontDialog. It needs the DontUseNativeDialog flag
set.

Task-number: QTBUG-24321

Change-Id: I159c1ad057bac38226f1e01a56b15f142650bfd8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agocmake: temporarily set tests/auto/cmake insignificant on mac
Rohan McGovern [Fri, 27 Apr 2012 01:06:37 +0000 (11:06 +1000)]
cmake: temporarily set tests/auto/cmake insignificant on mac

cmake was installed on CI macs _after_ this test was added, causing the
test to block unrelated changes.  Temporarily disable it as previously
agreed with Stephen Kelly.

Change-Id: I079c0016a5e4a9a03ee1a0bae9a2e836c6b985d6
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoMark that the Sun compiler includes the return type in the mangling
Thiago Macieira [Fri, 20 Apr 2012 11:24:05 +0000 (13:24 +0200)]
Mark that the Sun compiler includes the return type in the mangling

Source: http://developers.sun.com/solaris/articles/external_linkage.html
   %dem __1cFgreet6F_pc_
   __1cFgreet6F_pc_ == char*greet()

Source: http://www.oracle.com/technetwork/articles/servers-storage-dev/stablecplusplusabi-333927.html
Function Mangled Name
float f(float) __1cBf6Ff_f_
int f(int) __1cBf6Fi_i_
int T::f(int) __1cBTBf6Mi_i_
int T::f(char*) __1cBTBf6Mpc_i_
int T::U::f(int) __1cBTBUBf6Mi_i_
int N::T::f(int) __1cBNBTBf6Mi_i_

Change-Id: Ibe1934f1c137d1657fb122cbf1a1b1fbc3e4a202
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQDoc: Pretend that .qtx and .qtt files are .qdoc files.
Casper van Donderen [Thu, 26 Apr 2012 08:37:53 +0000 (10:37 +0200)]
QDoc: Pretend that .qtx and .qtt files are .qdoc files.

Change-Id: I2b530e526d2c1f5102960dab4991ceade414f1eb
Reviewed-by: Ed Baak <ed.baak@nokia.com>
Reviewed-by: Peter Yard <peter.yard@nokia.com>
12 years agofix build with mingw
Konstantin Ritt [Thu, 26 Apr 2012 17:00:59 +0000 (20:00 +0300)]
fix build with mingw

since MinGW is GCC, invert the order and place the GCC constructs first

Change-Id: I98113aa77e51f9e01c3641987e915bf475053a60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed iOS compilation issues.
Ian Dean [Mon, 23 Apr 2012 15:10:57 +0000 (16:10 +0100)]
Fixed iOS compilation issues.

Put MacOS-specific code in #ifdef blocks so that it is not compiled for
iOS.

Change-Id: I303b7dbb63eb298e92351951731868df6a38bffa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRevert "Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition"
Eskil Abrahamsen Blomfeldt [Thu, 26 Apr 2012 14:47:56 +0000 (16:47 +0200)]
Revert "Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePosition"

This reverts commit add629d4f16a536fc56d55727195e3247b621a54.

The commit caused crashes when laying out some text (e.g. ordinary
Arabic text) with certain fonts (it triggered the assert in
QTextLayout::addNextCluster()). The regressions will have to be
weeded out before the fix can be recommitted.

Change-Id: Iee457f138367d4cf8fcbd2e518271d8eaa95a62c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoUncomment qnetworkproxyfactory autotest
Shane Kearns [Wed, 25 Apr 2012 13:43:51 +0000 (14:43 +0100)]
Uncomment qnetworkproxyfactory autotest

It no longer requires hardcoded configuration, and it passes on
linux, mac 10.6 and windows desktops

Change-Id: Ibaa63520dade58ce13c23cf2aba3ddbc5be1c472
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoFix memory leaks in 64-bits ODBC driver
Honglei Zhang [Thu, 26 Apr 2012 10:17:40 +0000 (13:17 +0300)]
Fix memory leaks in 64-bits ODBC driver

On 64-bits Windows system, integers and longs are still 4 bytes values.
Several functions that were previously defined with SQLINTEGER and
SQLUINTEGER parameters have been changed where appropiate to use new
SQLLEN and SQLULEN typedefs. SQLGetStmtAttr() is one of these functions.
This fix replaces SQLINTEGER with SQLULEN in appropriate functions to avoid
memory leaks.

Task-number: QTBUG-25256
Change-Id: I744927f42b8578ece60815df360e3b337ebf452a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoget rid of Q_*_EXPORT_INLINE macros
Konstantin Ritt [Thu, 26 Apr 2012 10:00:56 +0000 (13:00 +0300)]
get rid of Q_*_EXPORT_INLINE macros

> Girish:
> We should be able to remove the macro completely today,
> just mark all those functions as plain inline.
> With Qt5, we don't have to worry about bc yet.

this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport

Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix C++11 compilation
Olivier Goffart [Thu, 26 Apr 2012 09:28:35 +0000 (11:28 +0200)]
Fix C++11 compilation

Fix compilation with compilers that support user defined literal
(such as GCC 4.7)

Change-Id: I31cd3d2177688f963ab33cf68cd6060a5fb8640f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCreate interface for navigator calls and implement for BPS and PPS
Kevin Krammer [Wed, 11 Apr 2012 11:25:28 +0000 (13:25 +0200)]
Create interface for navigator calls and implement for BPS and PPS

Makes QQnxServices available on non-BPS systems by delegating to an interface
which is implemented on systems with BPS using the currenly used navigator API
and on systems without BPS by sending an appropriate message to the navigator's
PPS service interface.

Change-Id: I0e32fb11e6debb7b7b4693c0bc02af4f75ee2162
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoTake account of spanned items in QTreeView when dragging.
Stephen Kelly [Tue, 17 Apr 2012 17:45:20 +0000 (19:45 +0200)]
Take account of spanned items in QTreeView when dragging.

Also remove some code which has been unused since it was introduced in
32182d107fa75e5619ecc91a81f50626f429ebe1

Task-number: QTBUG-25140
Change-Id: Ic7053d68d8200f845c1ae330342d27af7275e057
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@digia.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoDoc: Use the proper way to find qdoc.
Casper van Donderen [Thu, 26 Apr 2012 12:56:13 +0000 (14:56 +0200)]
Doc: Use the proper way to find qdoc.

Previously $$QT.core.bins was used to find qdoc, the proper way is to
use qtPrepareTool().

Change-Id: I5d97f5517ae63253ccaf1fb1487034c3a312a074
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDoc: Add "make docs" command for QtXml.
Casper van Donderen [Thu, 26 Apr 2012 12:08:36 +0000 (14:08 +0200)]
Doc: Add "make docs" command for QtXml.

Also fix a typo in the qhp/index URL.

Change-Id: I5774982b15f9de5b59966a2d932307b156eecc7f
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
12 years agoQDoc: Disambiguate prev and next links in html source.
Casper van Donderen [Thu, 26 Apr 2012 05:58:25 +0000 (07:58 +0200)]
QDoc: Disambiguate prev and next links in html source.

Change-Id: Iaa82b9b6de71b577a44eae86eb6847c07d068670
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
12 years agoMap QAccessible::Role to the proper IA2Role.
Jan-Arve Saether [Wed, 25 Apr 2012 08:46:30 +0000 (10:46 +0200)]
Map QAccessible::Role to the proper IA2Role.

All enum values after the MSAA-specific roles needs a special
mapping.

Change-Id: I6c77abf09b68d2d3d772937be986d532db2e5292
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoUse non-blocking reads on virtual keyboard pps device.
Sean Harmer [Thu, 26 Apr 2012 08:49:27 +0000 (09:49 +0100)]
Use non-blocking reads on virtual keyboard pps device.

Change-Id: Iad350c948049128f3014a6ad6536ac9dc2ee86d5
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
12 years agoFix compilation when debug output enabled on virtual keyboard
Sean Harmer [Thu, 26 Apr 2012 08:51:02 +0000 (09:51 +0100)]
Fix compilation when debug output enabled on virtual keyboard

Change-Id: I467e9ef624bcd10cb5b61f6f665a7bbb0bb1f57a
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
12 years agoMake QTimeLine test significant.
Jason McDonald [Mon, 16 Apr 2012 14:12:48 +0000 (00:12 +1000)]
Make QTimeLine test significant.

Known failures in this test are now handled by QEXPECT_FAIL.

Task-number: QTBUG-24796
Change-Id: I12ba57370cf3df1a85a108fbbcdc9db2222491c1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoEnsure that QUrl::{to,from}LocalPath encode/decode properly
Thiago Macieira [Mon, 23 Apr 2012 15:16:31 +0000 (17:16 +0200)]
Ensure that QUrl::{to,from}LocalPath encode/decode properly

Unlike path(), toLocalFile() isn't reporting a URL component, so it
should decode the percent-encoded characters fully. This extra
decoding pass is meant to catch %00 to %1F, %7F and %25 (the percent
sign itself).

It also catches %80 to %FF, which aren't decoded because they don't
form UTF-8 sequences. That means QUrl::toLocalFile() has undefined
behaviour if the path contained non-UTF8 sequences.

Task-number: QTBUG-25459
Change-Id: Iab5a0ba6afcfc4510e297984f2ffc208cedd752b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdded mkspecs for iOS.
Qt4iOS [Fri, 16 Mar 2012 15:00:33 +0000 (15:00 +0000)]
Added mkspecs for iOS.

Modified common MacOS gcc config for iOS compatibility. Added iOS
mkspecs for iOS devices and simulator using G++, LLVM-G++ or CLANG
compilers.

Change-Id: If0a0b1a3ce4e0dc4db319a315e227a9d31549399
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove deprecated conversion from QKeySequence to QString
Olivier Goffart [Fri, 20 Apr 2012 13:08:11 +0000 (15:08 +0200)]
Remove deprecated conversion from QKeySequence to QString

Change-Id: I3844913c16b9d6222f48e66dddc1d680458ffa56
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix QRawFont autotest in Windows
Miikka Heikkinen [Tue, 24 Apr 2012 10:06:33 +0000 (13:06 +0300)]
Fix QRawFont autotest in Windows

Can't use style name with Windows native font engine, so do the
comparison using style in case multipleRawFontsFromData().

Also XFAILed the advances() case when using Freetype font engine in
Windows, as some of the advances returned are one pixel wider than
expected.

Task-number: QTBUG-24197
Change-Id: Ib5fecd83a93908e57a4c82ffb5495a92474ce45a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove QMetaObjectExtraData and put everything into QMetaObject
Olivier Goffart [Fri, 13 Jan 2012 19:09:19 +0000 (20:09 +0100)]
Remove QMetaObjectExtraData and put everything into QMetaObject

QMetaObjectExtraData was added when support for QMetaObject::newInstance
was added. One needed a place to put the pointer to static_metacall in
the QMetaObject.

But as we break binary compatibility, one can change the size of
QMetaObject, and put everything back inside QMetaObject's own structure.
Meaning it is not required anymore to have one QMetaObjectExtraData
instance per QMetaObject anymore.

Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoSplit qobject_impl.h into qobjectdefs_impl.h
Kent Hansen [Fri, 20 Apr 2012 12:45:21 +0000 (14:45 +0200)]
Split qobject_impl.h into qobjectdefs_impl.h

This is done to make QtPrivate::FunctionPointer available to the
QMetaMethod declaration in qmetaobject.h (which already included
qobjectdefs.h, since that's where QMetaObject is declared), so that
the new template-based QMetaMethod::fromSignal() function may be
implemented.

The logic for statically generating the array of qMetaTypeId (used by
the template-based QObject::connect()) remains in qobject_impl.h,
since it's not needed for QMetaMethod::fromSignal(). Moreover, moving
that code would introduce a circular dependency, since qmetatype.h
as of commit 194674044693d6b101c3dc2f4784718540d343a4 now includes
qobjectdefs.h.

Change-Id: I36c35041e0c6661c3cf523684177a0b6c19e2d35
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoAdd comparison operators == and != for QMetaMethod
Kent Hansen [Sun, 22 Apr 2012 18:47:08 +0000 (20:47 +0200)]
Add comparison operators == and != for QMetaMethod

This is done in preparation of introducing the
QObject::connectNotify(QMetaMethod) function. Together with the
forthcoming QMetaMethod::fromSignal() function, which returns the
QMetaMethod corresponding to a Qt/C++ signal (member function), the
comparison operators provide an effective way of checking which
signal was connected to.

Change-Id: I2de48628c4884a7174fb8574895f272cb3fe5634
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoDon't use the QRegExp methods that modify the object [QtWidgets]
Thiago Macieira [Fri, 20 Apr 2012 12:59:30 +0000 (14:59 +0200)]
Don't use the QRegExp methods that modify the object [QtWidgets]

QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I44cc44b75b3da10c5ece97cb6315c2c425327dc0
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agolance: Document all available command line options.
Holger Hans Peter Freyther [Wed, 25 Apr 2012 13:59:49 +0000 (15:59 +0200)]
lance: Document all available command line options.

Change-Id: I0e0d95cb5988574c1ecfbe7423ac7388022101fb
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agobaselineserver: Fix compilation by removing PI_BuildKey from the source
Holger Hans Peter Freyther [Wed, 25 Apr 2012 11:51:50 +0000 (13:51 +0200)]
baselineserver: Fix compilation by removing PI_BuildKey from the source

The buildkey support was removed in 7493ee1c44a16dc3. This commit removed
PI_BuildKey and most of the usages from the code.

Change-Id: I971d68cd4377c358381983c1edcb98360936b698
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoAdd makespecs for standard devices in the OMAP3 family
Romain Pokrzywka [Wed, 25 Apr 2012 00:33:12 +0000 (17:33 -0700)]
Add makespecs for standard devices in the OMAP3 family

The beagleboard and Archos gen8 tablets are built on the same hardware
and OpenEmbedded platform build system.
The makespecs enable OpenGL/ES2 support and EGLFS as the default
platform.

Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Change-Id: I04938676f82f9136efd662ff3ede16221eadf275
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoFix recursion in qwidget gdiPainting test.
Friedemann Kleint [Wed, 25 Apr 2012 14:51:04 +0000 (16:51 +0200)]
Fix recursion in qwidget gdiPainting test.

Change-Id: If4881dfecc6fc7cebcd3ed896846d34e35b3e3ae
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd detection code for AVX2, HLE, RTM and AES to qsimd.cpp
Thiago Macieira [Sun, 22 Apr 2012 14:05:31 +0000 (16:05 +0200)]
Add detection code for AVX2, HLE, RTM and AES to qsimd.cpp

AES is currently not enabled, since we don't use it for anything. The
code is here with the proper detection should we want to in the
future.

RTM and HLE (Transactional Memory Extensions) I'll use soon in the
locking code.

Also rename a few variables to make it easier to read later on.

Change-Id: I800c66d7e1ba86ec037692928d94f53ea5d5868f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoReplace the x86 XGETBV instruction with its opcode bytes
Thiago Macieira [Tue, 24 Apr 2012 14:27:35 +0000 (16:27 +0200)]
Replace the x86 XGETBV instruction with its opcode bytes

This is a new instruction, present on the SandyBridge architecture and
later. Some older assemblers do not support it and produce:

  {standard input}:225:no such instruction: `xgetbv'

The use of this instruction is protected by a CPUID check (function 1,
ECX bit 27), so we only run it in processors that do support it.

Change-Id: Ife7500c0deaab9539074835a4511e8c19602608e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoUpdate the x86 feature-detection code, unifying x86 and x86-64
Thiago Macieira [Sun, 25 Dec 2011 22:36:14 +0000 (20:36 -0200)]
Update the x86 feature-detection code, unifying x86 and x86-64

Most of it is the same for both of them, so let's avoid doing
everything twice. Or more, since we may support x32 soon. For Windows,
use the intrinsics. For GCC, we'd like to use cpuid.h, but it only
exists since GCC 4.3, so we can't.

And properly detect AVX support: it's not enough to detect that the
processor supports them, we also need to check that the OS enabled
support for the 256-bit registers.

Change-Id: Ibb4872cdb774de5701b18c40f4e612330a266214
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix atomics on SPARC
Thiago Macieira [Tue, 24 Apr 2012 16:06:44 +0000 (18:06 +0200)]
Fix atomics on SPARC

Inspired by
https://bugreports.qt-project.org/secure/attachment/26020/qt_atomic_sparc64.patch

Task-number: QTBUG-22479
Change-Id: Ie3275df96c639d6a75e05f70fe5745aeb34457f9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCocoa: support modal windows
Bradley T. Hughes [Wed, 21 Mar 2012 13:01:18 +0000 (14:01 +0100)]
Cocoa: support modal windows

Qt::WindowModal windows and dialogs are shown using [NSApp
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] as
long as they have a valid parent. Otherwise they are behave as
application modal.

Use the existing modal session support in the QCocoaEventDispatcher
(which was inherited from Qt 4) to support Qt::ApplicationModal
windows and dialogs. Some changes to this code are needed to ensure
proper behavior:

1. Window level modification is now done in
QCocoaWindow::recreateWindow() instead of in QCocoaEventDispatcher.
2. Make interrupt() use [NSApp abortModal] to stop a modal session
(previously we were freeing memory from under Cocoa's feet, causing
tools like valgrind and Instruments.app to complain)
3. Do not remove an item from a list and use a const reference to the
removed item immediately after (minor bug fix).

Also make sure that QCocoaEventDispatcher cleans up any modal sessions
and retained user input events on destruction (otherwise we leave
NSApplication in a weird state, which causes some autotest failures).

Change-Id: Iaeefa025400f324b5348b8c81a40384ef026efb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoSkip tst_QInputDialog on Mac OS X
Bradley T. Hughes [Wed, 25 Apr 2012 09:55:43 +0000 (11:55 +0200)]
Skip tst_QInputDialog on Mac OS X

This test hangs in CI, but so far I've been unable to reproduce the
problem. Disable the test for now so that this test does not block
changes that bring in needed functionality.

Task-number: QTBUG-25496
Change-Id: I81faa574b6d7bcab2e32becc2af0f71006c7dd9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRevert QUrl::isRelative to its Qt 4 behaviour
Thiago Macieira [Wed, 25 Apr 2012 10:48:02 +0000 (12:48 +0200)]
Revert QUrl::isRelative to its Qt 4 behaviour

Instead of trying to return whether the URL is relative to something
undefined, let's instead follow what the documentation was saying all
along and what the RFC says about "Relative References".

Change-Id: I32722321a6b36c6e3480669ad769390e4c6f7d1c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>