qt:qt.git
4 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>
4 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>
4 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>
4 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)

4 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
https://bugs.gentoo.org/show_bug.cgi?id=507124

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>
4 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>
4 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>
4 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>
4 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)

4 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>
4 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>
4 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
qtbase/e26ed09102e2eb350eb072decbd670b7d515be45

Change-Id: I0725e65948528889623a0b0ff290745996a8b0a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 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)

4 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>
4 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>
4 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>
4 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>
4 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)

4 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)

4 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)

4 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>
4 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>
4 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)

4 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>
4 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
  happening.
- 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>
4 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>
4 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
Task-number:QTBUG-33389

Change-Id: I2db10e4b0f55a2666b2a12d7d8fcd03f13b96875
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 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>
4 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>
4 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>
4 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)

4 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>
4 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,
__EXT_QNX__READDIR64_R and _POSIX_THREAD_SAFE_FUNCTIONS

Back-ported from qtbase: aee59f06e0017e225363d4207d3d96c2b30698e1

Change-Id: Ifa2148cc49544076fcfe8fb88e2a0dfe2404959e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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)

4 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
QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot().

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

4 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)

4 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)

4 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>
4 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>
4 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>
4 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>
4 years agoAssistant: Set the url on created QNetworkReply objects.
Stephen Kelly [Mon, 31 Mar 2014 12:14:08 +0000 (14:14 +0200)]
Assistant: Set the url on created QNetworkReply objects.

WebKit needs this as a base url in order to resolve links in css for
example. If index.html is at the location doc/, and it loads a css
stylesheet at href="_static/first.css", and first.css contains

 @import url("second.css")

Then second.css should be found in _static, relative to first.css.

That only works if WebKit knows the requested url of the loading
document, so make sure that is set on the reply object.

This is a backport of part of commit qttools/e38ee135f3cf74f413dc7a3e4a9f97a6b5d903bf

Task-number: QTCREATORBUG-8211
Change-Id: Ia92519ab37269a6d3f8bf0e4f8b348595f1f3d59
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoPass events to QGestureManager from the main (GUI) thread only.
Friedemann Kleint [Fri, 28 Mar 2014 11:45:00 +0000 (12:45 +0100)]
Pass events to QGestureManager from the main (GUI) thread only.

Task-number: QTBUG-20946

Change-Id: I964452c1e97bd3d3a521e33abeb2f7d8cdbc89a9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtbase/9b28ab3f38e21f2e1498dea5dd761d22d72fb1ac)

4 years agoprintsupport: set duplex setting correctly to CUPS printer
Teemu Katajisto [Thu, 10 May 2012 08:54:28 +0000 (11:54 +0300)]
printsupport: set duplex setting correctly to CUPS printer

If CUPS printer default is not DuplexNone then setting duplex
to None for printer did not have any effect on duplex setting.

(backported from qtbase/385e584926f2957d6e9ec4c2c4e89b37a5e0c80c)

Change-Id: Ia72f599a9e5fa511b3214c6b8016e21f40409b86
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoQPrintDialog OSX: don't crash if ApplicationModal and no parent
Shawn Rutledge [Tue, 23 Jul 2013 13:48:41 +0000 (15:48 +0200)]
QPrintDialog OSX: don't crash if ApplicationModal and no parent

Task-number: QTBUG-32464

(backported from  qtbase/03855decfcb4e05817424843564a4b66636bb347)

Change-Id: I12892798419b2efcf404f972930562d50d045ea3
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoQPrintDialog: document the modality on OS X and Windows
Shawn Rutledge [Tue, 23 Jul 2013 13:57:59 +0000 (15:57 +0200)]
QPrintDialog: document the modality on OS X and Windows

You can't programmatically close the dialog because it's modal.

Task-number: QTBUG-32464

(backported from qtbase/bd602a2dc4bc9491f80919b09a8990edb6fbee97)

Change-Id: Ib7573b347b3f10914e60af05f95ed9f5763eadd8
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoUpdated year in copyright header
Kai Koehne [Fri, 21 Mar 2014 09:40:04 +0000 (10:40 +0100)]
Updated year in copyright header

find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g'

Manually patched files:

demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h
demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp
src/3rdparty/s60/eiksoftkeyimage.h
tools/qdoc3/test/qt-project.qdocconf
tests/auto/qsharedpointer/nontracked.h
tests/auto/qsharedpointer/nontracked.cpp

Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoAdd AArch64 support to qfilesystemwatcher_inotify.cpp
Lisandro Damián Nicanor Pérez Meyer [Wed, 19 Mar 2014 14:49:14 +0000 (11:49 -0300)]
Add AArch64 support to qfilesystemwatcher_inotify.cpp

Based on a patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>,
licensed under CC0 (aka Public Domain) or BSD license.

Backported from qtbase, commit d5dcd6d16647e4ecac239fa26ade5963f0e3f933

Change-Id: I0d01a129c039250ac33dc5f984baec9595786211
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQPushButton: draw label using the stylesheet's font.
Mitch Curtis [Fri, 21 Mar 2014 08:34:47 +0000 (09:34 +0100)]
QPushButton: draw label using the stylesheet's font.

The RenderRule for the stylesheet has the correct font information, it
just wasn't being set on the painter that draws the label.

This is a backport of the Qt 5 commit:
9ad768fd1999780df18551151b9d9fa9c354131c.

Task-number: QTBUG-8990
Change-Id: I4857d6e17b62980782ca7bfdfd0a571a9950f635
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agorebuild configure.exe
Oswald Buddenhagen [Tue, 18 Mar 2014 10:29:41 +0000 (11:29 +0100)]
rebuild configure.exe

95f256d: Remove incorrect check for mingw 64 bit
51f77e9: Fix detection of mingw gcc >=4.6

Change-Id: I8e5a7ac1e8c76f346f58e44cf5b9eb781a1ac4c7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoQMenu: Sloppy menu selection should allow hovering separators
Gabriel de Dietrich [Tue, 18 Mar 2014 15:27:40 +0000 (16:27 +0100)]
QMenu: Sloppy menu selection should allow hovering separators

Setting the current action to 0 clears the sloppy region and
closes the submenu if we hover a separator on the way to the
submenu popup. Now, we choose not to while the sloppy delay
timer is running.

This is a backport of I9d1b1358fe64c259dc47f35db8fc8f2b19a73153
from qt/qtbase.

Task-number: QTBUG-20094
Change-Id: If4b3cff05a9bcb41cee3e49490d4cc5fc3595821
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQMenu: Enable sloppy submenu mouse navigation
Gabriel de Dietrich [Tue, 18 Mar 2014 11:56:10 +0000 (12:56 +0100)]
QMenu: Enable sloppy submenu mouse navigation

Since we're in the 21st century, we set QCommonStyle to return true
to the SH_Menu_SloppySubMenus style hint. This unlocks all the logic
already available in QMenu.

This is a backport of I134c87e348d98d1f46055e0bfef2b4a4a3d2993a
from qt/qtbase and includes some previous enhancements.

Task-number: QTBUG-20094
[ChangeLog][QtWidgets][QMenu] Enable sloppy submenu mouse navigation
Change-Id: If4141a3d849123850e40af92ac5aede9ed767bdf
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQMenuPrivate: Make sloppyDelayTimer non-static
Gabriel de Dietrich [Tue, 18 Mar 2014 11:50:23 +0000 (12:50 +0100)]
QMenuPrivate: Make sloppyDelayTimer non-static

Keeping the timer static would trigger warnings when enabling
SH_Menu_SloppySubMenus in QCommonStyle in a forthcoming patch.
This would happen if we opened a second level submenu quickly
enough and get the mouse event handler to reset the timer its
parent menu started.

This is a backport of Ia768603b40b219f87138c60a595c65ef408761ae
from qt/qtbase.

Change-Id: Ia7e9a94b3445d9362a60a36d5e4dda878ab0f7a5
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoStore changed status of the QAxWidget's "control" property correctly.
Friedemann Kleint [Tue, 18 Mar 2014 15:22:50 +0000 (16:22 +0100)]
Store changed status of the QAxWidget's "control" property correctly.

Handle the case of it being PropertySheetStringValue.

Task-number: QTBUG-37602

Change-Id: Iff54d6409ffabf48406fcfec96289848a42b3e55
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
(cherry picked from qttools/9ee8213c7becfdf906ca781df4895e18b273e023)

4 years agoFix QByteArray memory corruption in QIBaseDriver::open().
Friedemann Kleint [Tue, 18 Mar 2014 11:07:53 +0000 (12:07 +0100)]
Fix QByteArray memory corruption in QIBaseDriver::open().

Rewrite code to use QByteArray::reserve(), QByteArray::append()
instead of memcpy().

Task-number: QTBUG-37508
Change-Id: I16ead153f33fa5a34bc01ee27ae4cd1b8993b65e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
(cherry picked from qtbase/0d50efeae9829336ffb7e47692cfdc649e10ee70)

4 years agoBlackBerry: Improve platform specific documentation
Bernd Weimer [Mon, 17 Mar 2014 09:13:40 +0000 (10:13 +0100)]
BlackBerry: Improve platform specific documentation

Updated BlackBerry specific documentation around QSettings to make the
differences more obvious for developers.

Back-ported from qtbase: 563342d7ef7e490239cba6d335849ebb91983b9a

Change-Id: I603053cecff97f3222257cbba8d72d2ec2666d6f
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoUse QCOMPARE instead of QVERIFY where applicable
Frederik Gladhorn [Tue, 11 Mar 2014 13:31:23 +0000 (14:31 +0100)]
Use QCOMPARE instead of QVERIFY where applicable

Change-Id: I39dc7eac6d9478797adf55a69b829578f4adc5eb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoBasic AArch64 (aka arm64) detection.
Lisandro Damián Nicanor Pérez Meyer [Sat, 15 Mar 2014 17:47:55 +0000 (14:47 -0300)]
Basic AArch64 (aka arm64) detection.

Patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
licensed under either Public Domain or BSD:

<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#179>

Change-Id: I9f415cb6ac6c4ff78588d96e36198c85ee202d96
Reviewed-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQWindowsXP/VistaStyle: Fix detection of item view delegate line edits.
Friedemann Kleint [Thu, 13 Mar 2014 13:10:09 +0000 (14:10 +0100)]
QWindowsXP/VistaStyle: Fix detection of item view delegate line edits.

The old code tried to check the 2nd parent for inheritance from
QAbstractItemView. This also triggers for line edits on a QDialog parented
on the item view. Introduce convenience function that checks for
top levels in the chain.

Task-number: QTBUG-37504

Change-Id: I932f8efdb4764e9b1eea84c802bf7e8718338e1d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
(cherry picked from qtbase/176342e70a1ba7864a5b5dac14d12d4091ef5bd9)

4 years agonetwork: fix doc typo in QNetworkConfigurationManager
Peter Hartmann [Mon, 24 Feb 2014 16:09:24 +0000 (17:09 +0100)]
network: fix doc typo in QNetworkConfigurationManager

(cherry picked from commit 32794abe722161e1224920865c77c37d74ab977b)

Change-Id: Icc66ac3fef52508abda85bafe225fc93f4eb9d4c
Reviewed-by: Richard J. Moore <rich@kde.org>
4 years agoRemove -fuse-ld=gold from webkit's LFLAGS
Niels Ole Salscheider [Sat, 1 Mar 2014 21:26:54 +0000 (22:26 +0100)]
Remove -fuse-ld=gold from webkit's LFLAGS

This flag is not supported by upstream gcc. Thus the build might fail if the
gold linker is found.

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

Change-Id: I931081fccf64a43b32f2aaf2c3ad377391fdad4c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoWindows: Restore maximized/full screen widgets to correct screen.
Friedemann Kleint [Fri, 7 Feb 2014 09:27:56 +0000 (10:27 +0100)]
Windows: Restore maximized/full screen widgets to correct screen.

Partially revert 54865d47cfd859a0e84ba8e1bbff3b56c93d4e0d and
bring back parts from abba37cd0eff959edf2d011842cbf2b36cce8467 which
failed some tests on other platforms and never made it in.

Avoid setting a geometry on maximized windows since that leaves
them in a broken state. Instead, if there is a need to restore
maximized windows to a different screen, clear the maximized flag
before applying the geometry.

[ChangeLog][QWidget][Windows] QWidget::restoreGeometry() now restores
maximized/full screen widgets to the correct screen.

Task-number: QTBUG-21371
Task-number: QTBUG-4397

Change-Id: Ibd5b736e921f20d4b7365c06c6f9c5dd4469c781
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtbase/ae4243df1e53b0aaeada708f6fa7979a0f0d216a)

4 years agoFix a crash when reparenting widgets on Windows.
Friedemann Kleint [Mon, 10 Mar 2014 08:10:21 +0000 (09:10 +0100)]
Fix a crash when reparenting widgets on Windows.

Introduced by a9edbeddafe5d8866192de44f4028d07bd93013a .

Task-number: QTBUG-37346
Task-number: QTBUG-30276

Change-Id: I81e218839db50a88a8b149dd5481bfd0835284da
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoFix recursive calling of QScriptProgram
Lars Knoll [Tue, 11 Mar 2014 08:18:17 +0000 (09:18 +0100)]
Fix recursive calling of QScriptProgram

The first time a QScriptProgram is evaluated, it gets compiled and
then executed. If the execution would somehow trigger another
evaluation of the script program, it would run into the compile
stage again (even though it already was compiled), and then trigger
and assertion in debug mode (or leak memory in release builds).

Backport of 08d9ef715265d33f4cf04693b0787fd75994dc42 from Qt 5.

Task-number: QTBUG-37317
Change-Id: I83e7efd5f238d021e200258826e2e4a9520c3a7d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agodo not use fileno calls in forked child
Joerg Bornemann [Thu, 6 Mar 2014 22:53:38 +0000 (23:53 +0100)]
do not use fileno calls in forked child

This fixes an issue that causes QProcess::start to silently fail on
OS X 10.9. Apparently, fileno(stdout) locks the handle on OS X 10.9.
It may happen that the parent process fflush()s stdout while the child
has just been forked. The stdout lock of the parent is never released
in the child and fileno(stdout) therefore locks forever.

According to the fork documentation on opengroup.org one may only call
async-signal-safe functions between fork and exec in the child. The
fileno() function does not appear in the list of async-signal-safe
functions. Also, fileno(stdout) and friends can be easily replaced by
the standard constants STDOUT_FILENO etc.

Done-with: Fawzi Mohamed <fawzi.mohamed@digia.com>
Task-number: QTBUG-37306

Change-Id: I2b1f5f47cc48a1ad020fb0493a955d2bc27aeb47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from qtbase/b2216bbe06b8be2bef6d8bc2ffff1337f6d23358)

4 years agoAdd AArch64 detection support to JavaScriptCore.
Dmitry Shachnev [Sat, 1 Mar 2014 09:13:27 +0000 (13:13 +0400)]
Add AArch64 detection support to JavaScriptCore.

Cherry-picked from qtscript commit 2e049836ee16f4aedbe7ccc3335fc5.

Change-Id: I8d9fdeceb62f4de4eb9bd74ae45bb33a641ef5cc
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoDoc: Update, and reduce duplication of, QThread-related info
Sze Howe Koh [Tue, 25 Feb 2014 08:23:48 +0000 (09:23 +0100)]
Doc: Update, and reduce duplication of, QThread-related info

Added/Changed:
- Move content from the Thread Basics overview to the QThread class ref
- Rephrase bits for clarity
- Use more links

Removed:
- (threads-basics.qdoc) Warning against moveToThread(this): This usage
  came about when people tried to add slots to a QThread subclass. This
  patch adds a warning against the root cause.
- (threads-basics.qdoc) The strategy for managing member variables:
  Sounds error-prone. Pushing results through signals is safer.
- (qthread.cpp) The note about GUI classes: Irrelevant to QThread,
  and it's already mentioned elsewhere.

This is a cherry-pick from a9d5627e6a7b82 in qtbase.git.

Change-Id: I491f64f998050daf0251abb2126bc9f7a198c17d
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
4 years agoDoc: Discuss the concept of thread affinity in more detail
Sze Howe Koh [Tue, 25 Feb 2014 08:17:08 +0000 (09:17 +0100)]
Doc: Discuss the concept of thread affinity in more detail

- Create a section dedicated to this concept, which is fundamental to
  signal/event handling
- Move relevant content from the very broad "Thread Basics" page to the
  QObject class ref
- Flesh out existing content, including distinguishing signals from
  events
- Address the common misconception that "member" = "child"; this has
  been encountered several times in the Qt Project forums

This is a cherry-pick from 3b45dfe6e6ff6c0626b in qtbase.git

Change-Id: If3b65f3da4e1ca414c7175c4e22bcdef38f45442
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
4 years agoFix compilation failure in configure.exe
Kai Koehne [Thu, 13 Mar 2014 10:12:50 +0000 (11:12 +0100)]
Fix compilation failure in configure.exe

Fix regression introduced in (incomplete) commit 95f256d21dd.

Change-Id: I319f214a38134b5b97164ec61b2ae482e6542b86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoPrevent spurious SSL errors from local certificates.
Richard J. Moore [Sun, 16 Feb 2014 11:35:43 +0000 (11:35 +0000)]
Prevent spurious SSL errors from local certificates.

Qt since approximately 4.4 has set the verify callback on both the SSL
store and the SSL context. Only the latter is actually needed. This is
normally not a problem, but openssl prior to 1.0.2 uses the verify
code to find the intermediate certificates for any local certificate
that has been set which can lead to verification errors for the local
certificate to be emitted.

Backport of 7c8131763de9e70ca56f16635716e7e00559b5d1

Task-number: QTBUG-33228
Task-number: QTBUG-7200
Task-number: QTBUG-24234

Change-Id: I65db8b658df9ff86095381c7b87d690258f03c3a
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
4 years agotests: Mark tst_qdbus* tests as insignificant on OS X
Sergio Ahumada [Thu, 13 Mar 2014 15:27:44 +0000 (16:27 +0100)]
tests: Mark tst_qdbus* tests as insignificant on OS X

D-Bus libraries were recently added to OS X 10.7 making these
tests to be executed for first time.

Task-number: QTBUG-37469
(cherry-picked from qtbase commit 9f87c3663d49a0a4c5affe6119ce399a6d0f5e7a)
Change-Id: I7886614bcaab290c3d4fef94d93ee9ad7837a3ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoFix Mac Bearer when machine has no wifi
Frederik Gladhorn [Tue, 11 Mar 2014 15:17:16 +0000 (16:17 +0100)]
Fix Mac Bearer when machine has no wifi

This manifested itself for some continuous integration machine, all
regular macs have wireless. In case there is no wifi, we would never
emit updateCompleted().

Change-Id: I81dce65cdbb0091944c4e79fdb5f2b7f5f70de88
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
4 years agoFix building of WebKit's JSC for earlier versions of gcc on Mac
Andy Shaw [Fri, 28 Feb 2014 10:52:35 +0000 (11:52 +0100)]
Fix building of WebKit's JSC for earlier versions of gcc on Mac

Since building for Carbon typically uses older versions of gcc on older
versions of Mac, then we need to revert
e3c44790065894f4e7f98ab097fce22c5bcbbd0a partially in order to fix this.
Since the original code was just a cleanup then this is safe to do so.

Change-Id: Ic662841f53660b763af2bc71cb9b4684fe614063
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoFix network tests relying on troll.no
Frederik Gladhorn [Tue, 11 Mar 2014 13:13:53 +0000 (14:13 +0100)]
Fix network tests relying on troll.no

Replacing old troll.no domain with qt-project.org domain. Using troll.no
doesn't work anymore.

Cherry-picked from e5785d6322051ba96b1a4a97963a64c1aabbc027 in qtbase

Change-Id: Ib849205e3c8d254e4b0dfc8ed1c396259122481a
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoQt 3 Support: Prevent double deletion of QObjectPrivate::threadData in QSettings.
Friedemann Kleint [Tue, 25 Feb 2014 09:58:44 +0000 (10:58 +0100)]
Qt 3 Support: Prevent double deletion of QObjectPrivate::threadData in QSettings.

Task-number: QTBUG-36908

Change-Id: I8f9f86f20bd8bb479c2637f6c276e4e2593ecef9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoFix building of JSC for earlier versions of gcc on Mac
Andy Shaw [Tue, 25 Feb 2014 13:02:11 +0000 (14:02 +0100)]
Fix building of JSC for earlier versions of gcc on Mac

Since building for Carbon typically uses older versions of gcc on older
versions of Mac, then we need to revert
0de22e80ac645afc3793419300d6271d95809196 partially in order to fix this.
Since the original code was just a cleanup then this is safe to do so.

Change-Id: I5dd8fe99704ffac66ac3384b62849fa8162ca82d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoWebbrowser example: Fix crash due to deprecated code.
Friedemann Kleint [Thu, 20 Feb 2014 09:24:22 +0000 (10:24 +0100)]
Webbrowser example: Fix crash due to deprecated code.

The example uses a Qt Designer form with widgets on a QToolBar
imported from Qt 3 which is not supported in Qt 4 and later.

In the code generated by uic, a QLabel is constructed passing
the toolbar as parent and added to the toolbar using
QToolBar::addWidget() which then causes a crash in Qt 4.

Move the widgets from the form into the class to avoid this.

Task-number: QTBUG-36948

Change-Id: Ia4af871ce99faf555bebc6ebde19bcae0de4d29e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
(cherry picked from qtactiveqt/2e44efa5056355ac2c069ad2bd8a8ba6562f3eb6)

4 years agofix PlatformToolSet tag location in vcxproj files
Joerg Bornemann [Wed, 29 May 2013 10:54:15 +0000 (12:54 +0200)]
fix PlatformToolSet tag location in vcxproj files

The PlatformToolSet tag belongs into the PropertyGroup with the label
"Configuration". The former location in an anonymous PropertyGroup
tricked Visual Studio into displaying the right PlatformToolSet but
using its default value. If VS 2010 and VS 2012 are freshly installed
on the same machine, the default toolset for VS 2012 is VS 2010.

Task-number: QTBUG-30822

Change-Id: If00a532e92b0812c552b1cac52ff77a1e7039146
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from commit 853a0b764e08d5f910072b6f3fd3ff3f9dc5c0c4)

4 years agoEnsure correct codec is used for Sources and Forms view.
Mitch Curtis [Tue, 18 Feb 2014 14:48:16 +0000 (15:48 +0100)]
Ensure correct codec is used for Sources and Forms view.

6626e5f41712723405c110a4f11ad650116f7523 did it on the wrong line.

This problem does not exist in Qt 5.

Change-Id: Ia39bc69b3f5ad58d28994ef3cae00242a8d0adbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Titta Heikkala <titta.heikkala@digia.com>
4 years agoAdd MinGW-builds gcc 4.8.2 as Tier 2 platform
Kai Koehne [Tue, 18 Feb 2014 11:05:19 +0000 (12:05 +0100)]
Add MinGW-builds gcc 4.8.2 as Tier 2 platform

Since we now ship an installer with it it certainly qualifies
as Tier 2 (if not even Tier 1...)

This change does not apply to Qt 5.

Change-Id: I2cb5068867e46a42fb52c7cfdb365aa99937bb04
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
4 years agoMac: Fix file dialog filters when filter doesn't start with '*'
Eike Ziller [Thu, 13 Feb 2014 14:09:18 +0000 (15:09 +0100)]
Mac: Fix file dialog filters when filter doesn't start with '*'

Task-number: QTBUG-17326

Change-Id: Ie32f2807e64aa9c90b2e7d75adcd2aef67649225
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agofix crash when using GTK 2.14 function in old gtk
Andrey Volkov [Thu, 13 Feb 2014 10:47:38 +0000 (14:47 +0400)]
fix crash when using GTK 2.14 function in old gtk

This is additional fix for bug 23569.
Previous fix (SHA1 7fcf1cf674d09d9dd1d41e2913252017f1d599ca) is not enough.
QGtkStyle was still crashing with old gtk (< 2.14)
in drawComplexControl () function.
Bug was reproducible on CentOS 5.x and Red Hat 5.x.

Current patch makes the same check as in commit mentioned but in another
line of code.

Task-number: QTBUG-23569

Change-Id: I261b61bc93ccaada879ed02ad4d0bef62935335b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Harri Porten <porten@froglogic.com>
(cherry picked from qtbase/7df3321f934e5bd618e2ad00bf801f2b7edd31df)

4 years agoQDeclarativeTypeLoader doesn't close processed QNetworkReplies
Frantisek Vacek [Mon, 10 Feb 2014 10:12:05 +0000 (11:12 +0100)]
QDeclarativeTypeLoader doesn't close processed QNetworkReplies

backport of Qt5 patch https://codereview.qt-project.org/#change,76825

This bug causes that Cascades QML application cannot open more than
system ulimit defined number of different asset:///*.qml files.

The realFile is ordinary closed in the ~QNetworkReplyFileImpl(),
the QDeclarativeTypeLoader::networkReplyFinished() calls
reply->deleteLater(). There are tricky situations when event-loop is
not entered and too many read already files are waiting for close.

This patch close() file when all the data is read. It can be done
this way since the QNetworkReplyFileImplnetworkreply is a sequential
device.

For more info, please, read comments on QTBUG-36032

cherry-pick from: qtbase cc88e6e92c806def34bce8cdcab275934ab646bf

Task-number: QTBUG-36032
Change-Id: I896cf9a89c541d743db1ccc11ab853219d844884
Reviewed-by: Richard J. Moore <rich@kde.org>
4 years agoFix the Carbon build
Andy Shaw [Mon, 10 Feb 2014 19:54:25 +0000 (20:54 +0100)]
Fix the Carbon build

The function does not exist when building for Carbon with the 10.5 SDK
so since this means the function will effectively do nothing, so we
just return false in this case.

Change-Id: If41762a055ebeccfcfce751e164b6a6e7e1db437
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoRemove incorrect check for mingw 64 bit
Kai Koehne [Fri, 7 Feb 2014 11:42:54 +0000 (12:42 +0100)]
Remove incorrect check for mingw 64 bit

MinGW-w64 has '64' too, but isn't necessarily a 64 bit build ...
But the variable wasn't used anyway, so we can as well just remove
the check.

Change-Id: Ifba3ce344c5dc5e692f105bc99081ae4c69c779c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoFix detection of mingw gcc >=4.6
Kai Koehne [Fri, 7 Feb 2014 11:37:35 +0000 (12:37 +0100)]
Fix detection of mingw gcc >=4.6

Make sure that the version check works for gcc e.g. from mingw-builds,
which contains spaces in the version info, e.g.

g++ (i686-posix-dwarf, Built by MinGW-W64 project) 4.8.2

In Qt 5, support for MinGW-gcc versions older than 4.6 was dropped.

Change-Id: Idac5fb3a8cd01200558032ea1bd997e30f0e8b8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoEnsure the webftp example works with newer versions of webkit.
Richard J. Moore [Sat, 8 Feb 2014 15:37:56 +0000 (15:37 +0000)]
Ensure the webftp example works with newer versions of webkit.

The code currently has a bug that it will return the incorrect number
for bytesAvailable() since it doesn't take account of the QIODevice
buffer. This fails when peek() is called (which is used by newer
webkits). See QTBUG-27469 for an example of the problem.

Note this example does not exist in qt5 so this is not a backport.

Change-Id: Ic61248d0f36db6a6a65d0c48a8f40346dc7c3cb6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
4 years agoFix compile for Carbon
Andy Shaw [Fri, 7 Feb 2014 08:44:12 +0000 (09:44 +0100)]
Fix compile for Carbon

Protect the usage of qt_mac_loadMenuNib so it is only used on Cocoa as
this call is not used in Carbon code.

Change-Id: I93b9b513dce934680e1d5e1fb26bf2a64e25c764
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
4 years agocorrectly resolve INCLUDEPATH relative to current project
Oswald Buddenhagen [Tue, 8 Oct 2013 15:43:32 +0000 (17:43 +0200)]
correctly resolve INCLUDEPATH relative to current project

Task-number: QTBUG-24587
Change-Id: I1384403e5c5e3313649fa4abb98e7578cae4677b
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/92020773c1739feb4dc240827271720f615431d0)

4 years agofix strings from #included sources not being collected
Oswald Buddenhagen [Tue, 6 Aug 2013 13:11:37 +0000 (15:11 +0200)]
fix strings from #included sources not being collected

Task-number: QTBUG-27974
Change-Id: I30edae2db5449605984a118458b1ccce7ad67eb1
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/bcaa8575352ad16e1f6020436e1a3f450eefd53e)

4 years agoAdded Basque translation
Xabier Aramendi [Mon, 29 Jul 2013 09:00:18 +0000 (11:00 +0200)]
Added Basque translation

Change-Id: Id580c16b6d0ea6249c4f7359d2464b34a3e4480e
Reviewed-by: Xabier Aramendi <azpidatziak@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoFix the name of the arguments of qAtan2 to match std::atan2
Thiago Macieira [Fri, 31 Aug 2012 09:53:34 +0000 (11:53 +0200)]
Fix the name of the arguments of qAtan2 to match std::atan2

There is no change in functionality, just swapping of the names x and y.
The std::atan2 function uses (y, x) in that order, so we should too.

Task-number: QTBUG-27090
Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from qtbase/9aa67cf0c48ff8e9e73fc19c4dcd950961b5ad54)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoWin: Fixed assert in QKeyMapperPrivate::possibleKeys
Oliver Wolff [Thu, 30 Jan 2014 13:23:01 +0000 (14:23 +0100)]
Win: Fixed assert in QKeyMapperPrivate::possibleKeys

Trying to detect key combinations for events that have an invalid
virtual key will fail in any case and does not make sense.

Task-number: QTBUG-36061
Change-Id: Ia30cb7bf6c7bae06eb84c23b356a53a2eb6e86aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoDontUseNativeDialog is not just for the Mac color dialog
Shawn Rutledge [Tue, 4 Feb 2014 15:10:39 +0000 (16:10 +0100)]
DontUseNativeDialog is not just for the Mac color dialog

Task-number: QTBUG-14341
Change-Id: Id2e8df9277186427370fa2a89643995d79812704
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>