Fixes a regression; missing cursor blink when input mask is set.

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

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

cherry-picked from qt5/qtbase a9cda515177db1615f8d47becf2aa781f26955ae

Task-number: QTBUG-7174
Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Do not send QEvent::AccessibilityPrepare.

This leads to crashes in the unix bridge when notifying
about object destruction.

Task-number: QTBUG-25240
Change-Id: I24069a1c9e63d4c0a1f9b1336b94ab0712ac5ccf
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Accessibility: send cursor move updates.

ATs need to be able to react to cursor movement.

Change-Id: I8fbb036b6a180f555505ab529020d0aea2d25e7c
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Widget created with type to Qt::ToolTip should have a drop shadow

When using Qt::ToolTip window flag, CS_DROPSHADOW style should be used

Task-number: QTBUG-13276

Change-Id: I4b8dfab0de38667188efe6cc8e1465bdf1ae2d18
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Fix memory leak when drawing text in non-common script

When the fontEngine() cached was updated for new parameters, we
would overwrite the cached engine, but not deref the old cached engine,
thus it would never be deleted.

Change-Id: I3b88698712e468ffa634bd98019a7871662cc363
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Ensure that the IME composition is handled correctly on Mac

When the language menu was shown while IME composition was underway, it
would cause the composition text to be in an invalid state.

Task-number: QTBUG-25107
Change-Id: Iaf06f330fb055e30c25ccc9874f15132ea000bc2
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Fix initial size of QMainWindow with unified title and toolbar on Mac

On Mac if the toolbar was hidden in a unified title and toolbar main
window then it would have too much space between the title and the
central widget.

Task-number: QTBUG-24423
Change-Id: I5e434da2447f33795f3771e43b42930824482d8e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Upgrading libpng: Adding clean copy of libpng 1.5.10

This commit removes the previous version of the bundled
libpng (1.5.4), as well as all local modifications to it.
It adds an unmodified copy of the official libpng
source distribution, except that various extraneous
files have been removed, as usual.

The patches required to build it in Qt will follow in
separate commit(s).

Change-Id: I0cfc782a1c1b7f06b92eb1b38992bd8a0e6de08d
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Upgrading libpng: Patches to libpng 1.5.10 for Qt usage

This is the collection of those earlier patches to libpng
in Qt that are still relevant, updated as required:
d6ba0e805fd2b17e2e0cbbce32e218551505d91f
91bf025444f13eb269ece6bb430a841638bb32a8
125dae45c5c8e09a58409095f6661ab65ea1e71f
d6947bcbed97889d7d56d400f81eb1691a3f18e1

Change-Id: I06603041b5971ade4742f600dbea4cca98ff95a5
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
gcc 4.7.0 compatibility fix for javascript

taken from http://qt-project.org/forums/viewthread/15071

Change-Id: I701fb5a8d754afe9fcd6b327d779365673e07b5d
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Fixed crash in QImage in out of memory condition

Change-Id: I64467525d3365903e83b2e7e9cf381dd5a39c2b4
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Fixes crashes and memory leak in QMacPixmapData

QTBUG-24709
QTBUG-24710
QTBUG-24711

Change-Id: I7b4034fae8b3b0ee43eb04ecce3c31479adb3b68
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Fix possible crash issue when testing the state of a QAccessibleMenuItem

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

Change-Id: Ic3149ccc5d6ae0ebc83dae58163ae2f60397fd28
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Fix handling for key repeat events in the QPA linux input plugin

Change-Id: Ibbdb74b5fb568153780355c1ebbd9e678b884c22
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Symbian: avoid crash when inline editing is canceled

Native side editor state sync request was added into
QCoeFepInputContext::CancelFepInlineEdit method to fix QTBUG-20919:
text prediction word list/bubble didn't disappear from TextArea/
TextField after a tap and the issue was fixed with the sync request.

However Symbian AknFEP was changed in Belle FP1 release so that this
sync request is no longer needed to get rid of the exact word bubble
when inline editing is canceled with a tap and it can actually
currently lead to a crash in the native side with certain input methods
as AknFEP doesn't expect FEP-aware text editors to request editor state
sync within MCoeFepAwareTextEditor::CancelFepInlineEdit call.
Thus the sync request should be made only with older Symbian releases.

Task-number: ou1cimx1#983695
Change-Id: Iab7753bbe8b279f89abc1853824a83ad210c5440
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com>
Add new QSysInfo::symbianVersion() enums

Add new enums for future Symbian platforms.

Task-number: QT-4593
Change-Id: I23b616c6d62d9d56d2b8ec6ac7edb8f6a84211e8
Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Only send progress bar updates when visible.

Screen readers tend to announce progress.
Some applications (for example KMail) have hidden
progress bars that update frequently.

While the applications should be fixed, it's better
not to spam the user with continous progress announcements.

Change-Id: I5f3b5a83dc80594d995b10e58527115de8601c77
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Remove fileLineEndingTest from networkselftest.

The fileLineEndingTest case doesn't test network in any way and it is
conceptually wrong, too, as any tests where line endings are an issue
should be handled with .gitattributes rather than forcing user to
check out the repo with unix line endings.

Task-number: QTBUG-24271
Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
(cherry picked from commit fc8f92106d6743d4165de7d8a440b7e5dbd14391)
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Enable stack smashing protection on Blackberry platforms

Backport of:

657ca81c910638128f533b7eb98edf187bd40a0c
1c20c3f29441a6856c6eb58dda40b86bdaac6a06

from qtbase.

Change-Id: I2e30a16140eaf417a07674828642b74fc829bda8
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Use parentheses in statement with && and ||.

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