8 years agoAdd Missing Debug Operator Declaration for QTouchEvent::TouchPoint 4.8
Kalle Viironen [Tue, 5 May 2015 10:54:07 +0000 (13:54 +0300)]
Add Missing Debug Operator Declaration for QTouchEvent::TouchPoint

Debug operator for QTouchEvent::TouchPoint was added in
but that commit was missing the declaration.

Change-Id: I1bce5f131c5995e0696babe3172cbba95704ac5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
8 years agoQNAM: Fix upload corruptions when server closes connection
Markus Goetz [Tue, 28 Apr 2015 09:57:36 +0000 (11:57 +0200)]
QNAM: Fix upload corruptions when server closes connection

This patch fixes several upload corruptions if the server closes the connection
while/before we send data into it. They happen inside multiple places in the HTTP
layer and are explained in the comments.
Corruptions are:
* The upload byte device has an in-flight signal with pending upload data, if
it gets reset (because server closes the connection) then the re-send of the
request was sometimes taking this stale in-flight pending upload data.
* Because some signals were DirectConnection and some were QueuedConnection, there
was a chance that a direct signal overtakes a queued signal. The state machine
then sent data down the socket which was buffered there (and sent later) although
it did not match the current state of the state machine when it was actually sent.
* A socket was seen as being able to have requests sent even though it was not
encrypted yet. This relates to the previous corruption where data is stored inside
the socket's buffer and then sent later.

The included auto test produces all fixed corruptions, I detected no regressions
via the other tests.
This code also adds a bit of sanity checking to protect from possible further

[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection

(cherry picked from commit qtbase/cff39fba10ffc10ee4dcfdc66ff6528eb26462d3)
Change-Id: I9793297be6cf3edfb75b65ba03b65f7a133ef194
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoOSX: avoid crash in invalidateBuffer_resizeHelper on parentless widget
René J.V. Bertin [Mon, 6 Oct 2014 17:08:00 +0000 (19:08 +0200)]
OSX: avoid crash in invalidateBuffer_resizeHelper on parentless widget

KDE4 has a KMenu::addTitle function that adds a distinctive item to
a menu, as the predecessor to Qt5's QMenu::addSection. On OS X this
function leads to a null pointer access because
invalidateBuffer_resizeHelper is called on a parentless widget.
This patch filters out such widgets.

Task-number: QTBUG-41716
Change-Id: I8f62a14d201ce44e038ceff87ee5db98277f1b87
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
8 years agoUpdate bundled libpng to version 1.6.17
Eirik Aavitsland [Wed, 8 Apr 2015 14:20:01 +0000 (16:20 +0200)]
Update bundled libpng to version 1.6.17

Merged in the upstream version, which obsoleted many of the local
patches. The remaining diff to clean 1.6.17 is archived in the
qtpatches.diff file.

Change-Id: Ibe6f69d9002adb1ad1c4037670a3a4358ad1a18e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoUpdate bundled libtiff to version 4.0.3
Eirik Aavitsland [Thu, 9 Apr 2015 14:06:37 +0000 (16:06 +0200)]
Update bundled libtiff to version 4.0.3

This updates libtiff.pri and 3rdparty/libtiff to the current state in
the Qt 5 qtimageformats module, commit
c3035a1655090b0f6b194fb8a7586c013ef24f6a. The patch history relative
to upstream 4.0.3 is available in that module.

Change-Id: I70d278081c62ba179c5f9658a0d59313c77ba415
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoDoc: Update obsolete external URLs
Topi Reinio [Fri, 10 Apr 2015 11:43:01 +0000 (13:43 +0200)]
Doc: Update obsolete external URLs

Update external URLs in the documentation for links where the
resource is still available online.

Change-Id: I99e5d6d7e030f93c3fe8d31cf300077e2897649e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
8 years agodon't return false when a null pointer is expected
Joerg Bornemann [Thu, 9 Apr 2015 15:56:51 +0000 (17:56 +0200)]
don't return false when a null pointer is expected

Task-number: QTBUG-44748
Change-Id: I29616fdba5f0fefad3366563e12986cafa6266d6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
8 years agoRemove filterIncludePath and filterLibraryPath usage.
Lisandro Damián Nicanor Pérez Meyer [Thu, 9 Apr 2015 00:45:37 +0000 (21:45 -0300)]
Remove filterIncludePath and filterLibraryPath usage.

They are only defined in qt5's configure script.

Task-number: QTBUG-45463
Change-Id: Ibce2bd1d06e35de5174b15919c939b41cf013d05
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years agoAdd detection of and support for Visual Studio 2015
Joerg Bornemann [Wed, 25 Mar 2015 09:58:39 +0000 (10:58 +0100)]
Add detection of and support for Visual Studio 2015

Backport of qtbase/ce1c53b4.

Task-number: QTBUG-45100
Change-Id: I10db5cfca9976bc37e86b415c2b6e10f51ec5eeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
8 years agoUpdate copyright headers
Akseli Salovaara [Wed, 25 Mar 2015 14:26:20 +0000 (16:26 +0200)]
Update copyright headers

Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
8 years agoImprove digitToCLocale sign char handling
Samuel Gaist [Wed, 27 Nov 2013 08:11:28 +0000 (09:11 +0100)]
Improve digitToCLocale sign char handling

This patch adds more char tests for the plus and minus signs to
ensure that e.g. number input widgets can be used with the locale
and the known sign chars.

[ChangeLog][QtCore] Fixed a bug that caused negative number input
using '-' to be rejected because the current locale uses e.g. 0x2212.
QIntValidator and QDoubleValidator now accepts both signs as well as
the locale minus sign.

Task-number: QTBUG-35069
(cherry picked from commit qtbase/dc80838a378268a13ccbe74b481528f1ad631918)
Change-Id: I924bebe51028c58454eb864ad07d4af5efe3b5c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoAssistant: Fix index updating on startup in the remote control mode
Alexander Volkov [Fri, 19 Sep 2014 09:52:42 +0000 (13:52 +0400)]
Assistant: Fix index updating on startup in the remote control mode

HelpEngineWrapper::initialDocSetupDone() should be called only once
right after the initialization of the help models. Calling it on
every small update leads to recursion.

Task-number: QTBUG-36850
(cherry picked from qttools/d55407822eefbc05f7d8bb44c53b057332b5b399)
Change-Id: I3e0390e592069a417d88fbc202a1e45cd91cc139
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
8 years agoIdentify XButton1|2 release events when mouse is moving.
Matteo Bertini [Wed, 18 Feb 2015 16:10:41 +0000 (17:10 +0100)]
Identify XButton1|2 release events when mouse is moving.

X11 has no special state for XButton1 and XButton2, so we need
to look at the global `mouseButtonState` and restore the buttons
after a mouse move.

Task-number: QTBUG-40148
Change-Id: I789f32b344cf7902b1c7aa6b7da7f20f32602be2
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
8 years agofix qmake warning about unknown /Zc:strictStrings option
Joerg Bornemann [Fri, 20 Mar 2015 14:53:51 +0000 (15:53 +0100)]
fix qmake warning about unknown /Zc:strictStrings option

Make /Zc:strictStrings known to qmake's MSVC compiler option parser.

Change-Id: I5a4494096fc1d67c96c6de52bb0f1e94eff46136
(cherry picked from commit qtbase/55f88e6e310ceb99bef31ed8d884deaa55c78d91)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
8 years agoUse qSwap instead of std::swap so platforms without STL still compile
Andy Shaw [Fri, 20 Mar 2015 10:12:29 +0000 (11:12 +0100)]
Use qSwap instead of std::swap so platforms without STL still compile

Change-Id: Ieee4c1e795b13b3c2fd26d05c5655b4b596bd061
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
8 years agoqmlplugindump: Fix build with mingw.org
Kai Koehne [Wed, 18 Mar 2015 14:01:04 +0000 (15:01 +0100)]
qmlplugindump: Fix build with mingw.org

This is a backport of qtbase commits 3f1156ee5f802a996693.

Change-Id: I26ae5be5e8294854fc26e8a084b69045ade4a3dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
8 years agoconfigure: add '-psql_config' option
Peter Seiderer [Wed, 11 Mar 2015 19:55:42 +0000 (20:55 +0100)]
configure: add '-psql_config' option

Allow setting of pg_config path for cross compilation where pg_config is
not in the command search path (do the same as for mysql_config).
This is e.g. used for buildroot (see [1] for details).

Patch is backported from qtbase/a59028d6e98bcf5a13c9103753e5e83c362c63bc.

[1] http://lists.busybox.net/pipermail/buildroot/2015-March/121654.html

Change-Id: If2cce9c8e9e3f87bcbe80fcccacad881ec14b476
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years agoFixes crash in bmp and ico image decoding
Eirik Aavitsland [Wed, 11 Mar 2015 12:34:01 +0000 (13:34 +0100)]
Fixes crash in bmp and ico image decoding

Fuzzing test revealed that for certain malformed bmp and ico files,
the handler would segfault.

Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe
(cherry picked from qtbase/2adbbae5432aa9d8cc41c6fcf55c2e310d2d4078)
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoFixes crash in gif image decoder
Eirik Aavitsland [Wed, 11 Mar 2015 08:00:41 +0000 (09:00 +0100)]
Fixes crash in gif image decoder

Fuzzing test revealed that for certain malformed gif files,
qgifhandler would segfault.

Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1
(cherry picked from qtbase/ea2c5417fcd374302f5019e67f72af5facbd29f6)
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoSimplify calculation of week number
Lars Knoll [Fri, 27 Feb 2015 12:17:16 +0000 (13:17 +0100)]
Simplify calculation of week number

This also removes a dependency to 3rd party licensed code.

Backport of a29b7635bd1d58b29fca96bd3e7831d0ee1f6666 in Qt 5.

Change-Id: I647457d7787eed6d5bfc31de4816e68a9f236239
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoConfigure: Fix detection of GCC 5
Rex Dieter [Wed, 18 Feb 2015 13:17:22 +0000 (07:17 -0600)]
Configure: Fix detection of GCC 5

- Backport qt5 commit 9fb4c2c412621b63c06dbbd899f44041b2e126c2
- fix webkit feature enablement
- set QT_BUILD_KEY (same as gcc4), Qt5 has no QT_BUILD_KEY so no
  change there is necessary

Change-Id: Ie131be711a774052bc42f18e8090b2a3dde69475
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
8 years agoUpdate Hebrew translation for linguist and qtconfig
Orgad Shaneh [Thu, 5 Mar 2015 05:41:53 +0000 (07:41 +0200)]
Update Hebrew translation for linguist and qtconfig

Change-Id: Ic19596ddc1da75a11c7a52dc07266e05b43643c8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Genghis Khan <genghiskhan@gmx.ca>
8 years agoInfo.plist.lib whitespace fixup
Morten Johan Sørvig [Mon, 22 Sep 2014 12:32:35 +0000 (14:32 +0200)]
Info.plist.lib whitespace fixup

Change-Id: I2fed6342004218f4173c0ef72130b710d1a0f0c8
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
8 years agoQGLWidget and re-parenting
Timur Pocheptsov [Mon, 2 Mar 2015 14:52:19 +0000 (15:52 +0100)]
QGLWidget and re-parenting

On OS X we have QWidgetPrivate::glWidgets list to track all child gl-widgets
and this propagates though all the widget's tree, starting from QGLWidget and up to the
top-level window ('isWindow'). It can happen, that some of widgets in a chain is becoming
a window (but still has a parent) - this results in QGLWidget's destructor failing to remove
'this' from one of ancestors (since it stops on the first 'isWindow' ancestor).
Modify QWidgetPrivate::setParent_sys that it does NOT add glWidgets into the parent's
glWidgets, if this widget isWindow itself.

Change-Id: I4bf4a927a4e43537355fdcdef465638c91e9f956
Task-number: QTBUG-20652
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
8 years agoFix compiler warnings in Qt Designer.
Friedemann Kleint [Mon, 2 Mar 2015 09:23:02 +0000 (10:23 +0100)]
Fix compiler warnings in Qt Designer.

shared/widgetdatabase.cpp:371:66: warning: typedef 'NameItemMap' locally defined but not used [-Wunused-local-typedefs]
tools/designer/src/lib/shared/previewmanager.cpp:820:16: warning: converting ‘false’ to pointer type ‘QWidget*’ [-Wconversion-null]

Task-number: QTBUG-44747
Change-Id: I9781a8cbce1def5229fe0ed7071c04ae6880b039
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
8 years agoSimplify mirroring code and add tests for non-aliged 1 bit images
Laszlo Agocs [Fri, 27 Feb 2015 15:31:26 +0000 (16:31 +0100)]
Simplify mirroring code and add tests for non-aliged 1 bit images

Like it is done in Qt 5. Also add the autotest which was completely
missing in Qt 4.

Change-Id: Iaf89272b4e5b7f377c4b2f1ce929661f3d0edd9a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoFix Carbon build
Andy Shaw [Thu, 26 Feb 2015 20:05:49 +0000 (21:05 +0100)]
Fix Carbon build

Change-Id: Iae9445d1777ffced3d998e3f9a0a57117fa8d192
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
8 years agoFix a division by zero when processing malformed BMP files.
Richard J. Moore [Tue, 24 Feb 2015 19:02:35 +0000 (19:02 +0000)]
Fix a division by zero when processing malformed BMP files.

This fixes a division by 0 when processing a maliciously crafted BMP
file. No impact beyond DoS.

Backport of 661f6bfd032dacc62841037732816a583640e187

Task-number: QTBUG-44547
Change-Id: I43f06e752b11cb50669101460902a82b885ae618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoCorrect typo in the Gujarati openType identififer.
Michael Brüning [Mon, 23 Feb 2015 10:53:13 +0000 (11:53 +0100)]
Correct typo in the Gujarati openType identififer.

Based on testing by Paresh Adhia.

Task-number: QTBUG-44568
Change-Id: I11c9e304282ca5afbdb02a37c366a331a4f24b04
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
8 years agoFix Focus problem with QX11EmbedWidget
Yikei Lu [Thu, 12 Feb 2015 12:21:50 +0000 (21:21 +0900)]
Fix Focus problem with QX11EmbedWidget

Since QX11EmbedWidget can be included in another Qt application which
has QX11EmbedContainer, QX11EmbedWidget should be activated at first.

Task-number: QTBUG-3617
Change-Id: I23e12f6c3ed9f7bd4a3ac0d0237bf7382db14ee2
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
8 years agoDon't leak RENDER Pictures in QPixmap::paintEngine().
Pierre-Loup A. Griffais [Sat, 18 May 2013 03:18:01 +0000 (20:18 -0700)]
Don't leak RENDER Pictures in QPixmap::paintEngine().

Qt 5 doesn't use serverside pixmaps, so doesn't need this patch.

Change-Id: I5ad456679efd3706582dd1e6ca8e6b4404298739
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
8 years agoBackport implementation of OS X QSystemTrayIcon from Qt 5
Samuel Gaist [Sun, 20 Jul 2014 14:41:27 +0000 (16:41 +0200)]
Backport implementation of OS X QSystemTrayIcon from Qt 5

This patch aims to bring support of OS X >= 10.8 notification center and
update the growl support code.

[ChangeLog][OS X][Nofication] Added support for OS X 10.8 and upper
notification center.

Task-number: QTBUG-21830
Change-Id: Iad19c5e3a915e2caf15730a27ac762c9c11e493c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
8 years agoQThread: fix race when setting the eventDispatcher
Andy Shaw [Fri, 6 Feb 2015 09:50:29 +0000 (10:50 +0100)]
QThread: fix race when setting the eventDispatcher

Use QMutexLocker to make this thread-safe.

Task-number: QTBUG-29452
(cherry picked and adapted from qtbase/f4609b202208fe592d24c7ae3b4a48ee83045497)
Change-Id: I5caf71d9a5dc6e3d655eac84426a0c5592772235
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
8 years agoFix QLineF Detailed Description
Samuel Gaist [Thu, 5 Feb 2015 23:07:29 +0000 (00:07 +0100)]
Fix QLineF Detailed Description

Currently angle() is used in place of angleTo() to describe the
difference with intersect. This patch fixes that.

Task-number: QTBUG-44309
Change-Id: Idfc521932247f76fe15fd980ff8e87e52feec1f1
(cherry picked from qtbase/7dd0ea7b644fe63ef57a9e7b30a9fd5312159e40)
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
8 years agoQDeclarativeTextEdit: fix use of uninitialised value.
David Faure [Mon, 2 Feb 2015 13:34:00 +0000 (14:34 +0100)]
QDeclarativeTextEdit: fix use of uninitialised value.

Detected by valgrind:
==27068== Conditional jump or move depends on uninitialised value(s)
==27068==    at 0x70C7289: QDeclarativeTextEdit::updateTotalLines() (qdeclarativetextedit.cpp:1742)

Backport from qtquick1

Change-Id: Iafc0c0072e6ab318fd4643e8ac7531edf5ec7ad0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
8 years agoFix a translation for zh_CN
Liang Qi [Tue, 3 Feb 2015 08:26:52 +0000 (09:26 +0100)]
Fix a translation for zh_CN

Task-number: QTBUG-32452
Change-Id: I78e70732f03be9b94ceb9efaab72f3693d6dd523
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years ago*.sln not generated correctly for VS2012 and VS2010
Katja Marttila [Mon, 2 Feb 2015 15:57:32 +0000 (16:57 +0100)]
*.sln not generated correctly for VS2012 and VS2010

msbuild fails to build project since sln not generated correctly

Task-number: QTBUG-33446
Change-Id: If92ea743b1b407446873210090aa8591a491abad
(cherry picked from qtbase/3515365b9843b12e488880a0685b71f7b3250c33)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
8 years agoAdded check if fontEngine is still in the cache.
David Weisgerber [Sun, 25 Jan 2015 11:47:31 +0000 (12:47 +0100)]
Added check if fontEngine is still in the cache.

Task-number: QTBUG-22942
Change-Id: I9e4ac72168886769993cb19fac7a370c377ff3af
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
8 years agoFix wrong Japanese translation
Takumi Asaki [Tue, 27 Jan 2015 06:54:40 +0000 (15:54 +0900)]
Fix wrong Japanese translation

Translation in Qt5 is already fixed
in qttranslations/16d5447febe09fcb44be6cdb77e03ffb80238bd9.

Task-number: QTBUG-44081
Change-Id: I114a402573f47df604d529407774d44ac3c419f1
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
8 years agoFix bugs generating PDF on Cocoa
James Turner [Sat, 17 Jan 2015 16:31:20 +0000 (22:01 +0530)]
Fix bugs generating PDF on Cocoa

Provide real implementations of:
    properties(), faceId() and getUnscaledGlyph

Task-number: QTBUG-10094
Change-Id: Ib84a7a5c9e29e4d634b47bc2856787b2482048da
(cherry picked from qtbase/517fb9026896f7ac20376f253babae5a7c57721d)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
8 years agoUse qt.io rather than qt-project.org for network tests
Shawn Rutledge [Tue, 27 Jan 2015 13:42:35 +0000 (14:42 +0100)]
Use qt.io rather than qt-project.org for network tests

Mainly because of a change in certificates which is causing failing
tests. Cherry-picked from https://codereview.qt-project.org/104619/

Change-Id: I8304e5ac4107428a250b71be5df7b5399a811017
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoBump year to 2015
Kai Koehne [Tue, 13 Jan 2015 13:44:50 +0000 (14:44 +0100)]
Bump year to 2015

Bump year to 2015 in all but source code comments.

Change-Id: I1dd7972dee65a86a9bd560ead32bbd0cbe82f439
Reviewed-by: Martin Smith <martin.smith@digia.com>
8 years agoIgnore expired certificate during certificate validation
Andy Shaw [Wed, 14 Jan 2015 21:47:55 +0000 (22:47 +0100)]
Ignore expired certificate during certificate validation

OpenSSL has a bug when validating a chain with two certificates.
If a certificate exists twice (which is a valid use case for renewed
CAs), and the first one it hits is expired (which depends on the order
on data structure internal to OpenSSL), it will fail to validate the

This is only a bandaid fix, which trades improved chain validation
for error reporting accuracy. However given that reissuing of CA certs
is a real problem that is only getting worse, this fix is needed.

See also: https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html#WARNINGS

[ChangeLog][QtNetwork][QSslSocket] Added a workaround to an OpenSSL problem
that may cause errors when the trust store contains two certificates of the
issuing CA, one of which is expired.

Task-number: QTBUG-38896
(cherry picked and adapted from qtbase/0065b55da42b8c6ee0095264b5275fb708887c9d)
Change-Id: I2515d79a442bec96734ea88ea850e6e8c2123a6c
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoDoc: Update copyright information in documentation templates
Topi Reinio [Wed, 14 Jan 2015 11:01:51 +0000 (12:01 +0100)]
Doc: Update copyright information in documentation templates

    - Update copyright year to 2015
    - Update copyright holder to The Qt Company Ltd

Change-Id: I2ed489f82639c93344051de38491183987a743e1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
8 years agoUpdate GitIgnore
Orgad Shaneh [Sun, 11 Jan 2015 21:38:52 +0000 (23:38 +0200)]
Update GitIgnore

Add webkit artifacts

Change-Id: Ifeb9f0fdf4651183400719f46257dd430b57b362
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years agoUpdate Hebrew translation
Orgad Shaneh [Sun, 21 Dec 2014 19:23:08 +0000 (21:23 +0200)]
Update Hebrew translation

All covered except XmlPatterns

Change-Id: I71097ac3263ec720efadfc9973132c52d4703d2d
Reviewed-by: Genghis Khan <genghiskhan@gmx.ca>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
8 years agoIntroduce Windows version 10.
Friedemann Kleint [Fri, 19 Dec 2014 09:58:34 +0000 (10:58 +0100)]
Introduce Windows version 10.

Detect OS kernel version 10.0 as Windows 10.

Task-number: QTBUG-43413
Change-Id: I39307cf8cc2e7cc209d6a88b8576db87086fa20e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from qtbase/b495a27d4e28ed19b00557dbaf8ab5d31c21ae4f)
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoFix empty arrays in QML 1
Robert Griebl [Thu, 8 Jan 2015 15:33:34 +0000 (16:33 +0100)]
Fix empty arrays in QML 1

Commit bb0239e added a regression, where empty arrays would produce errors
in QML 1.

Task-number: QTBUG-43656
Change-Id: I6d416b2387a1dfd3588c000368fc1223d08399bd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
8 years agoWindows: Fix OS version determination for Windows >= 8
Friedemann Kleint [Fri, 19 Dec 2014 10:07:47 +0000 (11:07 +0100)]
Windows: Fix OS version determination for Windows >= 8

First, try to determine the version of kernel32.dll by
using the version API. If that fails, loop using the
version macros, taking the major version into account.

Hangs in the minor version loop have been observed, potentially
related to the major version.

Task-number: QTBUG-43413
Change-Id: I982e78873510e7598c7cf839177e59812acd86f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
(cherry picked from qtbase/6796f2337ee31b4b4f07eaa54d868b999c39233a)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoQDateTime: Fix time format in doc
Orgad Shaneh [Sat, 3 Jan 2015 16:59:39 +0000 (18:59 +0200)]
QDateTime: Fix time format in doc

MM stands for month, SS is invalid

Task-number: QTBUG-12236
Change-Id: I9b4a57d05d77fd38db30b53b16c382ea545edb80
(cherry picked from qtbase/a457bf3ff73627aa2c95f0482a838b14fd3233a0)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoFix compilation with QDND_DEBUG.
Friedemann Kleint [Tue, 6 Jan 2015 15:40:15 +0000 (16:40 +0100)]
Fix compilation with QDND_DEBUG.

Task-number: QTBUG-43466
Change-Id: I9a8ef1f33635469f12d259af9716eb60b650a9de
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
8 years agoAdd Hebrew translation for Qt Linguist
Orgad Shaneh [Sat, 20 Dec 2014 17:22:57 +0000 (19:22 +0200)]
Add Hebrew translation for Qt Linguist

Started-by: Genghis Khan <genghiskhan@gmx.ca>
Change-Id: I761e104437ea99cbb1a44f3571824546a9b19a18
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Genghis Khan <genghiskhan@gmx.ca>
8 years agoCheck world matrix is true when seeing if transformations are supported
Andy Shaw [Fri, 19 Dec 2014 14:23:12 +0000 (15:23 +0100)]
Check world matrix is true when seeing if transformations are supported

If the world matrix is turned off then if the raster paintengine should
not support transformations for the text as otherwise it could end up
being incorrectly transformed.

Task-number: QTBUG-35200
Change-Id: I68fa6654ee87016986ba9d9469673fc8b9e0875e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
8 years agoQIdentityProxyModel: remove slow bounds-checking, for more performance
David Faure [Fri, 31 Oct 2014 16:18:47 +0000 (17:18 +0100)]
QIdentityProxyModel: remove slow bounds-checking, for more performance

If we're called out of bounds, sourceModel()->index() will take care of
returning an invalid model index anyway. So calling rowCount+columnCount
every time index() is called can be avoided. These calls can be particularly
slow when sitting on top of a stack of proxymodels. And index() itself is called
very often, i.e. when a proxymodel on top of us is used by a delegate
which calls data() for many different roles.

Change-Id: I00dd5cf432c0591f41e6fa6fc86c845f29845cd1
(cherry picked from qtbase/3de0f442b5857915f26be6600bc8e54d1af08208)
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
8 years agoAutotest: Setting tst_qaudiooutput and tst_qsound as insignificant
Simo Fält [Mon, 22 Dec 2014 08:01:46 +0000 (10:01 +0200)]
Autotest: Setting tst_qaudiooutput and tst_qsound as insignificant

These always fails on virtual Mac CI nodes.

Task-number: QTBUG-43507
Change-Id: I8f8fab92693aea7c797eee4e930c8ed5e82954c9
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
8 years agoUse metrics returned by GetGlyphOutline in GGO_METRICS mode
lasconic [Thu, 18 Sep 2014 07:44:03 +0000 (13:14 +0530)]
Use metrics returned by GetGlyphOutline in GGO_METRICS mode

GetGlyphOutline Windows API returns wrong values when used with an
OpenType PS font and in GGO_NATIVE mode. It causes problem when
exporting to PDF. The fix changes the GetGlyphOutline call to use
GGO_METRICS instead.

Task-number: QTBUG-12799
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Change-Id: I38ca46d50e490e3b704a89d08b1a8697bca5f079
(cherry picked from qtbase/4aba2d07d2fe67beaf544a4b38c5b9aa8b8ec39b)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
8 years agoFix OpenType fonts with cmap tables on Windows
Josh Faust [Mon, 10 Jun 2013 18:42:01 +0000 (00:12 +0530)]
Fix OpenType fonts with cmap tables on Windows

Task-number: QTBUG-31656
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Change-Id: If941bddb6173b6bd93117ba5bd35fa4050f29e3d
(cherry picked from qtbase/0a170be576153b84ee6249f1a2b7cbce1ef10d84)

8 years agoMake distance fields rendering work with Opentype CFF fonts
Eskil Abrahamsen Blomfeldt [Fri, 21 Dec 2012 14:23:28 +0000 (19:53 +0530)]
Make distance fields rendering work with Opentype CFF fonts

If the font has a CFF table, GDI will not label it as
TMPF_TRUETYPE, however, we can still use GetFontData to get
the SFNT tables. This is required to get the maxp table which
contains the glyph count, which is required to use the font
with the distance-field renderer.

Task-number: QTBUG-28746
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Change-Id: I1e084f7e9dbd0bccb9b1ff4de2eaf65d6a5f9f1e
(cherry picked from qtbase/dde09c429ae8b7ad0df4e4b36b8459d2b85a1219)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years agofix glyph's CMAP index might be corrupted
Konstantin Ritt [Mon, 7 May 2012 23:57:34 +0000 (05:27 +0530)]
fix glyph's CMAP index might be corrupted

when SMP sybmol is present in the font.
this is a simple typo fix, actually

Change-Id: I34fc01171f2893d36d36cc929b4f1a789a5f36db
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
(cherry picked from qtbase/51998eb4f65b92640176973ba0e0ed14adee561d)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
8 years agofix QWebSettings::setUserStyleSheetUrl() not working with windows paths
Ashish Kulkarni [Mon, 5 May 2014 12:39:18 +0000 (18:09 +0530)]
fix QWebSettings::setUserStyleSheetUrl() not working with windows paths

QWebSettings::setUserStyleSheetUrl() does not work with windows paths
that contain drive letters.

KURL::path() alone does not handle removing the leading slash from a
windows file path. Using QUrl::toLocalFile() will turn
​file:///C:/path into C:/path appropriately

This fixes https://bugs.webkit.org/show_bug.cgi?id=34884.

Change-Id: I37a1482b67447be6ea6a10966cf59c9159db83cd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
8 years agoFixed a bug where spans did not always work in layouts.
Jan Arve Saether [Tue, 9 Dec 2014 12:26:18 +0000 (13:26 +0100)]
Fixed a bug where spans did not always work in layouts.

The problem was that the span we stored in the multiCellMap was the
"effective" span (i.e.  the given span subtracted with the number of
ignored rows it would span). Later we used that span to distribute its
size across all its cells.  However, since the span now could be smaller
that the given span, we could sometimes fail to distribute to the last

[ChangeLog][QtWidgets][layouts] Fixed a bug where spans sometimes didn't
distribute themselves to the last cells they covered.

Change-Id: I7bfbbe721f0ec4398be6a5f234c109ddfec18514
Task-number: QTBUG-43099
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
(cherry picked from qtbase/c9db6e52bc9bd9731159fcb4e95fca5cba01bc9c)

8 years agoWindows: Fix return value of QDesktopServices::storageLocation(DataLocation).
Friedemann Kleint [Thu, 4 Dec 2014 08:09:30 +0000 (09:09 +0100)]
Windows: Fix return value of QDesktopServices::storageLocation(DataLocation).

Return empty string if SHGetSpecialFolderPath() fails for DataLocation, ie,
the directory does not exist.

Change-Id: I2abf41174b904fe36e587894832c0f3f4947dc1e
Task-number: QTBUG-43092
Reviewed-by: David Faure <david.faure@kdab.com>
8 years agoRewrite debug output of event classes.
Friedemann Kleint [Fri, 1 Aug 2014 09:03:22 +0000 (11:03 +0200)]
Rewrite debug output of event classes.

Bring debug formatting in Qt 4 on par with Qt 5.4:
- Introduce functions to return class name and type name by type.
- Add verbose output for DnD, tablet, native gestures and context
  menu, events.

Task-number: QTBUG-38858
Task-number: QTBUG-42344

[ChangeLog][QtGui][QEvent] The debug output for events has
been significantly improved.

Change-Id: I3f11e34c3c9d6a3c6db596be4051b801f00e6153
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
(cherry picked from qtbase/14f9c09542bd6cc19430473da9ce4c68f239ec7d)
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
8 years agoBump Qt version to 4.8.7
Akseli Salovaara [Mon, 1 Dec 2014 13:27:34 +0000 (15:27 +0200)]
Bump Qt version to 4.8.7

Change-Id: Icd6fcdb59eb1b9fd8de555ef1c1c87a379f06a27
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoAuto-scroll while selecting entire rows/columns did not work
Jan Arve Saether [Thu, 23 Oct 2014 08:30:39 +0000 (10:30 +0200)]
Auto-scroll while selecting entire rows/columns did not work

If you press and hold a section in a header view you can extend the
selection to more rows by moving the mouse. This worked fine until you
moved the mouse outside the geometry of the header view. The expected
behavior was then to scroll the view (this is what happens with extended
selections on regular table cells).

[ChangeLog][QtWidgets][QHeaderView] Auto-scroll the view when making
extended row/column selections.

Change-Id: Ic65aa34d370e74054b2123ab57edb1add0e8adb9
Task-number: QTBUG-21201
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
(cherry picked from qtbase/f9408317e70bc2e635a2f9baeff35d1c06227734)

8 years agoFix minor compiler warning
Kevin Funk [Thu, 27 Nov 2014 19:32:50 +0000 (20:32 +0100)]
Fix minor compiler warning

Change-Id: Ifb0e8c7998ca2b4cba9ce4a34655614d7cefb860
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
8 years agoOnly add the res_file to the generated files if there is no rc_file
Andy Shaw [Tue, 2 Jul 2013 12:44:53 +0000 (14:44 +0200)]
Only add the res_file to the generated files if there is no rc_file

If both the rc_file and res_file was added to the project then in MSVC
2012 it would cause an error complaining of a duplicated resource.

Task-number: QTBUG-29826
Change-Id: Ib3401b423208cd8c90895038c9cbadd80c39b542
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/fa1fb5ed945650d45cf9b61906232cfbae11360e)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years agoRemove the use of a template qUnused function for ICC
Thiago Macieira [Fri, 11 Nov 2011 19:55:46 +0000 (17:55 -0200)]
Remove the use of a template qUnused function for ICC

ICC 12 does not seem to need this.

Change-Id: I98e9d530e767c4d24424f0c2b5d763f863e85fe4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
(backported from qt5/qtbase d3951a5b0f4fe9731d1512668b43f51bd98bd84e)
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
8 years agoFix string placeholders in two translations
Andy Shaw [Mon, 24 Nov 2014 11:02:05 +0000 (12:02 +0100)]
Fix string placeholders in two translations

As the translation in Qt 5 is more out of date this is being fixed
directly in the Qt 4.8 version as this is more accurate.

Change-Id: Ie7abbd224e26f8af63d80acd81ddf2973b39e0d4
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
8 years agoFix thai symbol rendering slowness
Konstantin Ritt [Thu, 20 Nov 2014 13:41:05 +0000 (19:11 +0530)]
Fix thai symbol rendering slowness

Harfbuzz is constantly trying to load libthai in
making rendering of thai symbols very slow.

Task-number: QTBUG-37665
Change-Id: I30a2a5489271534eeacc205d8106b22130c40c5f
(cherry picked from qtbase/47e6ec0736aa129e181e0b6f02cec884f9832432)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
8 years agoParse multiple buttons during mouse press and release
Allan Sandfeld Jensen [Fri, 31 Oct 2014 12:43:32 +0000 (13:43 +0100)]
Parse multiple buttons during mouse press and release

Copies the logic for parsing mouse buttons from Qt5 QtWebKit so that
button clicks when another button is held works.

Task-number: QTBUG-42319
Change-Id: If56e20533531fe949eef444eb7e2f747907f5bcc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
8 years agoAdjust the layout if a QGraphicsWidget is explicitly hidden
Jan Arve Saether [Mon, 20 Oct 2014 13:40:18 +0000 (15:40 +0200)]
Adjust the layout if a QGraphicsWidget is explicitly hidden

Task-number: QTBUG-20132
Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
(cherry picked from qtbase/bf200fc948d89e1a735a8bcca879654028f944d2)

8 years agoFix compiler warning
Lars Knoll [Thu, 30 Oct 2014 08:58:23 +0000 (09:58 +0100)]
Fix compiler warning

Already fixed in Qt 5

Task-number: QTBUG-42032
Change-Id: I7ed7d955115e875468b94759bda44f99b737e7cb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
8 years agoHandle relative paths correctly for files in QMAKE_BUNDLE_DATA
Andy Shaw [Wed, 2 Oct 2013 12:58:35 +0000 (14:58 +0200)]
Handle relative paths correctly for files in QMAKE_BUNDLE_DATA

Partially cherry pick from f6bd02317db7beadda1237df7feddd4a780415cb
from Qt 5. The Qt 5 SHA1 changes a lot of different parts in the
XCode generator after a general qmake change caused some problems.
So we just pick the part needed to fix the handling of relative
paths used in files in QMAKE_BUNDLE_DATA.

Change-Id: I364f82a353dfa922591d07c2aa9061666b79de02
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
8 years agoqmake vcxproj generator: write PrimaryOutputExtension value
Joerg Bornemann [Tue, 21 Oct 2014 11:47:16 +0000 (13:47 +0200)]
qmake vcxproj generator: write PrimaryOutputExtension value

Second attempt. MSVCPROJ_TARGET contains the resolved target name,
including version number and target extension.
We're splitting this value into PrimaryOutput and
PrimaryOutputExtension is only written if it contains a non-default

Task-number: QTBUG-26782
Change-Id: I4b828dc5dd47322f653585aee1a5767f0cf8bd48
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from commit qtbase/d1e950b919615c1ae754e07899f1b45303c17654)
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
8 years agofix warning when generating VS 2013 project
Joerg Bornemann [Tue, 11 Feb 2014 13:10:00 +0000 (14:10 +0100)]
fix warning when generating VS 2013 project

/FS forces the compiler to synchronize pdb file writes.
This option is not needed when building with Visual Studio itself.
Still, qmake needs to know it when parsing the compiler flags.

Task-number: QTBUG-36535
Change-Id: Id5b68c4028844e0b95904e08b5121310a4ff13d6
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from commit qtbase/9b59e51c5064c67c423389c2c884d009903910c7)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
8 years agoWindows native socket: handle WSAENETRESET the same as WSAECONNRESET
Shawn Rutledge [Wed, 22 Oct 2014 07:31:54 +0000 (09:31 +0200)]
Windows native socket: handle WSAENETRESET the same as WSAECONNRESET

Backported from Qt 5.

Task-number: QTBUG-41934
Change-Id: I4cebfb4b5f6e400b54cab3271af4411becd91b9f
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoFix license text and URLs in QMessageBox::aboutQt().
Friedemann Kleint [Mon, 6 Oct 2014 14:39:12 +0000 (16:39 +0200)]
Fix license text and URLs in QMessageBox::aboutQt().

Point to new qt.io site, adapt licensing text.

Task-number: QTBUG-41798
Change-Id: I492df6a842c2b31e44653fb4388408c209f24f1e
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
(cherry picked from qtbase/4a2cf9ca4174ee9879bfc5858f10dacc028a521f)
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoQTreeView: speed up isRowHidden for the case where no rows are hidden.
David Faure [Sun, 12 Oct 2014 11:38:41 +0000 (13:38 +0200)]
QTreeView: speed up isRowHidden for the case where no rows are hidden.

isPersistent(index) is a linear search, which we can avoid altogether
(as well as the creation of a persistent model index, is idx is indeed persistent)
when the row-hiding feature isn't used at all.

Change-Id: I55ef204dd9b79a89d51d5d3aacc1c110d37a4ea0
(cherry picked from qtbase/cd824ee79188b889df85d4d648a625589655e15e)
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
8 years ago[OS X]: respect icon visibility preference in system tray menus
René J.V. Bertin [Mon, 6 Oct 2014 16:47:01 +0000 (18:47 +0200)]
[OS X]: respect icon visibility preference in system tray menus

Check the `IconVisibleInMenu` switch so that systray menu items only
show an icon if the application/user has configured things that way,
and not otherwise.

Task-number: QTBUG-41348
Change-Id: Ibb7db326fd598ca78cb95c815b5e165de2babeda
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
8 years agoQMacStyle: Fix QTabBar appearance on Yosemite
Jari Tenhunen [Sun, 5 Oct 2014 16:49:39 +0000 (19:49 +0300)]
QMacStyle: Fix QTabBar appearance on Yosemite

The selected tab text color should be white except when the
window is not active. Also, no text shadow should be rendered
in any case. Finally, there's no need to move the tab shape up

Backport of qtbase/e9e66079b16754f1fef89c2ad93593d7d55c8654

Change-Id: Ib41b9ccb990dc5c550f5a48c855bebd39262b06e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoMake sure the content widget never replaces valid data with empty data.
Christian Kandeler [Fri, 26 Sep 2014 10:15:59 +0000 (12:15 +0200)]
Make sure the content widget never replaces valid data with empty data.

This could happen because insertContents() is called once for
every run of the content provider, even if an invalidation happens
in between. Example sequence:
    invalidate() [removes result of first run]
    insertContents() [queued for first run, retrieves result of second run]
    insertContents() [queued for second run, retrieves empty data]
We now check in insertContents() whether the content provider has a
valid root item and do nothing if it does not. This means that
insertContents() will never replace the current model data with empty
data; only invalidateContents() can do that from now on.
Further improvements:
    - Only call insertContents() if the run was not aborted; this
      reduces the number of useless objects in the event queue.
    - Remove the m_rootItem member; it was only used in the run() function.
    - Only add the root item to the list at the end of a successful run;
      there is no reason this object should be accessible from the outside
      while there are still children being added to it.

Change-Id: I80e2ea93dd9bbc8ab7f406c989b61f16f11b6eea
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
8 years agoUpdate Hebrew translation
Genghis Khan [Fri, 8 Aug 2014 07:04:26 +0000 (10:04 +0300)]
Update Hebrew translation

Change-Id: I9a4d4f236cfca386f717629b09a23e51baab6bd5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
8 years agoBackport: use backslashes for UNCs path
Samuel Gaist [Sun, 7 Sep 2014 21:27:47 +0000 (23:27 +0200)]
Backport: use backslashes for UNCs path

ShellExecute fails to open a share folder due to using '/' instead of '\'.

Windows API doesn't support forward slashes for extended-length path.
Extended-length path are path that start with a "\\?\" prefix. For example,
"\\?\c:\very_long_path\foo\bar.txt", or in the case of a UNC path that
would be "\\?\very_long_path\foo\bar.txt". [1]

[1] http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath

(cherry-picked and adapted from qtbase/18c916517f3004d34482c20ed66bf09ec274d385)
Task-number: QTBUG-13359
Change-Id: I2f38ecb76d87b87dc1d40bd48c94c78550a6ca1f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoQLineEdit: Disable standard key 'cut' when there is no selection.
Dyami Caliri [Wed, 17 Sep 2014 18:11:57 +0000 (11:11 -0700)]
QLineEdit: Disable standard key 'cut' when there is no selection.

(cherry-picked from qtbase/0aa84a619ea0a7c85a1ed48ed28817d4c7e40b33)
Task-number: QTBUG-40477
Change-Id: I48aa7ecc4ee8a8e4e9feaf9b6cba5109d2d1f725
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoFix libmng test.
Lisandro Damián Nicanor Pérez Meyer [Sat, 23 Aug 2014 18:45:34 +0000 (15:45 -0300)]
Fix libmng test.

libmng pulls in libjpeg. In turn libjpeg requires that code that uses it should
include stdio.h [0].

[0] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461602#10>

So adding the corresponding include before libmng solves the issue.

(cherry picked from qtimageformats/08f40bc0f00716c3a8cbda70ed00dc2f16515e85)
Change-Id: Ib249fa9d867536c19be8e376f6c5595080cab006
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoFix DateTime with recent versions of tzdata
Allan Sandfeld Jensen [Fri, 19 Sep 2014 12:24:44 +0000 (16:24 +0400)]
Fix DateTime with recent versions of tzdata

An backport of http://trac.webkit.org/changeset/150833 needed for
correct time KRAT, YAKT and MOS timezones.

Task-number: QTBUG-41422
Change-Id: I6e9d1db690fee8d77faa1d76c836bd7b345ce854
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
8 years agoFix crash when accessing the content model.
Christian Kandeler [Fri, 19 Sep 2014 11:48:07 +0000 (13:48 +0200)]
Fix crash when accessing the content model.

1) Make sure invalidateContents() is called whenever the help engine's
   DB readers are destroyed.
2) In QHelpContentProvider::stopCollecting(), remove all root items, as
   they are invalid now: Their child items reference DB readers that
   are going to be destroyed.

Task-number: QTBUG-18829
Change-Id: Iab3245eb9fd405f28105aa08a976d9a108b9c70a
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
8 years agoOSX: make QFileDialog::getSaveFileName honor the initial file name.
Erik Verbruggen [Tue, 16 Sep 2014 11:39:25 +0000 (13:39 +0200)]
OSX: make QFileDialog::getSaveFileName honor the initial file name.

Since OSX 10.9 the NSSavePanel will call panelSelectionDidChange on the
delegate when the selection is changed programmatically, even when the
panel is not (yet) visible. This overwrites the selected file name
with the default "Untitled" before we'd set it in
runApplicationModalPanel. The fix is to check if panelSelectionDidChange
is called before it is shown.

Change-Id: I9ad6cd3afddc0aac35baebab31fd85cd7bf3f9e9
Task-number: QTBUG-36212
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoQPdf::addImage(): avoid a QImage detach when it's in an acceptable Format
Martin Pley [Tue, 10 Jun 2014 10:53:59 +0000 (12:53 +0200)]
QPdf::addImage(): avoid a QImage detach when it's in an acceptable Format

Don't detach QImage, when it's in Format_Mono or Format_ARG32.
Use QImage::constScanLine() instead of QImage::scanLine().

Change-Id: I30fcafb576aea3189637a40fd75f77c70017ba46
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
(cherry picked from qtbase/1a32cc0ae42a4a49f2d45b8ad8251ec40a30bf76)
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
8 years agoadmitting defeat
Oswald Buddenhagen [Tue, 9 Sep 2014 13:45:14 +0000 (15:45 +0200)]
admitting defeat

(cherry picked from qttranslations/b9a22c997c1a988ff8e6b52893e4673e9ac69a2b)
Change-Id: I050998c14f4053a5c006d7a0da8b8befb21902b0
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoQListView: Catch stack overflow on mutual scrollbar calculation.
Lars Knoll [Wed, 10 Sep 2014 07:39:13 +0000 (09:39 +0200)]
QListView: Catch stack overflow on mutual scrollbar calculation.

Backport of fc4993be1fa7673016b6e5d81134463f163051f6 from Qt 5.

Task-number: QTBUG-39902
Task-number: QTBUG-38517
Change-Id: I66b2c7304423dd65d67158ae0dc70ad12e4fa783
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
8 years agoFix font cache check in QFontEngineFT::recalcAdvances()
Miikka Heikkinen [Fri, 16 Mar 2012 09:13:55 +0000 (11:13 +0200)]
Fix font cache check in QFontEngineFT::recalcAdvances()

Cached font was used regardless of the format, resulting in incorrect
advance in some cases when default format differed from the cached

Task-number: QTBUG-24188
Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
(cherry picked from qtbase/2ea976c3a713535c2419d936d575e0b24545f0fa)
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
8 years agoRevert previous QFileDialog fix for Solaris
Samuli Piippo [Mon, 1 Sep 2014 09:46:39 +0000 (12:46 +0300)]
Revert previous QFileDialog fix for Solaris

This reverts previous commit 6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04,
that broke compilation of QFileDialog in solaris (Sun CC).

Solaris defaults to Draft version of getpwnam_r if _POSIX_C_SOURCE is not
defined or < 199506L, and _POSIX_VERSION is defined as 199506L even when
_POSIX_C_SOURCE is not used, so it cannot be used to detect correct
posix support.

Task-number: QTBUG-21451
Change-Id: Ibbf2b9de1dea74e7d8b6003d1a4e3686e5858525
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Milla Pohjanheimo <milla.pohjanheimo@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
8 years agoQSwipeGestureRecognizer: Use qAbs() to check distances.
Friedemann Kleint [Wed, 3 Sep 2014 07:40:01 +0000 (09:40 +0200)]
QSwipeGestureRecognizer: Use qAbs() to check distances.

Task-number: QTBUG-15768
Change-Id: Idc6c6687430365a015fb2c15f4e4dcae6a687f9f
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
(cherry picked from qtbase/74303ad497ff0e3a9876d349e2ce2f67f08c0fbf)

8 years agoDon't call virtual methods after the source model is destroyed.
Andreas Hartmetz [Thu, 28 Aug 2014 18:23:11 +0000 (20:23 +0200)]
Don't call virtual methods after the source model is destroyed.

Calling clear_mapping causes the persistent indexes to be queried, and
mapped using map_to_source, so that they can be restored later. That
is not the appropriate response to the source model being deleted
because there won't be anything to restore.

Simply clear the stored mapping information instead so that the source model
actually exists when mapToSource is called by the framework.

Backport of 722798a359761a1eb635d18547b076615f192508 from qt5/qtbase

Change-Id: I9c74f97855046b968dfba7a35134c234b974e63b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
8 years agoReplace all ocurrences of NSApp with [NSApplication sharedApplication].
Jake Petroules [Mon, 16 Jun 2014 11:58:29 +0000 (07:58 -0400)]
Replace all ocurrences of NSApp with [NSApplication sharedApplication].

The former returns an id and the latter returns an NSApplication*. This
gives us the benefits of static typing and resolves a build error on
OS X 10.10.

Task-number: QTBUG-39644
Change-Id: I62939b168f391beb846f8a1c5ae789e45bceb858
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoFix AArch64/arm64 detection.
Lisandro Damián Nicanor Pérez Meyer [Wed, 20 Aug 2014 20:52:49 +0000 (17:52 -0300)]
Fix AArch64/arm64 detection.

The detection needs to go before arm, else the system will detect AArch64/arm64
as arm.

This patch comes from Wookey, he has agreed to put it under BSD or Expat
to allow it's inclusion in here:

Change-Id: Ic2171c03fca8bb871347940fa3a2bc467776f797
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoAllow Qt4 to also build in ppc64[el le]
Lisandro Damián Nicanor Pérez Meyer [Sat, 23 Aug 2014 18:05:34 +0000 (15:05 -0300)]
Allow Qt4 to also build in ppc64[el le]

This simple patch allows ppc64le (aka ppc64el) to build Qt4.

The original patch was done by Ubuntu's William Grant [0], but
I higly doubt this is copyrighteable.

[0] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749743#39>

Change-Id: I4cd204e314789337e34b460dda6e18143e3712ec
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoFix QPainter::drawPolyline() painting errors with cosmetic pen
aavit [Tue, 12 Aug 2014 11:54:17 +0000 (13:54 +0200)]
Fix QPainter::drawPolyline() painting errors with cosmetic pen

Task-number: QTBUG-31579
Change-Id: I8fd2c03ff9a22e4963bfcbcfe196ae4c61b9e10f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
(cherry picked from qtbase/319cbb7597100f3b65792dc6a0ce2885ce6c0e8c)
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>