profile/ivi/qtbase.git
12 years agochoke uploadProgress signals
Shane Kearns [Mon, 28 May 2012 15:27:58 +0000 (16:27 +0100)]
choke uploadProgress signals

The QNetworkReply::uploadProgress signal is intended for updating UI
elements such as a progress bar.
Limit the signal emissions to 10 per second to prevent overloading
the UI with updates.
As with the downloadProgress choke, this is implemented by dropping
signals that occur within 100ms of the previous emission.

The 100% signal is always emitted (bytesSent == bytesTotal)
When the upload size is initially unknown, this behaviour is still
provided by the upload device emitting a suitable readProgress
signal when EOF is reached.

Task-number: QTBUG-20449
Change-Id: I77e03c8a49109106e1c375ee00380293fd326b63
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agochoke downloadProgress signals
Shane Kearns [Thu, 24 May 2012 15:14:28 +0000 (16:14 +0100)]
choke downloadProgress signals

The QNetworkReply::downloadProgress signal is intended for updating
user interface components (e.g. a progress bar).
Limit signal emissions to 10 times per second, with an additional
signal just before the finished() signal to provide the 100% progress.

For the size of download where a progress bar is necessary, this
update frequency seems sufficient.

The implementation is done by dropping signals which would be emitted
less than 100ms after the previous signal emission.

Task-number: QTBUG-20449
Change-Id: I9c2dbe16c70f3270cbf98f3c74cf9d9a3f0ab900
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
12 years agodisable codecs for asian language when QT_NO_BIG_CODECS defined
Tasuku Suzuki [Fri, 1 Jun 2012 03:42:50 +0000 (12:42 +0900)]
disable codecs for asian language when QT_NO_BIG_CODECS defined

Change-Id: I45025b13bacc5f63946b02a87c742beff1946c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRegenerate the Unicode tables
Konstantin Ritt [Mon, 11 Jun 2012 12:14:25 +0000 (15:14 +0300)]
Regenerate the Unicode tables

Change-Id: I64b93ba8ec85eff5e308d92c57e98e8745c43d66
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake QUnicodeTables::script() support SMP code points
Konstantin Ritt [Mon, 11 Jun 2012 12:19:24 +0000 (15:19 +0300)]
Make QUnicodeTables::script() support SMP code points

Instead of expanding the scripts table with script values for the code points
>= 0x10000, it has been merged with the properties table in order to
increase perfomance of the script itemization code (not affected yet).
(Stats: the properties table grew up in 97428-89800 = 7628 bytes;
        the old scripts table was of size 7680 bytes)

The outdated ScriptsInitial.txt and ScriptsCorrections.txt file has been removed
(they were just empty, the "corrigendum" script corrections should be applied
to Scripts.txt directly, *no customization allowed*!).

More script testcases has been added - at least one per supported script.

Task-number: QTBUG-6530

Change-Id: I40a9e76f681e2dd552fd4c61af0808d043962e79
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQFontMetrics/QRawFont: Optimize SMP code points handling a bit
Konstantin Ritt [Sun, 10 Jun 2012 15:30:10 +0000 (18:30 +0300)]
QFontMetrics/QRawFont: Optimize SMP code points handling a bit

Calling QString::fromUcs4() for the single UCS-4 -encoded character is quite suboptimal
since the BOM detections and the resulting QString aren't really used;
all we need is to split the UCS-4 code point into the UCS-2 surrogate pair.

Change-Id: Ia5b68312909bf551cf2493d9e2752a7d7d837fb9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAdd the AGLFN tables generator, update the tables up to AGLFN 1.7
Konstantin Ritt [Mon, 11 Jun 2012 15:04:17 +0000 (18:04 +0300)]
Add the AGLFN tables generator, update the tables up to AGLFN 1.7

Task-number: QTBUG-21727

Change-Id: Ib2cacc2a52b2853059d6c873a33dcde735fbe168
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAGLFN: optimize glyph name lookup and reverse map creation
Konstantin Ritt [Sun, 10 Jun 2012 15:05:41 +0000 (18:05 +0300)]
AGLFN: optimize glyph name lookup and reverse map creation

Use binary search in glyph name lookup, drop the linear search sentinel (0xFFFF);
Pass the reverse map by ref, initialize with memset.

Change-Id: I56de64bf2352af0615787e4cc0e13c922c640822
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoIntroduce QPA API for size grip handling.
Friedemann Kleint [Tue, 12 Jun 2012 08:47:42 +0000 (10:47 +0200)]
Introduce QPA API for size grip handling.

- Introduce API to do size grip handling (mouse press
  and move).
- Move Windows code to Windows plugin.
- Move X11 code to XCB plugin and activate it.

Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoWindows: Fix warnings about being unable to load fonts from font dir.
Friedemann Kleint [Wed, 13 Jun 2012 10:42:45 +0000 (12:42 +0200)]
Windows: Fix warnings about being unable to load fonts from font dir.

Do not call QPlatformFontDatabase::populateFontDatabase(), which
tries to load qpf2-fonts from the Qt library directory.
This directory is not installed on Windows.

Note: This affects non-in-source builds only.

Task-number: QTBUG-26066
Change-Id: I5782e61965958fc48e0edd7a3d50eef325529708
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoDo not add debug/release to QMAKE_CONFIG. Let module system enable them
Sean Harmer [Tue, 12 Jun 2012 11:30:13 +0000 (12:30 +0100)]
Do not add debug/release to QMAKE_CONFIG. Let module system enable them

This solved QTBUG-26111 in which qtjsbackend gets built with an
incomplete framework on Mac OSX. This was traced back to commit
6a6fd56e662b2c1a581727f7ec44d5bd60913ad4 which moved QMAKE_CONFIG
values from .qmake.cache to mkspecs/qmodule.pri. Since qtjsbackend
contains config tests it creates its own .qmake.cache which was
previously masking this issue.

QMAKE_CONFIG incorrectly contained debug for debug_and_release builds
even though debug and release are already present in the CONFIG variable
in mkspecs/qconfig.pri. The changes to configure prevent CONFIG in
qmodule.pri from containing debug and release variables and ensure
that QT_CONFIG contains build_all and debug_and_release if appropriate.
Configure.app is also adjusted to match this behaviour.

The other part of the change is to qt_module_config.prf and
qt_plugin.prf. These changes take care of populating CONFIG with
the appropriate debug_and_release and build_all variables depending
upon what is present in QT_CONFIG. This ensures that the Qt modules
and plugins get built with the same configuration as qtbase.

The special handling for the qcocoa QPA plugin ensures that it is
built in release mode only to preserve the behaviour introduced by
commit 5603f94eaa538dbe28fc426065d65a27799adedc.

Task-number: QTBUG-26111
Change-Id: I6f65aba50709e1b2431b8b4411ff30a06f7d8aed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCompile.
Morten Sorvig [Wed, 13 Jun 2012 08:01:54 +0000 (10:01 +0200)]
Compile.

Expressions containing "reinterpret_cast" are not
constant expressions according to C++11 rules.

Change-Id: Id97729f184983e5bdda180b99cfbe27e2768e09e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix namespace compilation on OSX.
Toby Tomkins [Tue, 12 Jun 2012 02:51:32 +0000 (12:51 +1000)]
Fix namespace compilation on OSX.

Change-Id: Ib579ae298a5f894b8b02a5d56567870109bd29bd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove unneeded #includes and namespace wrappers
João Abecasis [Fri, 8 Jun 2012 12:30:50 +0000 (14:30 +0200)]
Remove unneeded #includes and namespace wrappers

qvector.cpp no longer contains any code, now that inline functionality
has been deferred to QArrayData.

Change-Id: I000ef8507e5b8438edd32a762750e4ceaa8aa8ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoOpenGL: Update QOpenGLFunctions docs to remove widget code
Sean Harmer [Fri, 8 Jun 2012 10:18:18 +0000 (11:18 +0100)]
OpenGL: Update QOpenGLFunctions docs to remove widget code

Change-Id: I4246a49444c09d899f2bd7cd2e9353ee0a6859bf
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQtWidgets: Fix warnings about deprecated QGraphicsView functions.
Friedemann Kleint [Wed, 13 Jun 2012 13:08:07 +0000 (15:08 +0200)]
QtWidgets: Fix warnings about deprecated QGraphicsView functions.

Warnings introduced by d76de69b4b60e7e13d5b0602768702e4bf219804 .

Change-Id: I613500074a2318a617f18d5b887840ecc3408237
Reviewed-by: Gatis Paeglis <gatis.paeglis@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoChange path for 'mousebuttons' widgets example
Gatis Paeglis [Tue, 12 Jun 2012 13:53:44 +0000 (15:53 +0200)]
Change path for 'mousebuttons' widgets example

Task-number: QTBUG-26121
Change-Id: Icaeb6038d166fb0ffadf1657ddef21c18b3d3be6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd install path for qpa windows example
Gatis Paeglis [Wed, 13 Jun 2012 12:19:54 +0000 (14:19 +0200)]
Add install path for qpa windows example

Task-number: QTBUG-26150
Change-Id: I8e981318e05cca6628160aea31281f8e3baaa50f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoQDoc: Check if index file was already inserted in list.
Casper van Donderen [Tue, 12 Jun 2012 15:22:20 +0000 (17:22 +0200)]
QDoc: Check if index file was already inserted in list.

Previously it was possible to insert exactly the same index file in the
map twice by specifying an -indexdir which is the same as -installdir.
Probably you can also have two indexes with the same name that happen to
have the same creation time, but changes of that happening are slim to
none.

Change-Id: I6be5fb9d04839026830b9948887b282489b379c0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoRemove downstream documentation references from gui
Gunnar Sletta [Wed, 13 Jun 2012 10:39:38 +0000 (12:39 +0200)]
Remove downstream documentation references from gui

Change-Id: I6c107ed1f1cabe3713e22ec1c7854d5c07dca4b5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoQNX: Enable additional CPU features to be compiled in for QNX
Sean Harmer [Wed, 6 Jun 2012 14:08:42 +0000 (15:08 +0100)]
QNX: Enable additional CPU features to be compiled in for QNX

The QNX toolchain can use Neon on ARM and SSE<X> on x86/x86_64.

Change-Id: I36c61fa12b65d806b3cc60a0aefcb63964f9ab7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDeliver wheel events when window is null
Girish Ramakrishnan [Tue, 12 Jun 2012 17:59:27 +0000 (10:59 -0700)]
Deliver wheel events when window is null

The generic input plugins do not set the window parameter. So,
use the same technique we use with mouse event handling to determine
the window to deliver the event to.

Done-with: Johannes Zellner

Change-Id: I950c0ad2f330dccfdcc41b8d01f62cd39902bc9c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoFix QUrl documentation: FullyDecoded and DecodedMode are a pair
Thiago Macieira [Tue, 22 May 2012 13:15:24 +0000 (15:15 +0200)]
Fix QUrl documentation: FullyDecoded and DecodedMode are a pair

DecodedMode with FullyEncoded makes no sense whatsoever.

Change-Id: I182db7aceb38e4e9398138066022912adec9c413
Reviewed-by: David Faure <faure@kde.org>
12 years agoFix QDnsLookup test again after public DNS servers changed
Thiago Macieira [Wed, 13 Jun 2012 18:30:21 +0000 (20:30 +0200)]
Fix QDnsLookup test again after public DNS servers changed

gitorious.org's IP no longer resolves back to gitorious.org.

This fix is temporary, again.

Change-Id: I85b5fe1c5e603d23dd3226b843ef42165d4c417b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoeglfs: mark overriden methods with Q_DECL_OVERRIDE
Girish Ramakrishnan [Mon, 11 Jun 2012 15:04:41 +0000 (08:04 -0700)]
eglfs: mark overriden methods with Q_DECL_OVERRIDE

The current cursor implementation can be a bit hard to read
without hints about which methods are overriden.

Change-Id: I3376890a13be46e1ece03d1442dd5a15ccd61382
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoprintersupport: Fix cups.pro qmake warning
Girish Ramakrishnan [Tue, 12 Jun 2012 16:06:54 +0000 (09:06 -0700)]
printersupport: Fix cups.pro qmake warning

Change-Id: I59c8e3021fbf733af003ebd99be4a63e0a68f155
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoPartial fix for WebKit compilation on Windows
Simon Hausmann [Tue, 12 Jun 2012 07:57:10 +0000 (09:57 +0200)]
Partial fix for WebKit compilation on Windows

qdatetime.h uses std::min/max and on Windows windows.h (or some subsequent
header file) may under certain circumstances define min/max as macros.

The easiest way to prevent the windows header files from doing that is to
define NOMINMAX in the place right before windows.h is included. The other
way is to define min and max to min/max themselves to prevent windows.h
from doing its evil thing.

If a user of Qt (WebKit in this case) chooses the approach of defining
min/max to themselves and then includes qdatetime.h, then a subsequent
inclusion of windows.h doesn't work because qdatetime.h undefines min/max.

We should not enforce the type of workaround needed, therefore this patch
removes the workaround from qdatetime.h and requires user code that
happens to include windows header files before qdatetime.h (seldom case)
to choose either workaround.

Change-Id: I7347eec7369491a065e894cff557004e069453d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAbstractItemView editorForIndex/indexForEditor speedup
ABBAPOH [Sat, 9 Jun 2012 12:22:50 +0000 (16:22 +0400)]
AbstractItemView editorForIndex/indexForEditor speedup

Frequent calls to editorForIndex/indexForEditor are very slow because of an implicit
conversion from QModelIndex to QPersistentModelIndex.
This fix allows to avoid unnecessary conversions when there are no open
editors (most common case)

Change-Id: Ic072880c9f33a43a20b2a61a42c3ba215c5c33cb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoSend key events to pop-up widget in case there is one.
Friedemann Kleint [Mon, 11 Jun 2012 14:13:24 +0000 (16:13 +0200)]
Send key events to pop-up widget in case there is one.

Make QApplicationPrivate::inPopupMode() static for
convenience.

Task-number: QTBUG-26095

Change-Id: I98dc1e40d357592b790cd51d7aca60c2be9f380f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoFix compile issue on AIX
Andy Shaw [Fri, 8 Jun 2012 11:02:49 +0000 (13:02 +0200)]
Fix compile issue on AIX

Since local thread storage is used we need to turn this on for the xlc
compiler with the -qtls flag.

Change-Id: Ib40ec87edada56a062b0c72b7d47b38a6d0b5b13
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDon't use gcc extension for QByteArrayLiteral neither
Lars Knoll [Mon, 11 Jun 2012 14:15:39 +0000 (16:15 +0200)]
Don't use gcc extension for QByteArrayLiteral neither

This extension doesn't work for e.g. default arguments
in function declarations.

Change-Id: I32b7afa6e01b6af55fb2409179b4fd94cb04cd8d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoKeep the #ifdef for tracking shared pointers in a single function
Thiago Macieira [Mon, 11 Jun 2012 11:38:41 +0000 (13:38 +0200)]
Keep the #ifdef for tracking shared pointers in a single function

If we have it in different functions, then different out-of-line
implementations could be selected for each object file, resulting in
invalid states. The error I caught was when wrapper.cpp was compiled
without tracking and, therefore, did not place a call to
internalSafetyCheckAdd. However, it called an out-of-line copy of
QtSharedPointer::ExternalRefCountWithCustomDeleter::create, which did
set the deleter to remove the safety check.

Therefore, keep everything in one function.

Change-Id: Ib2c6a606699db49d102704bccdd331ec22a8bd78
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoSimple optimisation for the construction of a QSharedPointer
Thiago Macieira [Wed, 23 May 2012 17:54:49 +0000 (19:54 +0200)]
Simple optimisation for the construction of a QSharedPointer

Let the constructor initialise the "value" member.

In the case of create(), which already initialised "value", simply
merge the two functions for more readability.

Change-Id: I5638b3d42af3d0f5988f815e0f91d591fa1897a8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUse the copy & swap trick to simplify some code in QSharedPointer
Thiago Macieira [Wed, 23 May 2012 17:46:39 +0000 (19:46 +0200)]
Use the copy & swap trick to simplify some code in QSharedPointer

Change-Id: I5fa2fae19126bea60b9682ed7765681dd6da8c15
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoNow merge the QtShared::ExternalRefCount class into QSharedPointer
Thiago Macieira [Wed, 23 May 2012 17:36:56 +0000 (19:36 +0200)]
Now merge the QtShared::ExternalRefCount class into QSharedPointer

Completing the work of the previous commit: we don't need separate
classes. Merge into the main class's body.

Change-Id: I2f89b34cb6b7f5f9e8d8b809bebd86656f458644
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerge QtSharedPointer::Basic into QtSharedPointer::ExternalRefCount
Thiago Macieira [Wed, 23 May 2012 16:39:36 +0000 (18:39 +0200)]
Merge QtSharedPointer::Basic into QtSharedPointer::ExternalRefCount

The basic class existed for legacy only, when internal reference
counting was a goal. Since it isn't anymore, we can remove the
distinction and simply merge the two classes.

Change-Id: Ib7a1c4158a8d71e71fa6afa447938b8b85ddae87
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerge two internal classes of QSharedPointer and de-virtualise them
Thiago Macieira [Wed, 23 May 2012 16:21:16 +0000 (18:21 +0200)]
Merge two internal classes of QSharedPointer and de-virtualise them

The two classes are QtSharedPointer::ExternalRefCountData and
ExternalRefCountWithDestroyFn. The split existed because of what Qt
4.5 did before custom deleters existed: the ExternalRefCountData class
was a virtual class that contained a destroy() virtual, which was in
charge of deleting the data or returning false if it didn't.

Turns out that virtual classes was a mistake. This commit
de-virtualises them -- we couldn't do it in Qt 4 because of binary
compatibility. This saves us one pointer-size in the size of the
private, plus the fact that fewer symbols are required (there is no
virtual table to be initialised).

Additionaly, since a deleter is always stored with the reference
count, we don't need the split between the two classes anymore.

Change-Id: I1cd9400561dcee089a406a57bd856b1730f18afc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove "delete value" from QSharedPointer
Thiago Macieira [Wed, 23 May 2012 14:10:56 +0000 (16:10 +0200)]
Remove "delete value" from QSharedPointer

This allows a QSharedPointer to be used in contexts where the class in
question is still forward-declared. This produced a warning in Qt 4 due
to the expansion of the template, even if there was no chance of the
pointer being deleted there (because the reference count could not drop
to zero).

Now, not only is the warning removed, but you can actually have the
reference count drop to zero in a forward-declared class and it will
do the right thing. That's because the deleter function is always
recorded from the point of construction and we're sure that it wasn't
forward-declared.

The unit test for forward-declarations had to be rewritten. The
previous version was passing only because the QSharedPointer object
was created under the "tracking pointers" mode, which causes a custom
deleter to be used in all cases.

Task-number: QTBUG-25819
Change-Id: Ife37a4cea4551d94084b49ee03504dd39b8802c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years ago-device: Use $1 instead of $VAL
Girish Ramakrishnan [Fri, 8 Jun 2012 22:26:54 +0000 (15:26 -0700)]
-device: Use $1 instead of $VAL

$VAL just happens to work in resolveDeviceMkspec because it is
set in the parent shell environment when the function is called.

Change-Id: I67350f2a9e790cc7eca2a73ef6a4a0d7f09b8d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoadd SSE2/AVX/Neon/etc. flags to mkspec win32-g++-cross
Mark Brand [Tue, 12 Jun 2012 08:41:38 +0000 (10:41 +0200)]
add SSE2/AVX/Neon/etc. flags to mkspec win32-g++-cross

Follow-up to 6a51062e996ec38b3ebc1e0de04af73a5c62a1a0 which did this
for win32-g++.

Change-Id: I3ba0dd8ffca46853844b55b16dc92270fa8a623a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agomips: dsp and dspr2 can be enabled separately fix dspr2 only compilation
Holger Hans Peter Freyther [Tue, 12 Jun 2012 09:38:50 +0000 (11:38 +0200)]
mips: dsp and dspr2 can be enabled separately fix dspr2 only compilation

Separate dsp and dspr2 handling. The configure script allows to disable
them separately and with this patch it is possible to compile a dspr2
only libQtGui.so.

Change-Id: Ifca583c9b46a25c93751967a31ac77eafc5d51e4
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoFix Qt5 To-Do's in QGraphicsItem
Gatis Paeglis [Thu, 7 Jun 2012 14:13:28 +0000 (16:13 +0200)]
Fix Qt5 To-Do's in QGraphicsItem

- Merge isObscured()
- Deprecate and inline obsolete methods
- Correct outdated documentation

Change-Id: I4eb29df78785794c6d134bf9c2f5e0f3c3d6a29f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agofix default platform plugin for windows using configure script
Mark Brand [Tue, 15 May 2012 11:53:46 +0000 (13:53 +0200)]
fix default platform plugin for windows using configure script

Follow-up to 0074cc5d34a8ee314e864ba488dab1f0d0f94995.
The configure script can be used for cross-building for Windows on
unix.

Change-Id: Ie7f9d0ff308ad5763cdf7b2664fa255e89bd5013
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoRemove unnecessary code from the XCode generator
Andy Shaw [Fri, 1 Jun 2012 23:49:18 +0000 (01:49 +0200)]
Remove unnecessary code from the XCode generator

Since we only support XCode 3 and later, then all of the legacy code can
be safely removed.

Change-Id: I9be8555aaa62c716b2277c2b97f41aa02d27ef13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove unused static functions from qlogging.cpp, qstring.cpp.
Friedemann Kleint [Tue, 12 Jun 2012 07:11:19 +0000 (09:11 +0200)]
Remove unused static functions from qlogging.cpp, qstring.cpp.

Change-Id: I4e9642b5e7fb57ac56511ae06af6ce416d0401ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoExport qMemSet and qMemCopy properly
Thiago Macieira [Mon, 11 Jun 2012 10:28:22 +0000 (12:28 +0200)]
Export qMemSet and qMemCopy properly

Commit d839564c94a73e3dd2816a8c2196e612e1f5cb79 was incomplete. It
added the Q_CORE_EXPORT macro to qmalloc.cpp, but the qMemSet and
qMemCopy function bodies are in qglobal.cpp.

Change-Id: I24ee44f04365d8dbdf3f1c0f22b6a72cae9f96bb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoUpdate listing of when SSSE3 and SSE4.1 first became available
Thiago Macieira [Tue, 12 Jun 2012 12:44:24 +0000 (14:44 +0200)]
Update listing of when SSSE3 and SSE4.1 first became available

SSSE3 was first available on the original Intel Core 2 processors, so
add the "Merom" codename. SSE4.1 was available on the 45 nm shrink of
those processors, codename "Penryn", not on the next architecture.

Change-Id: I5fd92db62aa409b7f4e46f9b24d960519177f811
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoAdd configure-time checking for the SSE and AVX features on Windows
Thiago Macieira [Fri, 30 Dec 2011 00:44:16 +0000 (22:44 -0200)]
Add configure-time checking for the SSE and AVX features on Windows

Modify configure.exe to run some configure-time tests and check if
the SSE and AVX compiler features are supported.

The tests themselves required a bit of changes to compile with
MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it
didn't like the volatile variables, which GCC, Clang and ICC have been
happy with. This should produce no effect in compilation, though: even
dead code must be syntactically correct. We're not running the output.

Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake sure you can link against more than one static plugin
Lars Knoll [Tue, 12 Jun 2012 09:43:45 +0000 (11:43 +0200)]
Make sure you can link against more than one static plugin

The old macro was leading to symbol clashes.

Change-Id: I090c511d4090bc96fc6c88537fae7bbe7f143b6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCocoa: re-enable getUrl: and appleEventQuit: AppleEvent handlers
Bradley T. Hughes [Fri, 8 Jun 2012 11:37:27 +0000 (13:37 +0200)]
Cocoa: re-enable getUrl: and appleEventQuit: AppleEvent handlers

The getUrl: and appleEventQuit: handlers are only called if we register
them with the NSAppleEventManager. The Cocoa documentation says the best
place to do this is in the applicationWillFinishLaunching: delegate
method, so add this method and move the code from
qcocoaeventdispatcher.mm to there. Since QCocoaApplicationDelegate is
only used when AA_MacPluginApplication is not set, we do not need to
check again in the delegate code. Be sure to remove these event handlers
when shutting down the application.

For the getUrl: handler, send file open events when receiving this
event. This restores Qt 4 behavior.

Remove the qDebug() from the appleEventQuit: handler.

Change-Id: Ibcbdd541695176e3d236366d4d541e4811882d6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Remove unused QApplicationPrivate from QCocoaApplicationDelegate
Bradley T. Hughes [Fri, 8 Jun 2012 11:13:23 +0000 (13:13 +0200)]
Cocoa: Remove unused QApplicationPrivate from QCocoaApplicationDelegate

To avoid a QtWidget dependency, we should use QGuiApplicationPrivate
isntead, but instead of storing, we can use
QGuiAppliationPrivate::instance() instead.

Change-Id: If3f63fee804b7ad32fe8d612bf70c051b70f54c8
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFix QTreeView header re-ordering bug on Mac OS.
Chris Meyer [Thu, 7 Jun 2012 14:42:43 +0000 (16:42 +0200)]
Fix QTreeView header re-ordering bug on Mac OS.

This is a cherry-pick of 0ba850c7a2dbccb8dd6aa1664679bda6cce95065

When the mouse button is released at the end of a drag, Cocoa
may simulate an extra mouse moved event. However, the state of
the buttons when this event is generated is already 'no button'.
This leads to some failsafe code canceling out of the drag state
and when the actual mouse release event is finally processed, the
header drag state has already been exited and the header drag
fails.

This patch disables the failsafe code on Cocoa and makes header
dragging work when the mouse goes outside the bounds of the header
view.

Task-number: QTBUG-14179
Change-Id: Ia9fd1ac79f9e7b4b90d3e160298c53d65fb171d3
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix automatic declaration of QSharedPointer<T> metatypes.
Stephen Kelly [Thu, 24 May 2012 12:23:54 +0000 (14:23 +0200)]
Fix automatic declaration of QSharedPointer<T> metatypes.

QSharedPointer doesn't work like the other automatic template metatype
declarations because in some cases T* is declared as a metatype, but we
are interested in QSharedPointer<T> (eg QObject*). In other cases, T is
declared as a metatype and we are interested
in QSharedPointer<T> (eg char).

In particular the macro used before this patch was attempting to get the
metatype id of the element_type using for example qMetaTypeId<QObject>()
instead of qMetaTypeId<QObject*>(), which did not work.

Similarly, the variadic macro driven test is no good, because it was
testing QSharedPointer<QObject*> instead of QSharedPointer<QObject>,
so that is removed.

In the end, the only thing we can sensibly automatically declare as
metatypes are QSharedPointers to QObject derived types. That is also
the type that makes the most sense in a QML context anyway.

Change-Id: I13dd40147e2e6bedf38661f898102abaaaa96208
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoClean up and consolidate QDateTime-related tests.
Mitch Curtis [Fri, 8 Jun 2012 10:22:14 +0000 (12:22 +0200)]
Clean up and consolidate QDateTime-related tests.

Some test functions that only test QDate and QTime were in
tst_qdatetime.cpp. Upon moving these into tst_qdate.cpp and
tst_qtime.cpp, there were already some similar tests so I
consolidated them.

Change-Id: I5f8758bf8b4804ae9d3a482f49d21de9f7a1dc03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQWizard/Win: Handle hit testing correctly for Vista style
Jonathan Liu [Fri, 8 Jun 2012 15:09:39 +0000 (01:09 +1000)]
QWizard/Win: Handle hit testing correctly for Vista style

Clicking the area just below the close button when Aero is enabled
reveals duplicate caption buttons. DwmDefWindowProc returns hit results
for DWM caption buttons but DefWindowProc may also return hit results
for non-DWM caption buttons.

To resolve this issue, if DefWindowProc returns a window button hit
result then we just use HTCLIENT (the client area) as the hit result
instead.

Change-Id: Ia741ce4f9aa944109d8de54c2f84009f5ea1883f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindows/ICU: Compile fix.
Friedemann Kleint [Mon, 11 Jun 2012 08:16:29 +0000 (10:16 +0200)]
Windows/ICU: Compile fix.

Change-Id: I95c281b0e577a89e4d92dd16fd039ab9e53036f5
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMake distance field image width variable.
Yoann Lopes [Wed, 6 Jun 2012 13:41:13 +0000 (15:41 +0200)]
Make distance field image width variable.

The distance field generator was always returning a 64x64 pixels image.
It now returns an image with a variable width (width of the represented
glyph) and always a height of 64px.

Change-Id: Id5f11a50a8031ebca10cd4803adf179ccde6db26
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoFix compilation of tests/auto/corelib/tools with QT_STRICT_ITERATORS
Thiago Macieira [Thu, 31 May 2012 11:51:36 +0000 (13:51 +0200)]
Fix compilation of tests/auto/corelib/tools with QT_STRICT_ITERATORS

Most fixes are simple and quite obvious. The ones more involved are
the ones to QArrayData, which had probably not been compiled with
strict iterators thus far.

Change-Id: Ic4ff84c34fd9a04fd686fecaa98149b1c47c9346
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoOnly quit if there are no visible widgets or windows.
Stephen Kelly [Mon, 14 May 2012 14:58:26 +0000 (16:58 +0200)]
Only quit if there are no visible widgets or windows.

We need to let the QGuiApplication determine whether quitting is appropriate
based on whether there are visible top level QWindows after the last top-level
QWidget was closed.

This solves the issue raised here: http://thread.gmane.org/gmane.comp.lib.qt.user/1880

The transientParent is the QWindow equivalent of parentWidget on QWidget, so the test
in QGuiApplication::shouldQuit is similar to the one in QApplication::shouldQuit.

Change-Id: I500eff8d5887f24415180134b3a4be3c630a896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoChange internal QDeclarativeData hooks to use signal index range
Kent Hansen [Thu, 31 May 2012 20:06:42 +0000 (22:06 +0200)]
Change internal QDeclarativeData hooks to use signal index range

This also changes the qtdeclarative-specific QMetaObject::activate()
overload to not take a methodOffset argument, since it's no longer
needed.

Change-Id: I4f7ece9f43339f3327419598c032e48fb37b97f0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
12 years agoDon't use the gcc extension for QStringLiteral & Q_ARRAY_LITERAL
Lars Knoll [Mon, 11 Jun 2012 14:08:55 +0000 (16:08 +0200)]
Don't use the gcc extension for QStringLiteral & Q_ARRAY_LITERAL

The extension doesn't work outside of function scopes, so a
function declaration such as
void foo(const QString &str = QStringLiteral("bar"));
would fail on certain gcc versions.

Change-Id: I2971301f2859edd3fc81b95dfa5a7c15f29e395c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoraspberry pi: Dont use the video layer for EGLFS
Johannes Zellner [Mon, 11 Jun 2012 22:57:17 +0000 (15:57 -0700)]
raspberry pi: Dont use the video layer for EGLFS

The OpenmaxIL video_render component uses the dispmanx layer 0, so EGLFS
should use at least z index 1. Otherwise the video_render would conflict
with the UI and thus overpaints it.

Change-Id: I3bed23567fa8c4399207289c6ef952c5a5e0d503
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
12 years agoraspberry pi: add /opt/vc/include/interface/vcos/pthreads to includes
Girish Ramakrishnan [Mon, 11 Jun 2012 21:19:16 +0000 (14:19 -0700)]
raspberry pi: add /opt/vc/include/interface/vcos/pthreads to includes

See https://github.com/raspberrypi/firmware/pull/32 for more information.

Change-Id: I51bb532336ed069cde938540cd962721b1a72adb
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
12 years agoUse a QVector<int> instead of a QSet<int> in itemviews/models.
Stephen Kelly [Thu, 7 Jun 2012 08:39:42 +0000 (10:39 +0200)]
Use a QVector<int> instead of a QSet<int> in itemviews/models.

The QSet<int> is a more expensive container to use and create, so
it should be avoided.

This is source incompatible compared to earlier Qt 5 for
QAbstractItemView subclasses which reimplement dataChanged, but this
patch changes nothing compared to already-present SiC compared
to Qt 4.

Change-Id: Id95391dfd62a0a7f487a8765790b007badefb937
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAvoid a type name normalization during auto-registration.
Jędrzej Nowacki [Tue, 22 May 2012 11:48:22 +0000 (13:48 +0200)]
Avoid a type name normalization during auto-registration.

Containers are auto-registered and use normalized names.

Change-Id: Id65c3940401f69436929220e1f6a971135e147ed
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoImplement WindowTransparentForInput flag in Windows platform.
jian liang [Fri, 1 Jun 2012 16:35:47 +0000 (00:35 +0800)]
Implement WindowTransparentForInput flag in Windows platform.

set WS_EX_LAYERED | WS_EX_TRANSPARENT style if the window has
WindowTransparentForInput flag.

Change-Id: I6b0dcf35abb5fc63c800439e9b81ace1070dcad4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoSupport other platform names on configure.exe
Rafael Roquetto [Fri, 8 Jun 2012 13:20:35 +0000 (15:20 +0200)]
Support other platform names on configure.exe

Added three new methods, which are meant to be used internally to
configureapp.cpp:
    - int platform(): returns an integer representing a platform
    - QString platformName(): returns the platform name string to be used when
      displaying the license agreement.
    - QString qpaPlatformName(): returns the value to be defined as
      QT_QPA_DEFAULT_PLATFORM_NAME.

Currently supported names are Windows, Windows CE, QNX and Blackberry. Default
is "Windows".

Change-Id: Ifa4d1b9c02cda956be9becdf8db195d3d494f1d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix arch detection when cross compiling on Windows
Rafael Roquetto [Fri, 8 Jun 2012 12:20:45 +0000 (14:20 +0200)]
Fix arch detection when cross compiling on Windows

When trying to detect the target architecture, configure.exe will look for a
file called 'arch.exe'. However, in some situations such as when
cross-compiling on a Windows host to a Unix host, and depending on the
toolchain being used, the output file generated by config.tests/arch may
simply be called "arch" instead of "arch.exe", causing configure.exe to fail.
This patches configure.exe to handle both naming schemes.

Change-Id: I5798f716d732388c707564d4d45c4887ab3d3d9f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoCocoa: do not terminate applications prematurely
Bradley T. Hughes [Fri, 8 Jun 2012 11:32:22 +0000 (13:32 +0200)]
Cocoa: do not terminate applications prematurely

Re-enable application termination as it was in Qt 4.
QApplication::exec() must return to main() so that the destructors in
main() are run.

The QApplicationPrivate::canQuit() function from Qt 4's
qapplication_mac.mm is gone, so bring back this function in
QCocoaApplicationDelegate instead.

Change-Id: I1c21894d59061687c36ab49bcb2e4e3ae0752fa4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCocoa: Compile when configured with -no-widgets
Morten Johan Sorvig [Fri, 8 Jun 2012 11:12:59 +0000 (13:12 +0200)]
Cocoa: Compile when configured with -no-widgets

Build printing only if Qt is configured with
widget support.

This is mostly useful for testing -no-widgets builds.

Change-Id: I2d47b420e311869e85508db1f7372fe326617dec
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoClarify QTouchEvent docs
Laszlo Agocs [Mon, 11 Jun 2012 09:27:05 +0000 (12:27 +0300)]
Clarify QTouchEvent docs

Mention something about touch handling with QWindow and document the
non-partialness of touch events which has been taken for granted since
4.6, but has not been documented at all.

Change-Id: I9ec75f74153bbc28e146b000d70fb26384e497a3
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoeglfs refactor: move window creation into qeglfswindow
Girish Ramakrishnan [Wed, 6 Jun 2012 20:57:09 +0000 (13:57 -0700)]
eglfs refactor: move window creation into qeglfswindow

This potentially allows the creation of multiple QWindows. The platform
context is now in a seperate file and the integration provides a new
instance of the context allowing creation of multiple contexts.

Change-Id: If2b6fa29b573d87c0a4cd0a8eff1f044bd1ff9b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoEnable compilation of improved x86 code generation with MSVC
Thiago Macieira [Thu, 31 May 2012 15:49:10 +0000 (17:49 +0200)]
Enable compilation of improved x86 code generation with MSVC

Now that we know the compiler flags for asking MSVC to produce SSE2 code
properly as well as AVX code (technically, just VEX-prefixed SSE2), we
may as well use it.

The SSE2 code generation is enabled by this commit. The AVX one
requires a change to configure to detect the support in the compiler.

Change-Id: Ib6970daaedf450500ee73600e6bf9722eddb9a0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMove the AVX and SSE tests to config.tests/common
Thiago Macieira [Thu, 31 May 2012 13:51:59 +0000 (15:51 +0200)]
Move the AVX and SSE tests to config.tests/common

This is the first step in supporting these checks on Windows.

Change-Id: I77cfd46bd733161ad2e52c2f76a6354b95ff737d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMove the SSE2/AVX/Neon/etc. flags into the compiler mkspecs
Thiago Macieira [Thu, 31 May 2012 12:58:53 +0000 (14:58 +0200)]
Move the SSE2/AVX/Neon/etc. flags into the compiler mkspecs

This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.

Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQDoc: Also allow dependant modules to be specified on CLI.
Casper van Donderen [Mon, 11 Jun 2012 10:54:42 +0000 (12:54 +0200)]
QDoc: Also allow dependant modules to be specified on CLI.

Change-Id: I25dfbadc788616a864ecbf322434a3ce45bb94e5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
12 years agoqdoc: Better error messages for QML command errors
Martin Smith [Mon, 11 Jun 2012 09:29:31 +0000 (11:29 +0200)]
qdoc: Better error messages for QML command errors

Some error messages were not clear for these qdoc commands: \qmlclass,
\qmlmodule, \inqmlmodule, and \qmlproperty. They have been made clearer
now.

Also, qdoc now parses input files in the same order all the time now.
The order is alphabetic now. This might not be the optimal order.

Change-Id: Id53a5ec8105009c71f4bbd41973a54aed7821099
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoAdd a unit test to QSharedPointer being deleted by a C++11 lambda
Thiago Macieira [Thu, 24 May 2012 12:30:42 +0000 (14:30 +0200)]
Add a unit test to QSharedPointer being deleted by a C++11 lambda

This already worked, but let's have a test so we can be sure it doesn't
regress.

Change-Id: I358b436d216e3ec4310f05ccf4f70f9e7aad3281
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCorrectly detect blackberry mkspecs as cross-compiling for QNX
Sean Harmer [Sun, 10 Jun 2012 17:23:28 +0000 (18:23 +0100)]
Correctly detect blackberry mkspecs as cross-compiling for QNX

Change-Id: Ibcede225a0d6e421c086dba3cca5b0fcbeeafa68
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix Mac menu-merging case-sensitivity.
James Turner [Fri, 8 Jun 2012 14:41:12 +0000 (15:41 +0100)]
Fix Mac menu-merging case-sensitivity.

Use case-insensitive string comparisons to deal with any combination of case in the target or menu text correctly. Fixes issues reported by BHughes in TextEdit and Creator.

Change-Id: Ic3b577bf9034659b2de4aa206757b3a5a303a7b8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoconfigure: remove unused PLATFORMS variable
Girish Ramakrishnan [Fri, 8 Jun 2012 22:08:27 +0000 (15:08 -0700)]
configure: remove unused PLATFORMS variable

PLATFORMS is unused. Also remove the loop that printed all the
PLATFORMS when the mkspec couldn't be autodetected. Even if the
PLATFORMS variable was moved up, it wouldn't work anyway since
it detects files and not directories.

Change-Id: Id483c431a179fb01fcf680538e28c81763bc0b90
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDeprecate QMainWindow::unifiedTitleAndToolBarOnMac
Christoph Schleifenbaum [Fri, 1 Jun 2012 08:16:59 +0000 (09:16 +0100)]
Deprecate QMainWindow::unifiedTitleAndToolBarOnMac

Update documentation. Implementation is left for
now.

There is currently no replacement; once we have
that in place we'll update the docs agin to point
to it.

Change-Id: I8b4532702938398dc5b4eef5da2b3f9dfb68382f
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove QtWidgets include.
Morten Johan Sorvig [Fri, 8 Jun 2012 10:57:04 +0000 (12:57 +0200)]
Remove QtWidgets include.

Change-Id: I39ff73ce0dbfe36634b5331538165e636f62e57c
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCocoa: Remove QtWidgets dependencies.
Morten Johan Sorvig [Fri, 8 Jun 2012 10:55:55 +0000 (12:55 +0200)]
Cocoa: Remove QtWidgets dependencies.

Make the file/color dialog helpers use QCoreApplication::
translate("QDialogButtonBox", text) instead of
QDialogButtonBox::tr(text)

Change-Id: I7ee4c32f8f8b9cd002836e24b962ef1c0f2e0737
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoupdate QStandardPaths::standardLocations() documentation
Jeremy Katz [Thu, 7 Jun 2012 12:13:14 +0000 (14:13 +0200)]
update QStandardPaths::standardLocations() documentation

Remove the reference to PATH, as it may confuse developers who expect
a separator between locations. The ordering has been made explicit,
including the position of writableLocation() if it can be determined.
Note that some implementations may allow the empty string.

Change-Id: I134db44dd8bea437824a1d0bf8ed373ec655ab04
Reviewed-by: David Faure <faure@kde.org>
12 years agoMake qmetaobject autotest independent of QtWidgets
Debao Zhang [Wed, 6 Jun 2012 01:54:09 +0000 (18:54 -0700)]
Make qmetaobject autotest independent of QtWidgets

Change-Id: I4340036a4e6024d9b8d0c7832ad7bfb28ec4bc99
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoUse QCollator in QString and remove it from qlocale_icu
Lars Knoll [Fri, 1 Jun 2012 22:38:48 +0000 (00:38 +0200)]
Use QCollator in QString and remove it from qlocale_icu

Change-Id: Ic94439943999382f8050668edfb67d3b75ac1df4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd proper collation support to Qt
Lars Knoll [Fri, 1 Jun 2012 21:09:31 +0000 (23:09 +0200)]
Add proper collation support to Qt

QString::localeAwareCompare() has always been a broken
way to support collation. The current implementation is
not even thread safe.

This adds a proper collation class that fixes the problems
and finally allows Qt to sort properly according to locale
rules.

The class is private for now, but is intendent to be made
public with 5.1

Change-Id: Idb4e75ff68a398c9813af622af884a90898d2be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRefactor the ICU code for QLocale
Lars Knoll [Fri, 1 Jun 2012 15:51:06 +0000 (17:51 +0200)]
Refactor the ICU code for QLocale

Clean up the ICU code and make it thread-safe. Add a
QIcuData structure to QLocalePrivate, that contains
ICU specific data.

Link against ICU directly, greatly simplifying the
code.

Also fix a bug in the locale specific case conversion
code that would cause it to fail and fall back to the
QString code if the output string was larger than the
input.

Change-Id: Ie67e5ea14fa204ebc5887d7aaeb1a4f3ecaf8697
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRegenerate the Unicode tables with UCD 6.1.0
Konstantin Ritt [Sun, 3 Jun 2012 01:17:43 +0000 (04:17 +0300)]
Regenerate the Unicode tables with UCD 6.1.0

Task-number: QTBUG-1963
Task-number: QTBUG-5472
Task-number: QTBUG-12144
Task-number: QTBUG-18360
Task-number: QTBUG-23654

Change-Id: Ida09ad657c4b012eca654fcb79608b7cdeb5d60d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoLine Breaking Algorithm: handle the Object Replacement Character
Konstantin Ritt [Thu, 31 May 2012 10:04:32 +0000 (13:04 +0300)]
Line Breaking Algorithm: handle the Object Replacement Character

See http://www.unicode.org/reports/tr14/#CB
and http://www.unicode.org/reports/tr14/#LB20 for details

Change-Id: Ice0aa2b2ce81f6e39839a353240420436eddd754
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoLine Breaking Algorithm: don't break inside numeric expressions
Konstantin Ritt [Thu, 31 May 2012 10:03:51 +0000 (13:03 +0300)]
Line Breaking Algorithm: don't break inside numeric expressions

Change-Id: I8362663454e4c6604ecb6289ae8009d47c78aeb1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate the Unicode Text Breaking Algorithm implementation tests
Konstantin Ritt [Thu, 7 Jun 2012 22:34:14 +0000 (01:34 +0300)]
Update the Unicode Text Breaking Algorithm implementation tests

* The Line Breaking Algorithm implementation conformance tests has been added;
* The Grapheme, Word, and Sentence Breaking Algorithm implementation
  conformance tests has been updated.

Change-Id: Ia1a6eef6272d580964cb23788ddf30dfd5f4a5a3
Note: the Line Break test data contains some extended cases we don't currently support;
      just skip them for now.
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate the Unicode Text Breaking Algorithm implementation
Konstantin Ritt [Thu, 7 Jun 2012 22:30:04 +0000 (01:30 +0300)]
Update the Unicode Text Breaking Algorithm implementation

to make it conformant to the Unicode 6.1 specifications #14 and #29.

The most important changes are:
* The implementation has been reworked from scratch to fix all known bugs;
* Separate-out the grapheme and the line breaking implementation to eliminate
  an overhead due to calculating unnecessary breaks;
* Stop using deprecated SG class in favor of resolving pairs of surrogates;
* A proper support for SMP code points;
* Support for extended grapheme clusters (a drop-in replacement for the legacy
  grapheme clusters as of Unicode 5.1);
* The hardcoded tailoring of UBA has been eliminated which breaks the 7 years-old
  lineBreaking test. Some later, we'll investigate if such a tailoring is still needed.

Change-Id: I9f5867b3cec753b4fc120bc5a7e20f9a73d89370
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate the Unicode related autotests
Konstantin Ritt [Sat, 9 Jun 2012 18:22:24 +0000 (21:22 +0300)]
Update the Unicode related autotests

Update NormalizationTest.txt data file with one from UCD 6.1;
Add few more QChar::unicodeVersion() testcases;
Add some line break class mapping testcases;
Add some exceptional case mapping testcases;
Add script class mapping test;

Change-Id: I164394984abb2b893c8db62fb77e7bd87aa0850b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate the Unicode data files up to v6.1.0
Konstantin Ritt [Fri, 25 May 2012 00:20:48 +0000 (03:20 +0300)]
Update the Unicode data files up to v6.1.0

Change-Id: I20b94634b1f4ebff10757c2348cfdbbd906e8797
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate the qunicodetables generator to deal with UCD 6.1 files
Konstantin Ritt [Sun, 3 Jun 2012 01:17:10 +0000 (04:17 +0300)]
Update the qunicodetables generator to deal with UCD 6.1 files

Change-Id: If22018ff83cfc6b9c984f689648da038fce11d84
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoReorganise the painting.pri file after the last round of cleanups
Thiago Macieira [Fri, 30 Dec 2011 16:55:23 +0000 (14:55 -0200)]
Reorganise the painting.pri file after the last round of cleanups

Change-Id: I35f5356fc59d109074d39c4fafd608540743479a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoLogging: Remove outdated QMessageHandler
Kai Koehne [Wed, 6 Jun 2012 18:11:50 +0000 (20:11 +0200)]
Logging: Remove outdated QMessageHandler

Commit d9a1c2dff replaced QMessageHandler with QtMessageHandler. However,
the old signature was still supported for a grace period.

Change-Id: I3141499efdc749460b77de1ceec82f312e904bec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMake qpointer autotest build without widgets
Kent Hansen [Tue, 5 Jun 2012 11:13:20 +0000 (13:13 +0200)]
Make qpointer autotest build without widgets

Change-Id: Ibd05a49174e7055faa89c48659130a11418b9616
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Debao Zhang <dbzhang800@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>