profile/ivi/qtbase.git
12 years agoFix BC break with QAbstractFileEngine "mount points"
Shane Kearns [Tue, 17 Jan 2012 19:51:39 +0000 (19:51 +0000)]
Fix BC break with QAbstractFileEngine "mount points"

File system cached metadata can't be trusted when custom file engines
are in use, because the custom file engine may want to override the
metadata. (e.g. present an archive file as a directory)

Therefore, check if a file engine should be instantiated for each
result in QDirIterator. This is a fast check if no custom file engines
are registered.
When pushing a directory (using QDirIterator::SubDirectories) the
file engine needs to be instantiated also.

Task-number: QTBUG-23688
Task-number: ou1cimx1#965023
Change-Id: I0114c8df6258535553783a2486131c4194926649
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
(cherry picked from 3864ad09d578210b52e5f58fca2ee8a1144f5be2)

12 years agoFix compilation warnings on MSVC.
Jędrzej Nowacki [Thu, 26 Jan 2012 11:20:06 +0000 (12:20 +0100)]
Fix compilation warnings on MSVC.

Q_STATIC_ASSERT as condition should accept anything cast-able to "bool".

Change-Id: Id76992080f9bb84d3a16b80adffc656d52eca91d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
12 years agoIntroduce QTypeInfo::sizeOf.
Jędrzej Nowacki [Tue, 24 Jan 2012 14:42:01 +0000 (15:42 +0100)]
Introduce QTypeInfo::sizeOf.

In QMetaType "void" is a regular type, lack of c++ sizeof operator
force us to write a template specialization for the type.

Change-Id: I9a56e135223b416b8031836d29ef33ef3fb750e4
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoFix null pointer call in QMetaType::destruct().
Jędrzej Nowacki [Mon, 23 Jan 2012 15:34:50 +0000 (16:34 +0100)]
Fix null pointer call in QMetaType::destruct().

Logic has a flow causing null pointer call during destruction of an
instance of a custom type in bootstrap mode.

The patch doesn't include autotests, because we do not test bootstrap
mode.

Change-Id: Ie70c6f4226cb604f094513621d96a560e84502d7
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoUse per session socket to connect to maliit server
Jan Arne Petersen [Fri, 27 Jan 2012 12:07:48 +0000 (13:07 +0100)]
Use per session socket to connect to maliit server

In newer versions of maliit a per session abstract socket for
communication between maliit server and input contexts is used. The
address is published over the D-Bus session bus as address property in
the org.maliit.Server.Address interface of the
/org/maliit/server/address object at the org.maliit.server service.

Fallback to old socket when org.maliit.server service is not available.

Task-number: QTBUG-22982
Change-Id: I1b2cdd0c804d3d625e18b4958dd60008ea289d91
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoGet rid of checks for Qt3 types
Kent Hansen [Fri, 27 Jan 2012 13:04:12 +0000 (14:04 +0100)]
Get rid of checks for Qt3 types

These types don't exist anymore, so it's pointless to check for them.

Also remove the dead types from uic's type-to-header map.

Change-Id: I7f0af5c337859f3da1c103157a802bbe5372df9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCall connectNotify when connecting with function pointer
Olivier Goffart [Thu, 15 Dec 2011 05:57:17 +0000 (06:57 +0100)]
Call connectNotify when connecting with function pointer

Some objects expect connectNotify to be called in order the signal to be
emitted.

Change-Id: Id0460d9c2aef8f9c3618a2b62b2119a790e06f30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd a set of atomics based on C++11's std::atomic
Thiago Macieira [Sun, 31 Jul 2011 22:33:54 +0000 (19:33 -0300)]
Add a set of atomics based on C++11's std::atomic

The C++11 std::atomic type is very close to our API, to the point one
has to wonder if the committe was inspired by it. It provides all of
the memory semantics that Qt requires and more, plus some
compare-and-swap operations that we don't use.

The idea of returning the actual value in the event of a failed
compare-and-swap is actually quite good, as often we'll retry with
it. We just couldn't come up with a good name (fetchAndTestAndSet?).

The C++11 atomics require that the compiler support constexpr as well,
since std::atomic itself isn't required by the standard to be
trivially-constructible (in fact, it has a constexpr constructor in
the standard). For that reason, we need constexpr so we can add a
constructor to QBasicAtomic too.

Change-Id: I12c51455ba73350a6f7501aacc2ca7681c4369dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdd a set of atomics based on GCC intrinsics
Thiago Macieira [Sun, 31 Jul 2011 22:22:18 +0000 (19:22 -0300)]
Add a set of atomics based on GCC intrinsics

With this implementation, we can have Qt run on any architecture that
GCC supports without having to write specialised code. However, on
some architectures, the code that GCC generates is not optimal: it
uses locking on ARMv5 and it's always fully-ordered. For that reason,
it appears after the Qt native assembly implementations (it's a
fallback, not an override).

Since they all have fully-ordered memory semantics, we define only the
xxxRelaxed functions. The exception is __sync_lock_and_test, which has
acquire semantics, so we need to define the Release and Ordered
versions too.

On some architectures, GCC can support atomics on types different than
32-bit and pointer-sized (like x86, x86-64, ARM and even
MIPS). However, there's no standardised way of telling: GCC seems to
define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} if those operations
are present, but I couldn't find it on the ARM compiler (it was there
for i386, x86-64, IA-64 and MIPS).

Change-Id: I55ff7a7c0cfc6388b7ad8e2c0dedecffdf2a3e01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoPut the generated <module>version.h into build tree
Liang Qi [Fri, 13 Jan 2012 09:57:26 +0000 (10:57 +0100)]
Put the generated <module>version.h into build tree

It was put in source tree before.

Task-number: QTBUG-20439
Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMaking socketOption/setSocketOption virtual on QSslSocket.
Jonas M. Gastal [Thu, 26 Jan 2012 19:19:18 +0000 (17:19 -0200)]
Making socketOption/setSocketOption virtual on QSslSocket.

Per ### Qt5 comment and the fact that it was already virtual on
QAbstractSocket.

Change-Id: If2d2b2f9cdec1ef4c5bf625e3ce0d6f2d9a7bdfd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoCode cleanup, remove QVariant::nameToType usage.
Jędrzej Nowacki [Fri, 27 Jan 2012 13:06:53 +0000 (14:06 +0100)]
Code cleanup, remove QVariant::nameToType usage.

It is better to use QMetaType::type  because it works well with custom
types too.

Change-Id: I30bc70d16b2aad4ba22682de1c215b917e64209b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDo not suppress tr() methods when QT_NO_META_MACROS is defined.
Erik Verbruggen [Thu, 26 Jan 2012 10:19:17 +0000 (11:19 +0100)]
Do not suppress tr() methods when QT_NO_META_MACROS is defined.

The tr() methods are unrelated to the "meta" part, so disabling them
with that macro is not the proper way. They were originally included to
make static checks for string translation simpler, but it just results
in duplicating the definition every time QT_NO_META_MACROS is used.

Change-Id: I29eb9b83a09e1fd6c66c85c9e4ff23d8dbe65f15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQUrl: deprecate setEncodedUrl() and fromEncoded(), add url().
David Faure [Thu, 26 Jan 2012 00:57:59 +0000 (01:57 +0100)]
QUrl: deprecate setEncodedUrl() and fromEncoded(), add url().

setEncodedUrl() isn't necessary anymore now that setUrl can handle
encoded (and partially encoded) urls.
url() is added for symmetry with setUrl().

Change-Id: I4e671482a5635a86797421ca50882db9cd60d852
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQUrl: use partially-decoded data in toString and QUrl(QString)
David Faure [Wed, 25 Jan 2012 18:54:20 +0000 (19:54 +0100)]
QUrl: use partially-decoded data in toString and QUrl(QString)

This fixes round-trip bugs. People expect to be able to do
QUrl u(...); QString s = u.toString(); QUrl u2(s); and have u==u2.
This was not true for paths containing a '#', for instance, which would
be parsed back as a fragment. The solution is to make toString output
partially decoded data (more readable than toEncoded, but not decoded
to the point of changing the meaning, if parsing it back later as a
QUrl), and to make the QUrl constructor work with partially decoded data.

Change-Id: I013c01e8947d538435f3c20fc4ec57cd9ccbba6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix compilation problem in qjsonvalue.h
Jani Uusi-Rantala [Sat, 28 Jan 2012 07:58:16 +0000 (09:58 +0200)]
Fix compilation problem in qjsonvalue.h

Extra ; after namespace was causing build failures with -pedantic.

Change-Id: I340252810a04815820964c625377a1dc0635783f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed includes in public headers
Denis Dzyubenko [Fri, 27 Jan 2012 11:57:46 +0000 (12:57 +0100)]
Fixed includes in public headers

Change-Id: I360c94d41691a618f1bec97da8317c9dcee658c0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdded $publicclassregexp variable to sync.profile
Denis Dzyubenko [Wed, 4 Jan 2012 13:34:39 +0000 (14:34 +0100)]
Added $publicclassregexp variable to sync.profile

$publicclassregexp specifies the prefix for Qt classes in a qt5 module. For example
in QtJsonDb all classes have "JsonDb" prefix and forward include headers were
not generated properly - e.g. "jsondb-client.h" was generated in the include
folder, but "JsonDbClient" (which matches class name) was not.

Change-Id: I6b57a799d926254e2ab3fd00fa6e38f95b8eb96c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
12 years agoQHash benchmark: improve Java's hash
Giuseppe D'Angelo [Wed, 25 Jan 2012 22:12:43 +0000 (22:12 +0000)]
QHash benchmark: improve Java's hash

Added a bit of documentation to the Java-like hashing function.

Change-Id: I3f44eee305d91b76f0f89cd1acf21f6430b9482b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoQHash benchmark: remove unused variables
Giuseppe D'Angelo [Wed, 25 Jan 2012 21:43:28 +0000 (21:43 +0000)]
QHash benchmark: remove unused variables

Change-Id: Ib5abc171fb8fb70e2f73ac92ca22dc09146d8a55
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoimprovements to ModifiedRow
Mark Brand [Wed, 6 Jul 2011 08:58:56 +0000 (10:58 +0200)]
improvements to ModifiedRow

-remove unnecessary explicit copy constructor
-explicitly inline constructor
-more convenient initialization

Change-Id: I78b275ef9d5413f95278a044345e42303dc35624
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agouse nameToIndex() instead of duplicating code
Mark Brand [Wed, 6 Jul 2011 15:08:50 +0000 (17:08 +0200)]
use nameToIndex() instead of duplicating code

Change-Id: If55541aa8a2345f90984d8b82bee0c3ebb01a605
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agofix identation and style
Mark Brand [Wed, 6 Jul 2011 07:50:37 +0000 (09:50 +0200)]
fix identation and style

Change-Id: I18e9e752e8dc0cf980f424264f274177b98a98be
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoQSizeGrip: Fix Windows.
Friedemann Kleint [Thu, 26 Jan 2012 10:01:13 +0000 (11:01 +0100)]
QSizeGrip: Fix Windows.

Reactivate the old Windows code.

Change-Id: Ied467cf83d89c76a0fa8edf3c76bb207cc2a70e0
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoDecouple QPlatformTheme from QDialog.
Friedemann Kleint [Thu, 26 Jan 2012 10:29:24 +0000 (11:29 +0100)]
Decouple QPlatformTheme from QDialog.

- Use an enumeration for the dialog type.
- Implemented on Windows and Mac

Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com>
Change-Id: I213748a08168efbabc2ac0106308e97ff19d19c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindowsXP-Style: Draw on DC of backing store for widgets only.
Friedemann Kleint [Fri, 27 Jan 2012 10:21:13 +0000 (11:21 +0100)]
WindowsXP-Style: Draw on DC of backing store for widgets only.

- Check the device type pof the painter passed in.
- Introduce convenience functions for retrieving the DC for
  widgets that default to the top level.

Change-Id: I18a8db02c8ffd7a249310a5ffaf3a530f0a3df40
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoWindows: Fix exit crash related to deletion of platform screens.
Friedemann Kleint [Fri, 27 Jan 2012 13:49:02 +0000 (14:49 +0100)]
Windows: Fix exit crash related to deletion of platform screens.

Do not delete screens in the destructor as this might call
back to the Windows and use QWindowsContext.

Change-Id: I5e66e480d4b6ddb8b17cc92e4bef93013e336be6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdd concurrent to QT_CONFIG also on Windows
Samuli Piippo [Thu, 26 Jan 2012 11:52:44 +0000 (12:52 +0100)]
Add concurrent to QT_CONFIG also on Windows

It was forgotten in 7c64ab4966e24834768eb1a09b3d2fd08471787a

Change-Id: I1ed9a60983f978d89615ae91c99f5c02ffe57f7c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix compilation of MeeGo/Maliit related code after Qt::ScreenOrientation API changes
Simon Hausmann [Fri, 27 Jan 2012 12:39:45 +0000 (13:39 +0100)]
Fix compilation of MeeGo/Maliit related code after Qt::ScreenOrientation API changes

Qt::UnknownOrientation is now Qt::PrimaryOrientation.

Change-Id: I2846a90bd11ecd1416c29b7bd861f180ccb129a1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agoremove bogus comment
Oswald Buddenhagen [Mon, 23 Jan 2012 15:08:39 +0000 (16:08 +0100)]
remove bogus comment

Change-Id: Ibd2d974ac46f80953f628e8d7c93e742e4c8eb23
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agodelete handling of dead -base-dir argument
Oswald Buddenhagen [Mon, 23 Jan 2012 14:40:33 +0000 (15:40 +0100)]
delete handling of dead -base-dir argument

Change-Id: I4f69ea213f996f99d2ad8b00efbaf85882e59e27
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoupdate readme to current reality
Oswald Buddenhagen [Tue, 10 Jan 2012 16:46:20 +0000 (17:46 +0100)]
update readme to current reality

Change-Id: I330702f197c8b558f0a00b90f5e147dbef731abd
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoGives QNetworkCookieJar a virtual API.
Jonas M. Gastal [Wed, 11 Jan 2012 19:00:11 +0000 (17:00 -0200)]
Gives QNetworkCookieJar a virtual API.

QNetworkCookieJar now has the following virtual methods:
    virtual bool validateCookie(QNetworkCookie &cookie);
    virtual bool insertCookie(const QNetworkCookie &cookie, const QUrl &url);
    virtual bool updateCookie(const QNetworkCookie &cookie);
    virtual void deleteCookie(const QNetworkCookie &cookie);
Their implementation is such that the behavior the class previously
had(in memory storage of the cookies) is mantained.

Task-number: QTBUG-23145
Change-Id: I1420894d31e8072eca6903c3c7ffd6f06205a257
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoQWidgets to use QGuiApplication focus object change notifications
Pekka Vuorela [Mon, 23 Jan 2012 11:09:14 +0000 (13:09 +0200)]
QWidgets to use QGuiApplication focus object change notifications

Moving away from deprecated QInputPanel inputItem.

Small behavioral changes:
- On focus proxy widgets, disabling WA_InputMethodEnabled on
proxy will no longer disable input method for proxy target.
- setEnabled(false) on proxy widget will no longer disable
input method for target as a special case.

Change-Id: Ifb5b7144d29bd3aefdde7cf4a0bd396db06e67e2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoQGuiApplication::focusObject() to replace QInputPanel::inputItem()
Pekka Vuorela [Fri, 20 Jan 2012 15:57:21 +0000 (17:57 +0200)]
QGuiApplication::focusObject() to replace QInputPanel::inputItem()

* Deprecated QInputPanel::inputWindow() which is already
  just returning QGuiApplication::activeWindow()
* Deprecated QInputPanel::inputItem() and introduced
  QGuiApplication::focusObject(). Input methods can check
  input method support by Qt::ImEnabled query.

Change-Id: I70a9c1c3f79aadb75c839d0489a9428f7a221df5
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoQRegularExpression: infrastructure for importing PCRE in 3rdparty/
Giuseppe D'Angelo [Mon, 23 Jan 2012 23:04:02 +0000 (23:04 +0000)]
QRegularExpression: infrastructure for importing PCRE in 3rdparty/

Added the necessary files for importing and compiling PCRE under
3rdparty/, including a small shell script to ease the import
and the update of PCRE from its dist tarball.

PCRE's config.h is used, but it is assumed that a global
  s/HAVE_CONFIG_H/PCRE_HAVE_CONFIG_H/g
was run on PCRE source files to avoid polluting QtCore
compilation with -DHAVE_CONFIG_H (the aforementioned shell script
performs this substitution; therefore, -DPCRE_HAVE_CONFIG_H
is added instead to the compiler's command line).

Change-Id: Ic0f23526ebf5f770aefdffc8f688e5816c28fd8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFall back on glXChooseVisual() if glXChooseFBConfig() doesn't work.
Samuel Rødal [Wed, 25 Jan 2012 17:27:50 +0000 (18:27 +0100)]
Fall back on glXChooseVisual() if glXChooseFBConfig() doesn't work.

Some older drivers don't fully support glXChooseFBConfig(). As a bonus,
fix some memory leaks here and there.

Task-number: QTBUG-21880
Change-Id: Ie306dee27f616927a6aa55fd71601569b828afcc
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoIntroduced QOpenGLContext::defaultFramebufferObject().
Samuel Rødal [Thu, 26 Jan 2012 10:44:05 +0000 (11:44 +0100)]
Introduced QOpenGLContext::defaultFramebufferObject().

Also add some debugging helpers to make sure applications are correctly
written even on less restrictive platforms.

Change-Id: Ie92e497c32e07b2b83662f7ab5540d8f37777fd0
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years ago"cache" is used only locally, so move it into scope
Oswald Buddenhagen [Mon, 9 Jan 2012 19:20:00 +0000 (20:20 +0100)]
"cache" is used only locally, so move it into scope

Change-Id: I0ba45d5620a8e5a79fdc6a1854245a0bfcc489f0
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoRemove qDBusNameToTypeId function.
Jędrzej Nowacki [Thu, 26 Jan 2012 15:54:43 +0000 (16:54 +0100)]
Remove qDBusNameToTypeId function.

The function is redundant and can be replaced by QMetaType::type().

Change-Id: I131a7fd285a60d8bd0f3b958668a43bd5da2d6c4
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoStyle fix for QSslCertificate constructor.
Jonas M. Gastal [Thu, 26 Jan 2012 12:59:34 +0000 (10:59 -0200)]
Style fix for QSslCertificate constructor.

Change-Id: I1f128eb9f99ef4d25590bd034762cb8a0e68b075
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoRemoving ### that would cause needless SC brekage.
Jonas M. Gastal [Thu, 26 Jan 2012 12:53:24 +0000 (10:53 -0200)]
Removing ### that would cause needless SC brekage.

Change-Id: Iaa9cfd709c0ca4192760117ba5ec6d3992804d6a
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoImplement QWindow::close()
Anselmo L. S. Melo [Fri, 20 Jan 2012 12:08:42 +0000 (09:08 -0300)]
Implement QWindow::close()

Implement the public slot QWindow::close() and add the correspondent test.

Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoGive a more verbose warning during QVariant serialization.
Jędrzej Nowacki [Thu, 26 Jan 2012 14:39:50 +0000 (15:39 +0100)]
Give a more verbose warning during QVariant serialization.

Change-Id: Ia3c0736284afbd4acd8cc86538f5a5399964a589
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoQRegularExpression: configure support for PCRE
Giuseppe D'Angelo [Mon, 23 Jan 2012 22:31:13 +0000 (22:31 +0000)]
QRegularExpression: configure support for PCRE

Added PCRE config.tests, and logic and command line options
(-qt-pcre and -system-pcre) for configure and configure.exe.

Change-Id: I5da2658191198dbcf48c07d7c5de1be1b884a7a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agofix grammar in error message
Oswald Buddenhagen [Mon, 23 Jan 2012 15:02:33 +0000 (16:02 +0100)]
fix grammar in error message

Change-Id: I3fe4e0fa6da1467a4572e7f1dec1be7294632e34
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agouse warnings instead of -w
Oswald Buddenhagen [Wed, 11 Jan 2012 18:12:27 +0000 (19:12 +0100)]
use warnings instead of -w

that way invocation via perl (c.f. syncqt.bat) does not need options.

Change-Id: I5d8e0d1f0ffe1b7cf280fe97d4f70968a3dbbb22
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoAdd mkspecs for Blackberry Playbook NDK
Rafael Roquetto [Tue, 24 Jan 2012 17:05:07 +0000 (18:05 +0100)]
Add mkspecs for Blackberry Playbook NDK

mkspecs for QNX qcc, armv7le and x86 targets

Change-Id: Ie4b0ec46a8837ad63f5aea8429cfdd516531e09a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQProcess/Win: use asynchronous I/O for reading stdout and stderr
Joerg Bornemann [Mon, 16 Jan 2012 11:02:47 +0000 (12:02 +0100)]
QProcess/Win: use asynchronous I/O for reading stdout and stderr

This saves us from using the 100 ms polling timer to read process output.

Task-number: QTBUG-23012
Change-Id: I3f9398d7a4d30826d2d89ac04bd2fd031500ff57
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQProcess/Win: use named pipes for redirecting standard I/O
Joerg Bornemann [Thu, 8 Dec 2011 13:16:47 +0000 (14:16 +0100)]
QProcess/Win: use named pipes for redirecting standard I/O

Named pipes allow us to make use of overlapped I/O for
redirected stdin, stdout and stderr.

Change-Id: I50191b036bce696147139b200ddbc6c31c16112b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix a typo in tst_qtreewidget autotest.
Jędrzej Nowacki [Fri, 20 Jan 2012 14:51:26 +0000 (15:51 +0100)]
Fix a typo in tst_qtreewidget autotest.

Change-Id: I573467c3fdfc4b3d059b216258d39944ac546061
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix virtual keyboard on Harmattan not following window content orientation changes
Simon Hausmann [Thu, 26 Jan 2012 13:35:55 +0000 (14:35 +0100)]
Fix virtual keyboard on Harmattan not following window content orientation changes

Track the input item's window and notify the input method server when the content
orientation changes.

Change-Id: I401c4fd677ed2eebd8b85968d4a2b3692517e097
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agoMade it possible to run tst_qtjson test from shadow build directory.
Denis Dzyubenko [Thu, 26 Jan 2012 10:50:07 +0000 (11:50 +0100)]
Made it possible to run tst_qtjson test from shadow build directory.

Change-Id: I167737c91e01f055a2ce14db54dfcc6b74ad8c28
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQStandardPaths: remove unused includes (leftovers from qdesktopservices)
David Faure [Wed, 25 Jan 2012 18:53:22 +0000 (19:53 +0100)]
QStandardPaths: remove unused includes (leftovers from qdesktopservices)

Change-Id: I6fe23ecd04adc7dd68573dd0d6d01888c0cf71b6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoQUrl: Implement a number of ## Qt5 TODOs (merging overloads)
David Faure [Wed, 25 Jan 2012 17:03:37 +0000 (18:03 +0100)]
QUrl: Implement a number of ## Qt5 TODOs (merging overloads)

Change-Id: I629c20f10e3667937d488ea30f93bf86f980ee1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoConvert tst_qurl.cpp to UTF-8 (to make it editable in QtCreator)
David Faure [Tue, 24 Jan 2012 21:33:48 +0000 (22:33 +0100)]
Convert tst_qurl.cpp to UTF-8 (to make it editable in QtCreator)

Change-Id: I9baa445b11f65b28596e5b88746b72c5cf04fe77
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoSend text selection changes for accessibility.
Frederik Gladhorn [Fri, 20 Jan 2012 17:12:13 +0000 (18:12 +0100)]
Send text selection changes for accessibility.

Change-Id: I3c50510ae9f995101d6e2c977c5138713389d71e
(cherry picked from commit 2cf1f24f93fa0f3f5bd7d38e160160a2c91d87f5)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFixed QString::operator<(QLatin1String)
Denis Dzyubenko [Thu, 26 Jan 2012 10:13:41 +0000 (11:13 +0100)]
Fixed QString::operator<(QLatin1String)

QLatin1String now has a constructor that takes explicit length, which makes it
possible to create QLatin1String that do not have null-termination character.
Fixed QString::operator> and < to be safe in that case.

In the same patch fixed qtjson which had operator< implemented in the same way.

QString::compare(QLatin1String) is still broken and will be fixed separately.

Change-Id: I48ec1183a6f44034129cc17312af854795085408
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove the 'macosx' arch
Bradley T. Hughes [Wed, 25 Jan 2012 15:12:53 +0000 (16:12 +0100)]
Remove the 'macosx' arch

The new atomic implementation chooses which header to include based
on what #define's are set by the compiler (i.e. __x86_64__ or
__i386__). Because of this, the qatomic_macosx.h header isn't used
anymore. This also means that the configure script does not need to
use or look for this file anymore, it should just use the normal
uname -m detection.

Change-Id: Ibf275488735483268286196952299c0e496dfd1f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMark the single argument containers as movable.
Stephen Kelly [Tue, 24 Jan 2012 22:27:34 +0000 (23:27 +0100)]
Mark the single argument containers as movable.

Change-Id: I1557b9f3c2d3ad805e1ab7bf4d49973f08664a79
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoAutomated metatype definition for template types.
Stephen Kelly [Sat, 31 Dec 2011 06:25:07 +0000 (07:25 +0100)]
Automated metatype definition for template types.

If T is defined as a metatype, then QList<T> is too automatically.

So for example, no need to use

  Q_DECLARE_METATYPE(QList<int>)

anymore.

This is a source compatible change.

Change-Id: I2ee8a7b9e28fe6d4775f6a05cce39aca8563e0c5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoCleanup of QWindowsVistaStyle.
Friedemann Kleint [Wed, 25 Jan 2012 15:47:41 +0000 (16:47 +0100)]
Cleanup of QWindowsVistaStyle.

- Remove the limbowidget, try to obtain HWND from a toplevel or
  the desktop instead.
- Clean up handling of the theme map, avoid operator[] and
  repeated invocation of of map.end()

Change-Id: Ic5ea6186508f37aaff782ca304ce577899f7b41c
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoMade QWindow::currentOrientation() a property.
Samuel Rødal [Wed, 25 Jan 2012 12:41:43 +0000 (13:41 +0100)]
Made QWindow::currentOrientation() a property.

To match the previous QWindow::orientation() property which can be
useful to access from QML. Also, removed the automatic translation of
Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow
level, as it leads to a lot of complexity regarding the
QWindow::contentOrientationChanged() signal, and makes it hard to
distinguish between the case where the window's orientation follows
that of the screen, and the case where the orientation just happens to
be set to that of the screen.

Change-Id: I6950d1337b7f929815eff1328181855090d8066b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoWrap unimplemented clang feature in __has_feature
Olivier Goffart [Tue, 24 Jan 2012 17:51:51 +0000 (18:51 +0100)]
Wrap unimplemented clang feature in __has_feature

So that when they are actually implemented in future version, the proper
defines get defined.

Change-Id: I5cc3e3ef64b06facc27e6d697700dcb7a96300d5
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix a couple of edge cases for WildcardUnix matching
Andy Shaw [Thu, 19 Jan 2012 16:32:41 +0000 (17:32 +0100)]
Fix a couple of edge cases for WildcardUnix matching

Fix a couple of cases where WildcardUnix was not matching when the
string was just [] or ended with a \.

The testWildcardEscaping() test has been extended to account for these
two cases too.

Integrate 7ce3726aea4be2dfdb57966a4482f66fec6f8f57 from 4.8

Task-number: QTBUG-20897
Change-Id: I7a07ac008473fa7a080db752e189f6404842603f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove QTextControl and QLineControl.
Andrew den Exter [Mon, 23 Jan 2012 06:34:33 +0000 (16:34 +1000)]
Remove QTextControl and QLineControl.

QtWidgets and QtDeclarative now both have their own versions of these
so there's no need to keep them around any longer.

Change-Id: I9c2201c8495a0a0816e2af16c8f647fcad991479
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCleanup mess in public type ids.
Jędrzej Nowacki [Fri, 13 Jan 2012 09:41:02 +0000 (10:41 +0100)]
Cleanup mess in public type ids.

There is no reason to keep two separated core types sets. It
couldn't be fixed before Qt5 because of binary compatibility promise.

This patch merges QMetaType core types with ext core types.

This "simple" operation consists of:
- QDataStream version was incremented, because type ids are
saved in QVariant's data stream.
- QMetaType LastExtCoreType and FirstExtCoreType were replaced by
LastCoreType, FirstCoreType and new QMetaType::HighestInternalId.
- New tests checking QVariant data stream for Qt4 and for Qt5 versions
were added.

Change-Id: I02dd74d29317365c297a789a4eb7c9c5edc3b231
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoFix building of configure.exe.
Friedemann Kleint [Wed, 25 Jan 2012 18:34:49 +0000 (19:34 +0100)]
Fix building of configure.exe.

Add missing files to profile.

Change-Id: I72ccbbbef3e036fc0cfe7a0a6df4c19d0474b798
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQAbstractSocket / QSslSocket: add API to pause and resume
Peter Hartmann [Fri, 20 Jan 2012 12:55:15 +0000 (13:55 +0100)]
QAbstractSocket / QSslSocket: add API to pause and resume

pause and resume is currently only supported upon emitting the
QSslSocket::sslErrors() signal. The API was added in QAbstractSocket to
also support QAbstractSocket::proxyAuthenticationRequired() in the
future.

This is the first patch to support that feature on the socket level,
another patch will follow to support sslErrors() and
authenticationRequired() in QNetworkAccessManager / QNetworkReply.

Task-number: QTBUG-19032
Change-Id: Ide2918268590ab9a01454ab26cb7fdca3dc840ab
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoIntroduce QGuiApplicationPrivate::windowForWidget.
Friedemann Kleint [Wed, 25 Jan 2012 11:43:20 +0000 (12:43 +0100)]
Introduce QGuiApplicationPrivate::windowForWidget.

Change getHWNDForWidget() to take a const QWidget *.

Change-Id: I6b0d0bce70487304dfcd4e7a6a039fe8c7ca4aae
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoWindows Vista Style: Fix drawing of buttons in message boxes.
Friedemann Kleint [Wed, 25 Jan 2012 11:31:50 +0000 (12:31 +0100)]
Windows Vista Style: Fix drawing of buttons in message boxes.

Do not use the HDC of the backing store when drawing to an image
(as opposed to 4.8, where the HDC of the paint engine was used).
This causes 'ghost buttons' to appear in the dialog box at 0,0.

Change-Id: I301b66abf4447a65ee144f09655b68efaf18700d
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
12 years agoWidgets: Enable Windows styles on Windows.
Friedemann Kleint [Wed, 25 Jan 2012 11:26:37 +0000 (12:26 +0100)]
Widgets: Enable Windows styles on Windows.

Change-Id: I1f1a675ad52da2bfb8988d91012d725469d1cac9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMark the enumerator QVariant::Type as obsolete.
Stephen Kelly [Wed, 25 Jan 2012 09:22:05 +0000 (10:22 +0100)]
Mark the enumerator QVariant::Type as obsolete.

In most cases, QMetaType::Type should be used (contains more
entries) and in APIs an int should be used to allow for
user-extended metatypes.

Change-Id: Iaa768f6d510686da36c61b8aaf5de3ac53a6f463
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agobearer: run the bearer engines in their own worker thread
Shane Kearns [Wed, 1 Jun 2011 15:35:43 +0000 (16:35 +0100)]
bearer: run the bearer engines in their own worker thread

The original architecture of the QtNetwork bearer support hosted the
engines in the application's main thread, but this causes some problems.
If the QNetworkConfigurationManager is constructed in a worker thread,
then it is populated asynchronously without any notification when it is
done (the app gets incomplete or missing results)
Fixing that by restoring the earlier behaviour of using blocking queued
connections to wait for the lists to be populated caused a regression,
as some applications deadlock because the main thread is waiting on the
worker thread at this time.

By introducing a dedicated worker thread for the bearer engines,
QNetworkConfigurationManager can be safely constructed in any thread
while using blocking queued connections internally.

Task-number: QTBUG-18795
Change-Id: Iaa1706d44b02b42057c100b0b399364175af2ddb
Reviewed-by: mread
(cherry picked from commit 5f879c55e531165cc2569b03c3796d0f33d0a0b7)
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Murray Read <ext-murray.2.read@nokia.com>
Reviewed-by: Alex <alex.blasche@nokia.com>
12 years agoDon't lose the fontDef when setting the size of a raw font.
Pierre Rossi [Tue, 24 Jan 2012 19:22:14 +0000 (20:22 +0100)]
Don't lose the fontDef when setting the size of a raw font.

QFontEngineFT::cloneWithSize, which is used among other things by
QRawFont::setPixelSize, should create a new font engine using the font
definition from the current font engine.

Change-Id: I9415422bbecc2bf7b7acf105c12c1c83a894526c
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoMark QStringList as movable.
Stephen Kelly [Tue, 24 Jan 2012 22:28:11 +0000 (23:28 +0100)]
Mark QStringList as movable.

Change-Id: I27fb523c43ace195d04d729c800669246a1930d7
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed fileiterator issue for WEC7.
Janne Anttila [Mon, 12 Sep 2011 12:00:01 +0000 (15:00 +0300)]
Fixed fileiterator issue for WEC7.

WEC7 does not support FIND_FIRST_EX_LARGE_FETCH with FindFirstFileEx,
but windowsVersion for WEC7 is still resolved as WV_WINDOWS7.

If the FIND_FIRST_EX_LARGE_FETCH flag is passed to FindFirstFileEx
in WEC7, the method does never find any files from given directory.
Changed FIND_FIRST_EX_LARGE_FETCH flag to apply only when Q_OS_WINCE
is not defined.

Task-number: QTBUG-22503
Change-Id: Ic38cf745cda7ee7b23da67dc390ac0e6d04158cd
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
12 years agoRemove use of QT_MODULE from library
Gunnar Sletta [Mon, 9 Jan 2012 07:53:17 +0000 (08:53 +0100)]
Remove use of QT_MODULE from library

These defines were there to aid in the commercial
licensing scheme we used long ago, and are no longer needed.

Keep a QT_MODULE(x) define so other modules continue compiling.

Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agomoc: Use QMetaType::QVariant as the type for QVariant
Kent Hansen [Fri, 6 Jan 2012 12:43:40 +0000 (13:43 +0100)]
moc: Use QMetaType::QVariant as the type for QVariant

QMetaType::QVariant has existed as a proper type for almost two
years, but the qvariant_nameToType function was written in 2006.

Using QMetaType::QVariant means QVariant can be treated just like
any other type. We can get rid of those hacky checks for LastType,
and the remaining checks become more readable.

The fact that QMetaProperty::{type,userType}() returned LastType
(0xffffffff) for QVariants was never documented (LastType itself is
internal). But there are other Qt modules that assume so. I'll fix
the ones I know about (qtdeclarative, qtscript, activeqt).

Change-Id: I799b9079bb8bbb1fe76c132525440b30415cbac5
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdd Native Client port mkspecs.
Morten Johan Sorvig [Fri, 13 Jan 2012 06:33:11 +0000 (07:33 +0100)]
Add Native Client port mkspecs.

Support cross-compiling for x86 and x86_64 nacl.

Change-Id: I652702f9671b35963450c42dac5e27bedc698df0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agotst_qobject: Run as console application.
Friedemann Kleint [Tue, 24 Jan 2012 15:24:24 +0000 (16:24 +0100)]
tst_qobject: Run as console application.

Change-Id: If3049249cf8ceeb0985d158209e217455bfc3c47
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMake coordinates float based where it makes sense.
Lars Knoll [Thu, 11 Aug 2011 14:23:10 +0000 (16:23 +0200)]
Make coordinates float based where it makes sense.

Mouse and Hover events already use FP corrdinates. They
also make sense for tablet and drop events.

Task-number: QTBUG-20115
Change-Id: Iff35d1f468567bd5a37236853dbc7725a37d87f2
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoIncluded stdlib.h to allow malloc() usage
Rafael Roquetto [Tue, 24 Jan 2012 17:23:32 +0000 (18:23 +0100)]
Included stdlib.h to allow malloc() usage

Depending on indirect inclusion was a mistake and caused compilation to break
on the QNX (BlackBerry NDK 2) target.

Change-Id: I447aec68bfe02447639a096c0c2f928bd4381cd9
Reviewed-by: David Faure <david.faure@kdab.com>
12 years agoremove vestiges of text codec plugins
Mark Brand [Mon, 23 Jan 2012 22:12:46 +0000 (23:12 +0100)]
remove vestiges of text codec plugins

follow-up to 3a3356a85079d734dfa57205a00e1996afc033df

Change-Id: Iba84958cbcd105ec702568752090719cc108e101
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove support for the MNG file format and the bundled libmng
aavit [Tue, 24 Jan 2012 15:05:02 +0000 (16:05 +0100)]
Remove support for the MNG file format and the bundled libmng

The MNG file format is generally abandoned, and libmng has been
unmaintained for several years.

The MNG plugin and bundled libmng has been moved to the
qtimageformats project on Gerrit.

Task-number: QTBUG-21869
Change-Id: I946432347014ffde2b72307a5f8b166ca5553602
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdd a changed() signal to QValidator.
Andrew den Exter [Wed, 18 Jan 2012 03:04:21 +0000 (13:04 +1000)]
Add a changed() signal to QValidator.

This provides a general notification of changes that may change the
validity of previously validated input.

Change-Id: I5ec6f127af60fdca68605fee903a08758bc01360
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix a compile error in qsql_sqlite2.cpp
Lars Knoll [Tue, 24 Jan 2012 21:24:34 +0000 (22:24 +0100)]
Fix a compile error in qsql_sqlite2.cpp

The compile error got introduced due to the
change in QMetaType requiring fully defined
types for pointers.

Change-Id: I6383ff5923fc1d5bd3c1161e2823e83f2a06a99e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoDocument where modelReset() is emitted
Simon A. Eugster [Tue, 24 Jan 2012 14:10:08 +0000 (15:10 +0100)]
Document where modelReset() is emitted

The resetModel() signal indicates that the model is reset. Previously
there was no note that the signal is emitted also when endResetModel()
is called.

Task-number: QTBUG-23755
Change-Id: I6c3c1ccef580e9c1112c3af79912cffca675e140
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQKeySequence: fix copy/paste error in autotest
David Faure [Tue, 24 Jan 2012 18:04:49 +0000 (19:04 +0100)]
QKeySequence: fix copy/paste error in autotest

Change-Id: If03a99c9aa7210d3f166c2674831c645f67b1794
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRemove Q_COMPILER_FINAL
Olivier Goffart [Tue, 24 Jan 2012 17:36:51 +0000 (18:36 +0100)]
Remove Q_COMPILER_FINAL

Merge it with Q_COMPILER_EXPLICIT_OVERRIDES

No compiler will implement one and not the other,
"overrideS" is a shortcut for the two features

It was even wrongly not defined with clang

Change-Id: I22dcffe6f0c96285c2b409a5ae9ce2f6f1652094
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd autotest for failing signal connection.
Friedemann Kleint [Mon, 16 Jan 2012 09:39:04 +0000 (10:39 +0100)]
Add autotest for failing signal connection.

Change-Id: Iaae93253fa6d1ca0798d05d69a7ab6d6ff8b60bc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoRe-enable 'make check' for tests/auto/widgets
Bradley T. Hughes [Wed, 18 Jan 2012 08:05:46 +0000 (09:05 +0100)]
Re-enable 'make check' for tests/auto/widgets

We want the autotests for the QtWidgets library to be run on Mac OS X as
well.

Change-Id: Ie731b802b64222c84116e2df82f536acf4971565
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoDeprecate QAbstractItemModel::reset().
Stephen Kelly [Tue, 24 Jan 2012 15:48:22 +0000 (16:48 +0100)]
Deprecate QAbstractItemModel::reset().

It is broken in most uses because it emits modelAboutToBeReset()
after actually resetting the internal data instead of before.

That is, usually it is used like this:

myData.clear();
reset();

Which should be

beginResetModel();
myData.clear();
endResetModel();

Change-Id: I7b00a1e40c4915930944340764074efc29faaf5a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoadd missing move* methods to QAbstractItemModel
Mark Brand [Sun, 10 Apr 2011 19:48:36 +0000 (21:48 +0200)]
add missing move* methods to QAbstractItemModel

The existence of QAbstractItemModel virtual methods
    moveRow, moveColumn, moveRows, and moveColumns
is implied by the existence of
   beginMoveRows, endMoveRows, beginMoveColumns and endMoveColumns.
However, these were not actually provided by QAbstractItemModel.

With this change, subclasses can implement support for moving rows
and columns following the same pattern as for insert* and remove*.

Change-Id: Iad8b2223d4b9303abb6459c174a82ffed71a0fdf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoMove glyphMargin() to QFontEngine
Jiang Jiang [Mon, 23 Jan 2012 14:06:41 +0000 (15:06 +0100)]
Move glyphMargin() to QFontEngine

glyphMargin() support for QTextureGlyphCache is implemented in
respective font engines, thus this function is platform dependent.
Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC,
now we should move them into QFontEngine and its subclasses.

So far only Windows font engines support it. FreeType and Core Text
based font engines all ignore it.

Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoMake mid() and midRef() properly return empty, non-null objects
Giuseppe D'Angelo [Mon, 23 Jan 2012 12:02:36 +0000 (12:02 +0000)]
Make mid() and midRef() properly return empty, non-null objects

If we request a substring starting at the very end of the string,
QString::mid should return an empty string, not a null string.
For instance, QString("abc").mid(3, 0) used to return a null
one, while this patch makes it return an empty one. The
same thing applies to QString::midRef() and QByteArray::mid().

Change-Id: Ie9efd7a0622d429efd0fb682c19856c19e9469af
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMade window orientation API more flexible.
Samuel Rødal [Fri, 13 Jan 2012 09:31:11 +0000 (10:31 +0100)]
Made window orientation API more flexible.

Previously we only had QWindow::setOrientation() which was a hint about
the orientation the window's contents were rendered in.

However, it's necessary to separate between the orientation
corresponding to the window buffer layout and orientation of the
contents. A game for example might typically want to use a landscape
buffer even on a portrait device. Thus, we replace
QWindow::orientation() with QWindow::reportContentOrientationChange() and
QWindow::requestWindowOrientation().

Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQMessageBox: Clean up some Q_WS_WIN code.
Friedemann Kleint [Fri, 20 Jan 2012 16:33:23 +0000 (17:33 +0100)]
QMessageBox: Clean up some Q_WS_WIN code.

Enable 'Close' of system menu according to whether escape
button is present.

Change-Id: I305e4732f781dbe2d81c2503ee278ec33579acdb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoImport json support from playground/qtbinaryjson
Lars Knoll [Wed, 18 Jan 2012 09:12:50 +0000 (10:12 +0100)]
Import json support from playground/qtbinaryjson

This imports the JSON support for Qt 5 from
playground/qtbinaryjson.

It adds a fast, fully compliant json parser, a
convenient C++ API, conversion to and from
QVariants and a binary format for JSON that is
extremely fast to use together with the C++ API.

Change-Id: If9e3a21a4241d388d0abaa446b6824f9cc6edb1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoStore the is-a QObject fact with the metatype declaration.
Stephen Kelly [Fri, 30 Dec 2011 11:00:09 +0000 (12:00 +0100)]
Store the is-a QObject fact with the metatype declaration.

This is a source incompatible change for Q_DECLARE_METATYPE(T*),
which now requires T to be fully defined.

The consequences of this are:
 * Forward declared types can no longer be declared as a metatype.
     (though this is a very uncommon thing to do).

There is a trivial workaround where necessary.

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