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>
8 years agoQThread snippet: add missing & from connection statement
Samuel Gaist [Thu, 21 Aug 2014 07:42:32 +0000 (09:42 +0200)]
QThread snippet: add missing & from connection statement

Change-Id: I0409feec55ebd19f80b0c2396c49b4999798ef74
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
8 years agoQMacStyle: Fix focus frame rendering in Yosemite
Jari Tenhunen [Mon, 18 Aug 2014 18:08:02 +0000 (21:08 +0300)]
QMacStyle: Fix focus frame rendering in Yosemite

Using the HITheme API would result in the frame's right edge
to be missing.

Instead, we use the recommended technique to draw the focus
ring around a custom NSCell. (See

Backport of 769af6689337285927a2637b184149f688332542 from Qt5/qtbase

Change-Id: I8f3992edc065e14632ec4e473732b30bcf4c1937
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoMac Style: Fix QLineEdit frame in 10.10
Jari Tenhunen [Mon, 18 Aug 2014 18:02:20 +0000 (21:02 +0300)]
Mac Style: Fix QLineEdit frame in 10.10

Also removes some dead code.

Backport of 83f06da1c6bffff61af78cbe75a0691d53742b53 from qt5/qtbase

Change-Id: I7e088ca8b52bc3e2da25e29ab570469eab6f97bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agorefactor disconnectFromFtp to remove cached entries when necessary
Matt Broadstone [Mon, 18 Aug 2014 21:02:52 +0000 (17:02 -0400)]
refactor disconnectFromFtp to remove cached entries when necessary

In cases where a cached ftp connection fails to connect, or a file
transfer has failed, we should removed the cached connection. Since qnam
has an idea of a single internal QFtp per full operation, when file
transfers failed previously the cached connection would be reused for
subsequent connections and thus fail.

[ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now
properly handles FTP transfer failures by removing failed cached ftp

Task-number: QTBUG-40797
(cherry picked and adapted from qtbase/45cbbe56bc13216b83215ea148590eccf81f420a)
Change-Id: Ie9eec5ec54af16a8d19e34d04bdd993cc7bbd0f5
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoqmake: Add object_parallel_to_source config option
Tor Arne Vestbø [Mon, 5 Dec 2011 14:50:43 +0000 (15:50 +0100)]
qmake: Add object_parallel_to_source config option

This solves the problem of two source files in the same project
having the same name, which ends up with colliding object files.
It also solves issues with moving files around in the source tree
when the GNUmake option is used together with gcc_MD_depends,
where the dependency file would end up with a dependency to the
old source location.

We already have object_with_source option, but that does not play
nicely with shadow-builds. The new option tries to keep the same
hirarcy in the output dir (while still respecting OBJECTS_DIR),
as the sources. Any source with a path outside of the root project
directory (absolute or relative, ../../foo.cpp), will be put inside
the objects directory with the full path appended.

Task-number: QTBUG-34871
(cherry picked from qtbase/47df12225918ba82abe35921af19e547717da58b)
Change-Id: I3481b128ed72494a644fdbc55325661a23e868fa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoRemove use of 'register' from Qt.
Kevin Funk [Thu, 7 Aug 2014 15:42:16 +0000 (17:42 +0200)]
Remove use of 'register' from Qt.

It is deprecated and clang is warning about it [-Wdeprecated-register].

Original patch from Stephen Kelly,
see commit d9fb6e6dbb2b322556d581265da2442e3b91a6a3 in qt5/qtbase

This is a backport of this commit + additional manual replacements in
header files. There are still some 'register' uses inside implementation files left,
but headers are all 'register'-free now.

Change-Id: I7225381df1f093073583d62fa86f7bd7cca869c7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoFix Flickable mouse grab issue.
Robert Griebl [Thu, 31 Jul 2014 13:12:45 +0000 (15:12 +0200)]
Fix Flickable mouse grab issue.

This issue cannot be reproduced on the desktop with a mouse (at least I
could not).  It can however reliably be reproduced on iMX6 embedded hardware
with a touch-screen.  It seems like the TS driver is reporting mouse events
with a much more coarse granularity than the USB mouse driver, which in turn
triggers this bug.
(Qt5's quick1 and 2 both have the same issue)

Change-Id: Id151e3847bc8d77c7b405b9c4d4d5747a6e33ed0
Task-number: QTBUG-27185
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
8 years agoAdd handling of value-type lists to QDeclarativeExpression::evaluate()
Robert Griebl [Wed, 30 Jul 2014 17:00:26 +0000 (19:00 +0200)]
Add handling of value-type lists to QDeclarativeExpression::evaluate()

QDeclarativeExpression::evaluate() converts all arrays to QList<QObject *>,
even if the items cannot be represented by a QObject *. In case of a
string-list, a QList of null-pointers is returned (which isn't very helpful).
This patch makes evaluate() convert arrays, which contain ONLY value-type
items, into a plain QVariantList.

Change-Id: I4e5052af9fb296a4b692df7840bdd188298f7416
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
8 years agoFix at lot of QT_NO_ define guards for very tiny Qt builds.
Robert Griebl [Thu, 31 Jul 2014 13:10:37 +0000 (15:10 +0200)]
Fix at lot of QT_NO_ define guards for very tiny Qt builds.

Change-Id: If33639be245a1ad3782e1fde279371f330a988be
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
8 years agoFix compilation warnings due to superfluous commas at the end of enums.
Robert Griebl [Thu, 31 Jul 2014 13:29:39 +0000 (15:29 +0200)]
Fix compilation warnings due to superfluous commas at the end of enums.

Change-Id: Ibc05eec8a109d68cfa2caa64ea069d77c456c41e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
8 years agoqmlplugindumper: do not pop up a window if an assert is triggered
Fawzi Mohamed [Wed, 30 Jul 2014 13:42:58 +0000 (15:42 +0200)]
qmlplugindumper: do not pop up a window if an assert is triggered

On windows the debug version of qmlplugindumper used to show a panel on
assert failure. Failure should be silent.

Done-with: Thomas Hartmann <thomas.hartmann@digia.com>
Task-number: QTCREATORBUG-12644
Change-Id: I568f27e7d848aeafbffa059599f33b1b7ce0d2b9
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
8 years agoDon't convert signed to unsigned when we need all 32bit
Allan Sandfeld Jensen [Wed, 30 Jul 2014 08:47:03 +0000 (10:47 +0200)]
Don't convert signed to unsigned when we need all 32bit

The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit
were incorrectly assigning an unsigned value to a signed variable, which
broke their support of images with dimensions from 32384 to 65535.
Images with dimensions higher than that are already using another code-

Backported from change 0afc80c9225ca9630f627fe1aea3d4fd7f958082 in qtbase

Task-number: QTBUG-40297
Change-Id: Ib55f7f9294f03a2f81206130e665af452f8cd085
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
8 years agoqwidget_win.cpp: Initialize WINDOWPLACEMENT correctly.
Friedemann Kleint [Mon, 28 Jul 2014 13:16:34 +0000 (15:16 +0200)]
qwidget_win.cpp: Initialize WINDOWPLACEMENT correctly.

Task-number: QTBUG-40466
Change-Id: I93ff7977d68d36bc89f98d6a43c103a2a8d730f7
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
8 years agoFix compilation of QWinInputContext with Q_IME_DEBUG defined.
Friedemann Kleint [Fri, 25 Jul 2014 15:30:25 +0000 (17:30 +0200)]
Fix compilation of QWinInputContext with Q_IME_DEBUG defined.

Change-Id: I4f96b8ff57957e3cc370e5b1f37a036a619ce3f9
Task-number: QTBUG-40402
Reviewed-by: Liang Qi <liang.qi@digia.com>
8 years agoFix crashes in QtHelp when too many connections are made
Robert Loehning [Thu, 24 Jul 2014 14:16:08 +0000 (16:16 +0200)]
Fix crashes in QtHelp when too many connections are made

Backported from change 6481e28ba0d696cf41a2a5bc32b01db85f95b333 in qtbase

Task-number: QTBUG-36480
Change-Id: I3625d57a2f7b7b2f763a4cb92f19025b0401c593
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
8 years agoMove the C++11 support macros to a central place.
Raphael Kubo da Costa [Sun, 13 Jul 2014 20:15:00 +0000 (23:15 +0300)]
Move the C++11 support macros to a central place.

The main objective of this commit is to make C++11 support work with
clang: so far, the Q_COMPILER_* definitions related to C++11 were
enabled based on __GNUC__ and __GNUC_MINOR__; while clang does define
those two, __GNUC_MINOR__ is hardcoded at "2" and thus none of the
macros end up being defined.

We now make qglobal.h more similar to how qtbase's qcompilerdetection.h
works by separating the detection of the C++11 features supported by a
compiler from the detection of the compilers themselves.

It is important to note the list of macros has not changed, the macros
have only been moved.

This commit either follows the spirit of or is a cherry-pick of the
following qtbase ones:
4131c323a36ee8680a3b4d66a2a03a00544751c2 (Update the C++11 support
8dd66f42e834320c4ba0a6f2e45855d591b3b6e7 (Avoid undefined macro
  warning for __GXX_EXPERIMENTAL_CXX0X__)
fe5d5fdaf1d9b7d108727d290e24a6b0f00139c6 (clang: Use __has_feature()
  to detect C++11 features)
0ec953c93688ec0de74cda43b91f66f4cf879e5f (Remove extra Q_COMPILER_xxx
  defines from the MSVC section)
163dcf2b71f34a12137f200e4af5640e42e5f5e2 (Fix build with older Clang
  versions without __has_extension)
53262b9b5b9cb536916f6d6e086a944cb17bb8d8 (Only define the MSVC C++11
  feature macros in C++)

Change-Id: I2ca35af1a23260a9373943f97a8a72db3fc670e4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agogenerate QGL header file from qgl.h
Liang Qi [Fri, 18 Jul 2014 12:35:09 +0000 (14:35 +0200)]
generate QGL header file from qgl.h

Task-number: QTBUG-16838
(backported from qtbase commit 8b8eebd8a41bd91aeb5b55b702a4dbc7a8db5752)
Change-Id: I4e79404fc8203c55bdbd09c6ae9c6c7cefa915b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoQSslCertificate: blacklist NIC certificates from India
Peter Hartmann [Wed, 9 Jul 2014 14:22:44 +0000 (16:22 +0200)]
QSslCertificate: blacklist NIC certificates from India

Those intermediate certificates were used to issue "unauthorized"
certificates according to
, and are by default trusted on Windows, so to be safe we blacklist
them here.

(backport of commit 916c9d469bd0df227dc3be97fcca27e3cf58144f)
Change-Id: I22c6637895dcd21b1f7af73fdd5ca39d4747cf9e
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoMac: Fix mixing unified and non-unified toolbars
David Garcia [Wed, 5 Feb 2014 17:49:11 +0000 (18:49 +0100)]
Mac: Fix mixing unified and non-unified toolbars

Test if the target toolbar is actually a unified
toolbar before calling the special MapFromParent

This change is not needed in Qt 5.

Task-number: QTBUG-36100
Change-Id: I37fce89c79f5fce057e0b31d4c4f2e72269cdb06
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agonetwork internals: do not try to cache a deleted entry
Peter Hartmann [Tue, 17 Jun 2014 11:26:14 +0000 (13:26 +0200)]
network internals: do not try to cache a deleted entry

We were keeping a dangling pointer to a non-existent QIODevice around
which would lead to a crash.

This is not reproducible in Qt5 anymore.

Task-number: QTBUG-17400
Change-Id: I19af701a42e48c05d04dec18eca9f1bfc7e1f4bb
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agofix compilation errors with OS X 10.7 SDK or later for the Carbon flavor
Ashish Kulkarni [Tue, 27 May 2014 14:43:00 +0000 (20:13 +0530)]
fix compilation errors with OS X 10.7 SDK or later for the Carbon flavor

Some deprecated functions have been removed from the the 10.7 SDK, but
the symbols are still exported by the 32-bit libraries.

Change-Id: I5e7843db02f9fdb6288425ce32574b43087958ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agoUse correct values for MAC_OS_X_VERSION_10_* defines.
Jake Petroules [Mon, 2 Jun 2014 22:12:06 +0000 (18:12 -0400)]
Use correct values for MAC_OS_X_VERSION_10_* defines.

Change-Id: I1951fd6447a3d9d20feea99408174d4993a81f5c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoProperly escape bytearray data outside the ascii range when using a codec
Lars Knoll [Wed, 4 Jun 2014 11:52:37 +0000 (13:52 +0200)]
Properly escape bytearray data outside the ascii range when using a codec

Some codecs can't handle the range outside ascii properly and would then
fail to read the data back in correctly.

Backport of change 7df8b1ada4b23acedda5724b492c26a8e322648b from Qt 5.

Task-number: QTBUG-15543
Change-Id: I4c02921e787a939eeec0c7a11603b5896d756aef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoWindows: Added Comma to list of possible numpad keys
Oliver Wolff [Thu, 5 Jun 2014 09:56:01 +0000 (11:56 +0200)]
Windows: Added Comma to list of possible numpad keys

Some keyboard layouts (German and Czech for example) have comma instead
of period on the numpad, so this key should also be considered when
setting the Qt::KeypadModifer state.

Task-number: QTBUG-38248
Change-Id: I06847a02a9334c21784790eae6fd7e1bc6de4099
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from commit 7e44e4bb4e23758be7c05261e0413365491c6846)

8 years agoCleanlooks style: Fix floating point exception
Alexandre Rostovtsev [Wed, 28 May 2014 04:22:55 +0000 (00:22 -0400)]
Cleanlooks style: Fix floating point exception

In QCleanlooksStyle::drawControl, if indeterminate == true and
rect.width() == 4, we will end up with slideWidth of zero, and
take a mod by zero when calculating the value of step.

This causes a crash in Quassel 0.10; see

Instead, calculate slideWidth based on max(width, minWidth) where
minWidth was already set as 4, ensuring that slideWidth >= 2.

Change-Id: I6678789105e359fa26c99409f449cad0ba3bd0ae
(cherry picked from qtstyleplugins/8ff2ac6035fb1d01f5c0054ba14afb949410e3a7)
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
8 years agoUpdate for OS X Yosemite.
Jake Petroules [Fri, 30 May 2014 22:08:36 +0000 (18:08 -0400)]
Update for OS X Yosemite.

(Qt 4 equivalent of qtbase/203ce7c5ce36f300750607b74b2d2429be2d4959)
Change-Id: Icce8517d02dc70b545cf68a265e28083018b3225
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoFix trailing whitespace.
Jake Petroules [Fri, 6 Jun 2014 00:03:22 +0000 (20:03 -0400)]
Fix trailing whitespace.

Change-Id: Iab22897d7c766202d214b04d422e56becb544e40
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoQClipboard Windows debugging: fix compilation with VS2005.
Samuel Gaist [Sun, 1 Jun 2014 22:03:13 +0000 (00:03 +0200)]
QClipboard Windows debugging: fix compilation with VS2005.

This patch based on Qt Creator allows Qt 4 to be built using VS2005

[ChangeLog][Windows] Fixes build with MSVC 2005

Task-number: QTBUG-39133
Change-Id: I413beb063b5d1f458cfa26f54f6bbd2de9240380
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
8 years agoDoc: be more explicit about need to set expected SSL cert in errors
Arnaud Bienner [Tue, 13 May 2014 18:19:12 +0000 (20:19 +0200)]
Doc: be more explicit about need to set expected SSL cert in errors

Note added in QNetworkReply and QSslSocket documentation.

Task-number: QTBUG-16770
Change-Id: I2dd8cfb913ec29a96b5465a905cd213713b8d537
Reviewed-by: Richard J. Moore <rich@kde.org>
(cherry picked from qtbase/34590e84d4aaceb5874d8acb6a2b7a95c153cd6a)

8 years agoFix QSysInfo::macVersion for OS X minor versions greater than 9.
Jake Petroules [Fri, 30 May 2014 22:10:53 +0000 (18:10 -0400)]
Fix QSysInfo::macVersion for OS X minor versions greater than 9.

gestaltSystemVersion's encoding only has room for a single version
digit. Thus, OS X 10.10 would previously have been detected as OS X 10.9
(Apple's comments in the header even warn against this).

(backported from qtbase/42f9a61608fe662e797dc6541f4e82c19b878d56)
Change-Id: I329355135e82d0e57d9b70a93a62a5f086aa0955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoFix raster graphics on X11 RGB30
Allan Sandfeld Jensen [Mon, 26 May 2014 07:25:42 +0000 (09:25 +0200)]
Fix raster graphics on X11 RGB30

The window surface incorrectly assumes that any pixel depth of 24 or
above would be on 8bit/color. This breaks 10bit/color formats like
RGB30. This patch instead make it specifically check for color depth 24
or 32 which are the two with 8bit/color.

Task-number: QTBUG-25998
Change-Id: Id0b7e07bdb64679f8c647158938da12efede9142
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agofix WINVER #ifdef for QS_TOUCH and QS_POINTER
Joerg Bornemann [Thu, 15 May 2014 10:14:54 +0000 (12:14 +0200)]
fix WINVER #ifdef for QS_TOUCH and QS_POINTER

The condition in WinUser.h is _WIN32_WINNT >= 0x0602.
This change is a backport of

Change-Id: I0725e65948528889623a0b0ff290745996a8b0a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoTslib plugin: also apply missing release coordinate code to non-raw mode
Rolf Eike Beer [Thu, 6 Mar 2014 10:10:44 +0000 (11:10 +0100)]
Tslib plugin: also apply missing release coordinate code to non-raw mode

Even if the normal mode is used the release events may have zero coordinates.

Change-Id: I2eac8cf50dfcf9e62d8cec2423419a6579266849
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtbase/9ba7cc07dbef542bc73f97f1d7458699d25fbb8d)

9 years agoTslib QWS: also apply missing release coordinate code to non-raw mode
Rolf Eike Beer [Thu, 15 May 2014 11:51:18 +0000 (13:51 +0200)]
Tslib QWS: also apply missing release coordinate code to non-raw mode

Even if the normal mode is used the release events may have zero coordinates.

Change-Id: Ia9de05928ab5dfc225665e3b2c9a4d42f6ba984e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoMemory and file descriptor leak in QFontCache
Simon Yuan [Wed, 2 Apr 2014 03:02:04 +0000 (16:02 +1300)]
Memory and file descriptor leak in QFontCache

Make the cache also use the ref counts
Make everyone who decrements a ref count check for 0 and delete
Move all cache logic to the cache
Same idea as 36cb3f3 and b3dae68 in Qt 5 without the extra stuff

Task-number: QTBUG-38035
Change-Id: I27bea376f4ec0888463b4ec3ed1a6bef00d041f8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agoRestore dirty line logic in RenderInline::destroy
Ashish Kulkarni [Fri, 20 Dec 2013 08:29:43 +0000 (13:59 +0530)]
Restore dirty line logic in RenderInline::destroy

In ea0cb7ad2066d9c3dc695ab2ebe724249b05ca0f the webkit version was
upgraded which effectively merged http://trac.webkit.org/changeset/85869
The follow up patch was never merged: http://trac.webkit.org/changeset/86060
associated with ​https://bugs.webkit.org/show_bug.cgi?id=60448

Change-Id: I7dff1733439bb3bcfecc767da9147aa09a3159cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
9 years agoFix detection of newer MinGW toolchains in configure.exe
Kai Koehne [Mon, 5 May 2014 10:03:42 +0000 (12:03 +0200)]
Fix detection of newer MinGW toolchains in configure.exe

This fixes a regression in the new MinGW packages that are now built
with mkspec win32-g++-4.6: Since we failed to detect this as a MinGW
mkspec we missed to check for headers in all relevant paths, which
disabled windowsxp, windosvista styles by default.

This commit does not apply to Qt 5, similar issues there are being
fixed independently.

[ChangeLog][Windows] configure.exe now detects newer MinGW versions
correctly, enabling windowsxp and windowsvista styles by default.

Task-number: QTBUG-38706
Change-Id: Ib4e7af69e8040aaa28940f501cce5572588d4378
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoWindows: Add missing colors to tooltip palette.
Friedemann Kleint [Wed, 16 Apr 2014 13:46:08 +0000 (15:46 +0200)]
Windows: Add missing colors to tooltip palette.

Task-number: QTBUG-38183
Change-Id: Ic3581cc87c0d61140624ddaf6fa85d682120ad4f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
(cherry picked from qtbase/9fc0c5466238eb8f43d2736d298ac36c65da529e)

9 years agoFix tst_QStyleSheetStyle::toolTip().
Friedemann Kleint [Tue, 6 May 2014 15:16:38 +0000 (17:16 +0200)]
Fix tst_QStyleSheetStyle::toolTip().

Use the correct palette and enforce plain Windows style to prevent
the Vista style from clobbering the tooltip palette in polish().

Task-number: QTBUG-38183
Change-Id: Id19d548f818d801c4914a343e08207195c343888
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
(cherry picked from qtbase/7a2547164d207119468abbfa4c0eb594948bb608)

9 years agoFix visual index lookup in QTreeViewPrivate::adjustViewOptionsForIndex().
Friedemann Kleint [Mon, 5 May 2014 08:59:56 +0000 (10:59 +0200)]
Fix visual index lookup in QTreeViewPrivate::adjustViewOptionsForIndex().

Determine the visual index by looking up the column of the QModelIndex
in the logicalIndices array instead of looping.

Task-number: QTBUG-37813
Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from qtbase/85aef2dd4b059d2ba9cba4605d9fef87f3e2c4fc)

9 years agoFix MacOS build with SDK 10.7, XCode 4.3 and above
Wolfgang Bremer [Tue, 22 Apr 2014 12:16:02 +0000 (14:16 +0200)]
Fix MacOS build with SDK 10.7, XCode 4.3 and above

A hardcoded path condition failed and thus the dependency CoreWLAN
was not added. This caused missing symbols.

This patch is not necessary for Qt5 as only SDKs 10.6+ are supported.

Task-number: QTBUG-24361
Change-Id: I273a2be8d2bd7c72e8d7a1eed7c3e62a380e237a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
9 years agoDon't crash on broken GIF images
Lars Knoll [Thu, 24 Apr 2014 13:33:27 +0000 (15:33 +0200)]
Don't crash on broken GIF images

Broken GIF images could set invalid width and height
values inside the image, leading to Qt creating a null
QImage for it. In that case we need to abort decoding
the image and return an error.

Initial patch by Rich Moore.

Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5

Task-number: QTBUG-38367
Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
Security-advisory: CVE-2014-0190
Reviewed-by: Richard J. Moore <rich@kde.org>
9 years agoQMdiArea: Ignore events of other instances in the event filter.
Friedemann Kleint [Mon, 5 May 2014 12:11:30 +0000 (14:11 +0200)]
QMdiArea: Ignore events of other instances in the event filter.

This caused for example the variable QMdiAreaPrivate::isSubWindowsTiled
being cleared from another instance, which resulted in odd
resizing behavior.

Task-number: QTBUG-31448
Change-Id: I880f7e415d6654e52499df1bfaf99f2c55d86320
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtbase/9e2c4bc67f30eb1e8d776afe3a092d5994aaab38)

9 years agoDon't use QAbstractButton::pixmap() as this will always return 0.
Andy Shaw [Fri, 11 Apr 2014 19:46:37 +0000 (21:46 +0200)]
Don't use QAbstractButton::pixmap() as this will always return 0.

Instead of using pixmap() we use icon() instead which is what the
extension menu is after in this case.

Task-number: QTBUG-38301
Change-Id: I2c238b50b0fcf04318100d2d6d39f563ef3eff5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoPolish the image gestures example.
Friedemann Kleint [Thu, 27 Mar 2014 08:57:59 +0000 (09:57 +0100)]
Polish the image gestures example.

- Add command line parsing to properly evaluate help option and
  directory argument, add options to disable gestures.
- Add verbose option so that the user can actually see what is
- Scale large images.
- Use qreal instead of float.
- Minor polishing: set window title, position file dialog at
  pictures location.

Task-number: QTBUG-37759
Task-number: QTBUG-37203
Change-Id: Ibaf54a13034b150386a8aee476f83a9eba298298
Reviewed-by: Indrajit Tapadar <indrajit.tapadar@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
(cherry picked from qtbase/c0701f3789acf3234e9f6431b4e8c7dc3ccefabb)
Reviewed-by: Marko Kangas <marko.kangas@digia.com>
9 years agoUse WINVER instead of _MSC_VER for version check in qeventdispatcher_win.cpp.
Joerg Bornemann [Mon, 7 Apr 2014 08:42:48 +0000 (10:42 +0200)]
Use WINVER instead of _MSC_VER for version check in qeventdispatcher_win.cpp.

Task-number: QTBUG-38604
Change-Id: Idb8a8219e09c6aa1a1b24e45b9da640c8d4b7161
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from qtbase/e30ae1268f8e224369ff7841b90184c8694a86e7)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
9 years agoFix - psql driver must format qdatetime using iso
Cristian Tarsoaga [Thu, 1 May 2014 20:25:33 +0000 (23:25 +0300)]
Fix - psql driver must format qdatetime using iso

QDatetTime must be formatted as ISO8601 specifies, date/month must be padded with 0 until width is 2

Change-Id: I2db10e4b0f55a2666b2a12d7d8fcd03f13b96875
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agofix include of private header
Mark Brand [Wed, 30 Apr 2014 21:17:58 +0000 (23:17 +0200)]
fix include of private header

Change-Id: I0554933de2536231d7d416d8df5b96eaa459fc51
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
9 years agoRefactor OS X bundle detection for QFileInfo
Samuel Gaist [Fri, 2 May 2014 07:26:25 +0000 (09:26 +0200)]
Refactor OS X bundle detection for QFileInfo

CFBundleGetPackageInfoInDirectory originally used tests for the presence
of information that are not mandatory in a bundle.
Following Apple's documentation, the new approach is to use
Uniform Type Identifier which queries the OS directly to check whether
the extension conforms to kUTTypeBundle. That includes e.g.
applications, frameworks etc.

Then it tries to determine if the bundle can be opened with an
application that is not Finder.

Last thing, it checks whether the package bit is set.

(cherry picked from qtbase/72d60ea08c14037250459a5424ffee7a36b909b1)
(cherry picked from qtbase/bcfc68f9cd00982decd7ceb312966caf6b1ca05e)
(cherry picked from qtbase/afacf694d5a6f34b88989e76971d70d700ce4949)
Task-number: QTBUG-31884
Change-Id: I4ce3d8b90d116960b2044d3fafe3f745f6141416
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoUpdated changes-4.8.6 file
aksalova [Wed, 16 Apr 2014 14:53:57 +0000 (17:53 +0300)]
Updated changes-4.8.6 file

Change-Id: Ia758818a9fcb716baeaf37c0fc37cb79c7974cf5
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
9 years agoVista Style: More menu item pixel fixes for QtQuick Controls
Gabriel de Dietrich [Wed, 12 Mar 2014 16:49:50 +0000 (17:49 +0100)]
Vista Style: More menu item pixel fixes for QtQuick Controls

Includes a one-pixel fix for widgets, where the menu item text
would be one pixel too far away from the vertical gutter.

Task-number: QTBUG-37451
Task-number: QTBUG-38376
Change-Id: I2539233814a427c5bed66a5c07584717eb3df418
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
(cherry picked from qtbase/9cd2dac348f45c4b93f74f8ebe20d7528821f003)

9 years agoFix building of JSC with libc++.
Raphael Kubo da Costa [Fri, 18 Apr 2014 17:37:49 +0000 (20:37 +0300)]
Fix building of JSC with libc++.

Follow-up to 0de22e8 and 427d50d: the former was not just a cleanup
commit, and part of the changes reverted in the latter actually broke
the build with libc++ again: clang defines __GNUC__ for compatibility
with GCC, but if libc++ is used ext/atomicity.h does not exist.

Change-Id: Id86646d38b7bc62dbe0731f8f32efb2353335210
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
9 years agoQNX: Fix QDir::entryInfoList()
Bernd Weimer [Tue, 15 Apr 2014 11:44:05 +0000 (13:44 +0200)]
QNX: Fix QDir::entryInfoList()

If D_FLAG_FILTER is set, duplicate name entries are filtered out, so
this flag has to be set along with D_FLAG_STAT in the call to dircntl.

Also releaved dependencies between defines__EXT_QNX__READDIR_R,

Back-ported from qtbase: aee59f06e0017e225363d4207d3d96c2b30698e1

Change-Id: Ifa2148cc49544076fcfe8fb88e2a0dfe2404959e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
9 years agoFix compilation using MinGW 64 due to missing __cpuid
Allen Winter [Wed, 9 Apr 2014 21:36:52 +0000 (17:36 -0400)]
Fix compilation using MinGW 64 due to missing __cpuid

Compile fails on Windows 64 using MinGW with the error message:
'__cpuid' was not declared in this scope.

fix by moving the Q_CC_GNU block above the WIN64 block
as suggested by Thiago in the QTBUG-34022 comments.

Task-number: QTBUG-34022
Change-Id: Iced4ac0b64f8ba986e49543ff3793ae8c0c33d14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoQDbus: Fix (!a == b) comparison
David Faure [Sat, 12 Apr 2014 09:25:28 +0000 (11:25 +0200)]
QDbus: Fix (!a == b) comparison

! binds to a, and that is wrong here.

(cherry picked from qtbase/4b7cd57719a637189696d673b014ae785df669bf)

Change-Id: I75542a0c27f39fb6e684dedd9925a1f3748d4919
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
9 years agoFix compilation of QtWebKit with MSVC 2013
Ashish Kulkarni [Sat, 12 Apr 2014 15:20:43 +0000 (20:50 +0530)]
Fix compilation of QtWebKit with MSVC 2013

Starting with MSVC 2013, more functions are provided.

Task-number: QTBUG-34705
Change-Id: I85e35a2486e0bd556f5f16e5911cca5c364273ed
(adapted from commit qtscript/24d678ce9c3996f46d1069c2b1193e7ec1083fc8)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
9 years agoFix compilation of QtWebKit with MSVC 2012/2013
Ashish Kulkarni [Sat, 12 Apr 2014 16:59:14 +0000 (22:29 +0530)]
Fix compilation of QtWebKit with MSVC 2012/2013

For some reason, MSVC 2012/2013 is no longer able to infer the
need for both a call to a constructor and a cast of its parameter
so we have to give a hint for at least one of these two operations.

Task-number: QTBUG-31882
Change-Id: I42b54313ec4f6a83cde28326534c59b93ab3f615
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoOS X: Make Qt application react on applicationShouldHandleReopen
Samuel Gaist [Wed, 16 Apr 2014 06:16:04 +0000 (08:16 +0200)]
OS X: Make Qt application react on applicationShouldHandleReopen

Currently a click on e.g. the dock icon is not propagated to the
application so if for example the main widget is hidden, it doesn't come
back. This patch fixes it

Task-number: QTBUG-10899

[ChangeLog][QtGui][OS X] Fixes a bug where clicking on the dock icon
would not be propagated to the application

Change-Id: Ia02ca23ed0dafbd337d1d7d9bc5f7efe3843b512
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
9 years agoincrease timeouts to make tst_macgui autotest more stable
Ashish Kulkarni [Thu, 17 Apr 2014 10:57:35 +0000 (16:27 +0530)]
increase timeouts to make tst_macgui autotest more stable

Task-number: QTBUG-20984
Task-number: QTBUG-26372
Change-Id: I03e31e0e8c6428767cca91a8be6778ed08a2d783
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
9 years agoImprove handling of temporary directories in SQL tests.
Friedemann Kleint [Wed, 2 Apr 2014 12:08:29 +0000 (14:08 +0200)]
Improve handling of temporary directories in SQL tests.

Initialize directory delayed in shared code and add checks to verify
that it is valid. Close attached / cloned databases to prevent locks
on files and leaking temporary directories caused by SQLite:

QTemporaryDir: Unable to remove "...\Temp\tst_qsqldatabase-P1XkOA" most likely due to the presence of read-only files.
QTemporaryDir: Unable to remove "...\Temp\tst_qsqltablemodel-P1XkOA" most likely due to the presence of read-only files.
QWARN  : tst_QSql::concurrentAccess() QTemporaryDir: Unable to remove "...\Temp\tst_qsql-l0VAKJ" most likely due to the presence of read-only files.

In Qt 4, emulate the temporary directory by maintaining
a list of files and deleting them in reverse order.

Change-Id: If85bbaed04bb1a32e427d642be332996d967f796
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/9a4beb4d36dc0c613e59aa5d88060d521462f56c)

9 years agoFix crash when deleting top level windows embedded into QGraphicsProxyWidget.
Friedemann Kleint [Mon, 14 Apr 2014 15:02:42 +0000 (17:02 +0200)]
Fix crash when deleting top level windows embedded into QGraphicsProxyWidget.

Clear proxyWidget pointer in slot

Task-number: QTBUG-29684
Task-number: QTBUG-33213
Change-Id: Ibdbd52aa810ca908e3d98daa00954345e7a93a48
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
(cherry picked from qtbase/ff2dbe609ef4482d66d1ecd135b4f53f6aff7e60)

9 years agoFix crash when trying to place toolbar into zero-height window.
Friedemann Kleint [Fri, 28 Mar 2014 14:55:31 +0000 (15:55 +0100)]
Fix crash when trying to place toolbar into zero-height window.

Change QToolBarAreaLayout::item() to return a pointer
and check return values in plug().

Task-number: QTBUG-37183
Change-Id: I7029eb9739cbe603460e87d3e5493f116bdb3a89
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
(cherry picked from qtbase/e38ad9455099a83e2a8619f19ca949bc64ae6f82)

9 years agovcxproj generator: append version suffix only to library targets
Joerg Bornemann [Thu, 3 Apr 2014 09:54:10 +0000 (11:54 +0200)]
vcxproj generator: append version suffix only to library targets

Task-number: QTBUG-38066
Change-Id: I2f1635f2cb34acb388c380fc2fc3fbe4df04bb03
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from commit qtbase/826ab028a8c24b115286d251938396ca1de71b56)

9 years agoFix access of tmpStorage in QODBCResult::exec().
Friedemann Kleint [Wed, 2 Apr 2014 08:37:59 +0000 (10:37 +0200)]
Fix access of tmpStorage in QODBCResult::exec().

Instead of using a list and appending / popping of elements, use
a vector of constant size and access via index to avoid
bookkeeping errors.

Task-number: QTBUG-37831

Change-Id: Icb5a182626c63e693b04daaf7a2f70997d9aeae1
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
(cherry picked from qtbase/d5ff16bc8ebf0f17fae3a28f08018db26567e81c)
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
9 years agoAvoid out of bounds memory reads when scaling images v4.8.6
Lars Knoll [Tue, 25 Mar 2014 14:55:34 +0000 (15:55 +0100)]
Avoid out of bounds memory reads when scaling images

The calculation of the width/height required for the
scaling algorithm was prone to floating point rounding
issues, where the lower value got rounded down, the higher
one rounded up. This could lead to a situation where we
iterated over one more line/pixel in the line than we have
in the source image.

Correct this by passing the dimension of the source image into
the function and bounds checking the values before iterating.

Backport of If44b2235a479224660d508a0504fec40d724763a from Qt 5

Task-number: QTBUG-35927
Change-Id: If145ee715a143b889538243f45227d8d78a0050f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoDoc: Mention that MINGWM10.DLL only applies to MinGW 4.4
Kai Koehne [Tue, 1 Apr 2014 08:43:08 +0000 (10:43 +0200)]
Doc: Mention that MINGWM10.DLL only applies to MinGW 4.4

Mingw-builds based 4.8.2 has different files ...

Change-Id: I99659c4f6e46673c6077a890b744e355c5226d36
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
9 years agoFix link to Tier 2 mingw-builds version
Kai Koehne [Tue, 1 Apr 2014 08:26:26 +0000 (10:26 +0200)]
Fix link to Tier 2 mingw-builds version

We switched to rev3 in the binary packages to get in a gdb fix.

This change does not apply to Qt 5.

Change-Id: I0328c35671e84e3b592c99cf5ebe8d1cce1ea80f
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>