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

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

8 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>
8 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>
8 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>
8 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>
8 years agoFix problem with QNetworkAddressEntry returning a invalid netmask.
Christian Strømme [Wed, 27 Nov 2013 14:04:09 +0000 (15:04 +0100)]
Fix problem with QNetworkAddressEntry returning a invalid netmask.

The ip address should be set before the netmask. The reason for this is
that QNetworkAddressEntry::setNetmask() compares the protocol of the
netmask and the ip, if they don't match the netmask won't be set.

Task-number: QTBUG-33911
Change-Id: Ic344b3653c5dfdc5df912dee16e4dbe069d57d24
(cherry-picked from qtbase commit e82951611c6d965cc8ef9cbf4ee7fbccf615bb3f)
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
8 years agoWindows: Do not try to update keymap on WM_IME_CHAR messages
Oliver Wolff [Mon, 13 Jan 2014 10:12:34 +0000 (11:12 +0100)]
Windows: Do not try to update keymap on WM_IME_CHAR messages

Task-number: QTBUG-35806

Change-Id: Ie1082353155aa7ee61f49f2fbcbfdb01d57e797c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from commit 0c09d2ccb9b46138a908950d65a49aa58dd55062)

8 years agoqmlplugindump is missing --noinstantiate option on Qt 4.8
Daniel Pesch [Wed, 22 Jan 2014 21:18:59 +0000 (22:18 +0100)]
qmlplugindump is missing --noinstantiate option on Qt 4.8

Backport of --noinstantiate option from Qt 5.0.

Task-number: QTBUG-36380
Change-Id: I80694aa94c5d5cceaf2751d1e3efc80e4f316709
Signed-off-by: Daniel Pesch <dpesch@blackberry.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
8 years agowin32-msvc2013: force synchronous writes to .pdb files
Joerg Bornemann [Thu, 24 Oct 2013 08:34:32 +0000 (10:34 +0200)]
win32-msvc2013: force synchronous writes to .pdb files

Synchronize .pdb file writing, otherwise parallel builds
will fail, when different compiler instances try to access
the same .pdb file.

See also

Task-number: QTBUG-36398

Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from commit 59ae8323b7a57cc04d19fc1f552aeaeda9dad3f7)

Change-Id: I7263b875a1015724bae6c37fb540d52507a1c7da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoCorrect algorithm for digest auth when using the CONNECT verb
Bradley Buda [Thu, 11 Jul 2013 00:29:22 +0000 (17:29 -0700)]
Correct algorithm for digest auth when using the CONNECT verb

QHttpSocketEngine fails to authenticate to an HTTP proxy that is using
Digest authentication and the CONNECT method (i.e. when you are
tunneling TLS over HTTP). The bug is due to a bad parameter being
passed to QAuthenticatorPrivate::calculateResponse - the requestMethod
parameter is passed in as "CONNECT " instead of "CONNECT" (note the
trailing space).

Because an MD5 hash is derived from this method when using the
qop="auth" flavor of Digest auth, the hash does not match the expected
value and authentication always fails in this configuration.

(cherry picked from commit 5cab14b8a1dfbb03e22b10af385fb90900a9f280)

Change-Id: Ief025ada714e03d96a316116f6b9f1711ab2a7f7
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
8 years agoQWindowVistaStyle: Always initialize text color of menu items.
Friedemann Kleint [Tue, 21 Jan 2014 10:17:50 +0000 (11:17 +0100)]
QWindowVistaStyle: Always initialize text color of menu items.

[ChangeLog][QtWidgets][QMenu][Windows] Correctly use text color set by style sheet for menu items.

Task-number: QTBUG-36142

Change-Id: I142f2fd82164771b45bf599a6afa1121fcfd2187
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
(cherry picked from qtbase/b152b425f74788b2f2845fb7d1a5032d86b8746d)

8 years agoQWindowsVistaStyle: Fixed position of menu gutter when using a custom widget action.
Friedemann Kleint [Wed, 22 Jan 2014 09:13:17 +0000 (10:13 +0100)]
QWindowsVistaStyle: Fixed position of menu gutter when using a custom widget action.

The gutter position was hardcoded to 28 which fits when drawing
on the QMenu with a left margin of 3. It became offset when drawing
on a custom widget with no margin. Calculate position relative
to margin for left to right.

[ChangeLog][QtWidgets][QMenu][Windows] Fixed position of menu gutter when using a custom widget action.

Task-number: QTBUG-36218

Change-Id: Ibb34a9fba2bab7257482b80d2e51e76a9755345c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/a5c288ea5675a382edf0b3ecae42f461a22a7303)

8 years agorebuild configure.exe
Joerg Bornemann [Mon, 20 Jan 2014 13:48:43 +0000 (14:48 +0100)]
rebuild configure.exe

Change-Id: I3e1cdb9462921a49d37637c8c0ce788208ee200c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoadd support for Visual Studio 2013
Joerg Bornemann [Tue, 2 Jul 2013 11:48:08 +0000 (13:48 +0200)]
add support for Visual Studio 2013

Add mkspec win32-msvc2013 and make VS 2013 known to configure and

Task-number: QTBUG-36135

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from commit f1cdd4b2976706c6d9c3166a75afff6ec5856f3d)

Change-Id: I6a6d1ce0de0ba85e1b711976c7340893c58e29ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoMake configure.exe only detect each compiler once
Bradley T. Hughes [Mon, 27 Feb 2012 10:21:10 +0000 (11:21 +0100)]
Make configure.exe only detect each compiler once

When reading the registry on a 64 bit Windows, the same compiler
can be detected twice, breaking the -platform detection even when
only one compiler is in the path.
Fix this by taking advantage of the CompilerInfo struct ordering
and ignore detection of the same compiler.

Change-Id: I583230520d2e0859196f9d7c8af31adbb981a6ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit fa5cf01e7468e53508b15726625fd681892119a4)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoQWizard: Fix frame when using Vista style/MSVC2012
Friedemann Kleint [Thu, 16 Jan 2014 16:22:40 +0000 (17:22 +0100)]
QWizard: Fix frame when using Vista style/MSVC2012

Work around GetSystemMetrics() returning the wrong value using
MSVC2012 and later. The special handling of Windows 8 and later
is then no longer required.

[ChangeLog][QtWidgets][QWizard]  Fixed frame when using Vista style/MSVC2012.

Task-number: QTBUG-36192

Change-Id: I39c2ab70a266f12cd65fa740b10b86edffa60417
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/852308114ff901b86cca99268f498fc1d56b622e)

8 years agoCorrect wordwrapped text handling in QListView icon mode
Samuel Gaist [Fri, 22 Nov 2013 23:15:30 +0000 (00:15 +0100)]
Correct wordwrapped text handling in QListView icon mode

Currently a QListView with wordwrapping activated will wrap the text
only to the width of the icon even if the grid size is bigger. With this
patch the option rect is now updated to match the grid size if valid
and the style uses it to determine the correct size when wrapping

[ChangeLog][QtWidgets][QTBUG-4714] Use the grid size for wordwrapping
when available in icon mode
Task-number: QTBUG-4714
Change-Id: I2cb63809d3ee8bd262f38bc11de91df9ff5cf237
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
(cherry picked from qtbase/a761be2fb2191215426f904cb03df0e966214531)

8 years agoAvoid floating point exceptions in rasterizeLine.
Gunnar Sletta [Tue, 11 Jun 2013 09:09:34 +0000 (11:09 +0200)]
Avoid floating point exceptions in rasterizeLine.

Task-number: QTBUG-16757

Change-Id: I3ef988f1e039c12529d62197d85a62f201e4ae12
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
(cherry picked from qtbase/85b4f0d2d3ffd326548ca8f0e15ac27f5fd8d77d)
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
8 years agoMitigate performance regression in isExpandedEntityValueTooLarge().
Mitch Curtis [Fri, 10 Jan 2014 10:19:08 +0000 (11:19 +0100)]
Mitigate performance regression in isExpandedEntityValueTooLarge().

512a1ce0698d370c313bb561bbf078935fa0342e fixed a security issue [1],
but also caused a large performance regression. This patch improves
the performance from ~196 seconds to ~.23 seconds for 1000 entities,
using the benchmark in the bug report:

"0": 0 msecs per iteration (total: 0, iterations: 1)
"250": 2,952 msecs per iteration (total: 2,952, iterations: 1)
"500": 23,418 msecs per iteration (total: 23,418, iterations: 1)
"750": 79,913 msecs per iteration (total: 79,913, iterations: 1)
"1000": 196,335 msecs per iteration (total: 196,335, iterations: 1)

"0": 0 msecs per iteration (total: 0, iterations: 1)
"250": 16 msecs per iteration (total: 16, iterations: 1)
"500": 59 msecs per iteration (total: 59, iterations: 1)
"750": 132 msecs per iteration (total: 132, iterations: 1)
"1000": 232 msecs per iteration (total: 232, iterations: 1)

This is a cherry-pick of 62c4e288a11769bde45c9c74d731ed8628303f19.

[1] http://lists.qt-project.org/pipermail/announce/2013-December/000036.html

Task-number: QTBUG-35919

Change-Id: Ibc2fc94dc0d88b227b9510e15bac9c07f4600591
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoFixed another assert in qwindowskeymapper
Oliver Wolff [Mon, 16 Dec 2013 13:56:59 +0000 (14:56 +0100)]
Fixed another assert in qwindowskeymapper

When we get a WM_CHAR message we do not need to add anything to the key
map as these messages already contain the character code in question.

Task-number: QTBUG-35532

Change-Id: If73993cd873b7c616876b9ba52ceba6b27a6a7b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from commit 8e2f95e5a2ebc54c600d1db416b1dd84e433d115)

8 years agoqthread_win.cpp: Fix warnings when waiting for adopted threads.
Friedemann Kleint [Mon, 16 Dec 2013 16:23:00 +0000 (17:23 +0100)]
qthread_win.cpp: Fix warnings when waiting for adopted threads.

Task-number: QTBUG-35591

Change-Id: I63169bd8a9758a7dad33d4231d3d6c9d71c7e252
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from qtbase/d1f8a5641615eb83bb36b4ada5913531d0da24f1)
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
8 years agoFix Japanese translation
Takumi Asaki [Mon, 6 Jan 2014 04:37:18 +0000 (13:37 +0900)]
Fix Japanese translation

Qt 5's translation is already fixed.

Change-Id: Ief4aa4fbea1f076c77e53f0f5b5ac00bfb1aa9f1
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoCocoa: fix a typo for F9 in key mapping
Liang Qi [Thu, 19 Dec 2013 07:17:11 +0000 (08:17 +0100)]
Cocoa: fix a typo for F9 in key mapping

Task-number: QTBUG-34820
Change-Id: I181f565a0b4f188f83cc821a019cf3781954cb02
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoFixed various crashes in connection point enumerators
sbk [Wed, 27 Nov 2013 09:02:55 +0000 (01:02 -0800)]
Fixed various crashes in connection point enumerators

Task-number: QTBUG-35136
Task-number: QTBUG-35262
Task-number: QTBUG-35263
Task-number: QTBUG-35264
Task-number: QTBUG-35265
Task-number: QTBUG-35266
Task-number: QTBUG-35267
Task-number: QTBUG-35283
Task-number: QTBUG-35284
Task-number: QTBUG-35285
Task-number: QTBUG-35286

Change-Id: Icc51137fa52dd9a10b4c3ce1ca7fe6c56d556b7a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtactiveqt/0d29579baffd4f31a3ec39590117f4fee821694d)

8 years agoQSpinBox: fix cursor jumping around when pressing up/down keys
Pekka Vuorela [Wed, 5 Oct 2011 11:39:57 +0000 (14:39 +0300)]
QSpinBox: fix cursor jumping around when pressing up/down keys

Backport of:
  Make QLineEdit unit test pass again

  Widget failed to update cursor position if selection remained the same, but
  changed direction, and did not emit selectionChanged if change resulted
  from input method event.

Bisected to fix
Task-number: QTBUG-15116
a regression introduced in fb7d86cf.

Change-Id: I6a4ae48d41efa5e126980749f89982f92e3ec499
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
(cherry picked from qtbase/1189ebff320b8dd03637947c92df6e3ef84a3c06)
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoSSL: blacklist ANSSI intermediate certificate
Peter Hartmann [Tue, 10 Dec 2013 08:21:43 +0000 (09:21 +0100)]
SSL: blacklist ANSSI intermediate certificate

... because it was used to operate a man-in-the-middle proxy.

Task-number: QTBUG-35474
(backported from commit 7eecbb07184bc8b2c5e7645af2805ba0a2488082)

Change-Id: Ibf15faf0b89fa29a8ca9d9dfeeeab120dd644526
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoCascade detection of SSE3 support and up
Thiago Macieira [Sun, 8 Dec 2013 19:58:44 +0000 (11:58 -0800)]
Cascade detection of SSE3 support and up

If SSE2 isn't supported, then SSE3 can't be either. Onwards and upwards
for SSSE3, SSE4.1, SSE4.2 and AVX. The test for AVX2 was already there.

(cherry-picked with modification from qtbase commit
a071ba629b89dbbe458d0865a0c4ebc3f92d3524; modified because Qt 4 checks
for SSE and MMX)

Task-number: QTBUG-24773
Change-Id: I005258db52d8abcd407a99b8ebcc23cdea8e3d9f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoClean up a partially scrolled QRollEffect widget
Miikka Heikkinen [Thu, 14 Jun 2012 10:05:34 +0000 (13:05 +0300)]
Clean up a partially scrolled QRollEffect widget

If the associated widget pointer got zeroed while QRollEffect was
scrolling, the partially scrolled QRollEffect widget remained on
screen indefinitely as 'done' was never set to true.

Change-Id: If1567ea740e81b5501137d10db471ca97d295ed8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from qtbase/486601fbc4a7e9eaeb5df5bb3966c3aec31d8d65)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoWebKit: Remove video support on OS X
Brian Jensen [Tue, 3 Dec 2013 12:36:02 +0000 (13:36 +0100)]
WebKit: Remove video support on OS X

WebKit video support on OS X currently relies on QTKit to function
properly. This is problematic because QTKit video support in WebKit
requires linking against the WebKitSystemInterface specific to each OS X
release, thus preventing the same set of Qt binaries from interoprating
with several Mac Releases. As a workaround video support is disabled.

Back ported from: http://trac.webkit.org/changeset/151546

Task-number: QTBUG-32237

Change-Id: I780062ce5971960dcad7b51e6226dcf7cd7c907f
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
8 years agoFixed rounding errors in QtQuick1 to int conversions
Janne Koskinen [Wed, 30 Oct 2013 10:08:36 +0000 (12:08 +0200)]
Fixed rounding errors in QtQuick1 to int conversions

qRound introduced errors when qreal is single precision. Added
double signature for qround so that string and int don't lose precision
in conversion.

Task-number: QTBUG-33625

Change-Id: I58582f57d5cd68fcad3fe9efb5fea5935f61b9e3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoqt webkit: add support for MIPS64 platforms
Vicente Olivert Riera [Wed, 4 Dec 2013 17:52:49 +0000 (17:52 +0000)]
qt webkit: add support for MIPS64 platforms

qt5webkit is not fixed and this patch cannont be applied to qt5webkit

Task-number: QTBUG-35394

Change-Id: Ie2d332345741989a0b4ef93306ca36b42e888c11
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
8 years agoDon't use Standard Library routines in qthread_p.h
Thiago Macieira [Thu, 5 Dec 2013 20:51:53 +0000 (12:51 -0800)]
Don't use Standard Library routines in qthread_p.h

Just write the for loops by hand so we don't need to use the Standard
Library. That's necessary to support a -no-stl build.

This patch is not necessary in Qt 5 since Qt 5 does not have -no-stl.

Task-number: QTBUG-35424
Change-Id: Id449d807eaf7350f1a668ef16d356a9e236c6058
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
8 years agoCompletely bootstrap idc.
Friedemann Kleint [Tue, 3 Dec 2013 16:23:31 +0000 (18:23 +0200)]
Completely bootstrap idc.

idc dynamically loads libraries depending on QtCore.dll
whose static instances can then cause clashes.

Task-number: QTBUG-35275

Change-Id: I48bb9c4b4ab33b1909d650458c0351c008b46ac0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtactiveqt/ab3e8e80fbd81a38039c713189b0422972e0963e)

8 years agoUse qt_mac_effectiveview_for for setFocus_sys
Samuel Gaist [Fri, 8 Nov 2013 21:50:44 +0000 (22:50 +0100)]
Use qt_mac_effectiveview_for for setFocus_sys

Currently setFocus_sys use qt_mac_nativeview_for to set the focus which
triggers a bug rerouting the key events through NSMenu rather that
directly to the correct widget. Get the effective id returns the
correct widget. This changeset applies the patch proposed in the bug

Task-number: QTBUG-34371
Change-Id: I0831f41ca409ff309954bb45a50975dd4eb1406a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agoEnable building with clang / libc++ on OS X 10.9 Mavericks
Brian Jensen [Mon, 11 Nov 2013 20:13:14 +0000 (21:13 +0100)]
Enable building with clang / libc++ on OS X 10.9 Mavericks

A minimalistic change to enable building with clang / libc++ on OS X
10.9 Mavericks. The configure script now avoids overriding build
settings when using clang/libc++. Added a new build configuration with
settings specific to clang/libc++ on OS X.

Task-number: QTBUG-34652

Change-Id: Iaedaff7c06e9818a5f2ee0d6db93fbe3b2e65e28
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agoQBBSystemLocale: Do not set fixed buffer size when reading pps objects
El Mehdi Fekari [Wed, 4 Dec 2013 15:58:25 +0000 (16:58 +0100)]
QBBSystemLocale: Do not set fixed buffer size when reading pps objects

Set dynamically the buffer size when reading pps objects since a pps file
size is not always fix.

Cherry-picked: qtbase/edf29a9aa93660ac8e4927db7fef2b5d925e9b59

Change-Id: Id55df6a474b6b79d96e3459e807f0bbfeacbf0cb
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
8 years agoRespect the custom paper size settings on Mac
Andy Shaw [Tue, 3 Dec 2013 22:11:35 +0000 (23:11 +0100)]
Respect the custom paper size settings on Mac

When the user added a custom paper size then it would be silently
ignored when printing on Mac. This now ensures that it is respected when

Manual cherry-pick from Qt 5: 26a0a3ed85008c3a0edae125fca48c7c36a7437f

[ChangeLog][Platform Specific Changes][OS X][QtPrintSupport] Respect
the custom paper size settings when printing.

Task-number: QTBUG-34700
Change-Id: If2ff9b704a636c94510f826d300e53af99c8e7ab
Reviewed-by: John Layt <jlayt@kde.org>
8 years agoqtscript: Add support for MIPS64 platforms
Vicente Olivert Riera [Mon, 2 Dec 2013 16:33:48 +0000 (16:33 +0000)]
qtscript: Add support for MIPS64 platforms

This fix do not apply to Qt 5 because qtscript has been already patched
in 408847dcdfe1d407cd85616e8f595fb5ea25ca46

Task-number: QTBUG-35030

Change-Id: I0eb71aa875afef9eee15a203b9bd24f5395a3463
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: YunQiang Su <wzssyqa@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoCorrect WebKit build path settings
Benjamin Seppke [Thu, 21 Nov 2013 14:49:48 +0000 (15:49 +0100)]
Correct WebKit build path settings

Change the WebKit build path settings to point to the correct install

Change-Id: Idd350a9d873be454d88a01accf3d9fe590cc0103
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoUpdate Arabic translation
Ahmed Saidi [Sun, 23 Dec 2012 11:04:37 +0000 (11:04 +0000)]
Update Arabic translation

Change-Id: I8aa6df64a8454a5e916e038d6a8bfa6aef7b6de4
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoBackported fix for WebKit libc++ support on OS X Mavricks
Brian Jensen [Mon, 11 Nov 2013 11:00:28 +0000 (12:00 +0100)]
Backported fix for WebKit libc++ support on OS X Mavricks

As of OS X 10.9 Mavericks libc++ is the default standard library
implementation. This fix is necessary for building WebKit on OS X
Mavericks when using libc++. Upstream Change:

Task-number: QTBUG-34652

Change-Id: Ieb30c115b85045adc3e82ee039c541c973b72a3c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
8 years agoWebKit Nullptr type fixes when using libc++
Brian Jensen [Tue, 5 Nov 2013 15:42:43 +0000 (16:42 +0100)]
WebKit Nullptr type fixes when using libc++

These changes correct the Nullptr type handling for libc++ based system.

Task-number: QTBUG-34652

Change-Id: Ied51c8683cce86beb24ed2fef70e99bb4dfc15e5
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
8 years agoFix WebKit TimerHeap implementaiton to work with more standard libraries
Darin Adler [Tue, 5 Nov 2013 15:47:39 +0000 (16:47 +0100)]
Fix WebKit TimerHeap implementaiton to work with more standard libraries

This is necessary to get WebKit to build with more with more STL
variants, including libc++. It is based on the upstream WebKit change:

Task-number: QTBUG-34652

Change-Id: I31ad9a7af8b1fb21d4186857f63a9fdf58429042
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
8 years agoQNX: Make use of _readdir64_r
Bernd Weimer [Tue, 26 Nov 2013 10:22:37 +0000 (11:22 +0100)]
QNX: Make use of _readdir64_r

Latest QNX versions support _readdir64_r. It will be used by
QFileSystemIterator now, when available to support large file

Backport from qtbase/5d8c05baf478d8eb8cb7ce827caa2c1103f5fa3f

Change-Id: I264cc39a0cae6e84ed0db2e10df5ea22c8ae3df4
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
8 years agoKeep the copied files as writable
Thiago Macieira [Wed, 27 Nov 2013 20:14:59 +0000 (12:14 -0800)]
Keep the copied files as writable

Mac's strip tool doesn't work if the file is read-only. Some of the
libraries we copy might be read-only (like those installed by
HomeBrew) and that would cause stripping to fail.

(cherry-picked from qttools commit f82499e6508975188b38cb396280c901e4274cd7)
Change-Id: Ie8caa853a26794ec97ec84354d9f7bb142cce993
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
8 years agoRecognize newer libmng versions in config test
aavit [Fri, 22 Nov 2013 14:49:44 +0000 (15:49 +0100)]
Recognize newer libmng versions in config test

libmng 2.0.x has been released and is compatible and usable, but since
it no longer provides a VERSION_MAJOR macro, the config test would fail.

Task-number: QTBUG-34894
Change-Id: I36f6ed9d69dbae88feb1b88ce099bf36c9283133
Reviewed-by: Liang Qi <liang.qi@digia.com>
(cherry picked from qtimageformats/9ae386653c321c8ddc10fad5ea88f32ebb3d3ffe)

8 years agoQPrintDialog - Fix Windows Current Page option selection
John Layt [Wed, 27 Nov 2013 09:24:51 +0000 (10:24 +0100)]
QPrintDialog - Fix Windows Current Page option selection

In the Windows print dialog default the print range radio button
selection to the QPrinter set value, but only if the option is enabled
in the dialog.

Task-number: QTBUG-32965

Change-Id: I1093ff9d55c0ec578fc2c112874662deb32e1b4d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtbase/9927c1a2bbb372d0e557c58062e4ecda7a644aa1)

8 years agoUpdate 4.8.6 changelog
Gabriel de Dietrich [Mon, 25 Nov 2013 14:19:12 +0000 (15:19 +0100)]
Update 4.8.6 changelog

Change-Id: Ie5f65d9f8915d327aed03a1d7073782fb2c6fdbc
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
8 years agoCoreWLan: Fix potential unhandled exception assert
Gabriel de Dietrich [Mon, 25 Nov 2013 12:52:36 +0000 (13:52 +0100)]
CoreWLan: Fix potential unhandled exception assert

-[QNSListener notificationHandler:] was declared as not taking any parameter,
but used as taking a single NSNotification. This would lead to an 'unrecognized
selector' exception raised by Cocoa.

Task-number: QTBUG-26844
Change-Id: I723b4c89b0faf1fe156a3c96cb1dd3abfad8daa6
Reviewed-by: Liang Qi <liang.qi@digia.com>
8 years agoMac style: Fix selected tab text color on 10.6
Gabriel de Dietrich [Thu, 21 Nov 2013 12:26:29 +0000 (13:26 +0100)]
Mac style: Fix selected tab text color on 10.6

This is a regression introduced by a1eaf0169f041f599895fac90570df601559a526.

Task-number: QTBUG-34540
Change-Id: I3944a92f5119e0ec7c435b5b36ed4bc3d7361888
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
8 years agoFixed assert in Windows key handling
Oliver Wolff [Tue, 19 Nov 2013 11:47:03 +0000 (12:47 +0100)]
Fixed assert in Windows key handling

Certain key sequences (like press alt, press left, release left,
release alt) can cause an assert in qwindowskeymapper. This
behavior was introduced in change
I4f7709a90906b03f4504deea1ff5c361e9f94b3f (Fix virtual key
mapping on MS Windows). The place that seems to cause the new
behavior is changing the bitmask for obtaining the event's scancode.

With the changed bitmask releasing the alt key in the given
key sequence causes the WM_KEYUP event to trigger a WM_CHAR event
which should not happen there. To be honest I don't know how having
the extended bit inside the scancode fixes the behavior but it seems
to do and I could not find another place which might cause the

Task-number: QTBUG-35005
Change-Id: Ia18c2681ea311196441a5cd15017e220ac095674
(cherry picked from commit d4c548ce5c0bd8a70c82ed082bc69fd41e9c47ed)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Juan Luis Boya García <ntrrgc@gmail.com>
8 years agoFix bug in updatePossibleKeyCodes() with dead keys and modifiers
Juan Luis Boya García [Wed, 23 Oct 2013 10:34:02 +0000 (12:34 +0200)]
Fix bug in updatePossibleKeyCodes() with dead keys and modifiers

As it was until now, QWindowsKeyMapper::updatePossibleKeyCodes() tested
using ToUnicode for which characters produce a key with every possible
combination of modifiers.

Calling ToUnicode with a dead key is dangerous, because MS Windows keeps
it in the driver buffer, so if you call ToUnicode with acute key and
then you press a, you get an á.

To prevent this, updatePossibleKeyCodes() checked if the key that was
being tested was a dead key. If true, it inserted an space and then
repeated the key in order to reset the system internal buffers to the
same state they were before the call.

The problem with this is if the dead key is really two keys (like ^ or ´
in US International keyboard layout) and you press one of those keys
without the modifier to make it a dead key (i.e. 6 in US International):
Since updatePossibleKeyCodes() only tests for the key that was pressed
it gets 6 is not a dead key, and thus it does not execute the
workaround. Thus, the next time the user presses 'a' they get 'â'
instead because updatePossibleKeyCodes() set the dead key on the
keyboard buffer and did not run the workaround.

This patch makes updatePossibleKeyCodes() run the workaround if any
possible combination of modifiers with the key being examinated makes a
dead key.

Task-number: QTBUG-33591
Change-Id: I8c0b27586f7c62798986258b1b84aa90e4c5d64c
(cherry picked from commit b98a031b813a83374897b23f4f7710a238f2e7b6)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Juan Luis Boya García <ntrrgc@gmail.com>
8 years agoFix virtual key mapping on MS Windows
Juan Luis Boya García [Wed, 16 Oct 2013 15:34:52 +0000 (17:34 +0200)]
Fix virtual key mapping on MS Windows

In order to map MS Windows virtual keys to Qt keys without messing with
dead keys now I use the built-in keyMap structure of QWindowsKeyMapper
and assert every cell in the keymap is properly updated.

In order to guarantee this even when the user changes the keyboard
layout, WndProc now manages the WM_INPUTLANGCHANGE message, which is
handled by QWindowsKeyMapper, resetting the layout structure.

I don't fully understand yet some things about QWindowsKeyMapper, i.e.
how QWindowsKeyMapper::updatePossibleKeyCodes workarounds the dead key
issue with ToAscii; but it seems to work fine in all the tests I've
done. Any further testing is highly appreciated, though.

[ChangeLog][[QtGui][Platform Specific Changes][Windows] Fixed virtual key
mapping on Windows.

Task-number: QTBUG-33409
Task-number: QTBUG-8764
Task-number: QTBUG-10032

Change-Id: I4f7709a90906b03f4504deea1ff5c361e9f94b3f
(cherry picked from commit f0d014a16b5c9b55245834459c46ea34d15d14be)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoQThread: Fix link to snippet in documentation
Jonathan Liu [Fri, 22 Nov 2013 05:22:43 +0000 (16:22 +1100)]
QThread: Fix link to snippet in documentation

Change-Id: Ie27b3ae36dcf98cef4b612387aff448bc0421d29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
8 years agoMultimedia: Fix MinGW-warning about assigning NULL to int-type.
Friedemann Kleint [Wed, 20 Nov 2013 14:04:16 +0000 (15:04 +0100)]
Multimedia: Fix MinGW-warning about assigning NULL to int-type.

Change-Id: I58fc7628845ed0733b79af5ab89c360ab8a12863
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
8 years agoFix signature of the waveInProc/waveOutProc callbacks.
Friedemann Kleint [Thu, 14 Feb 2013 10:43:18 +0000 (11:43 +0100)]
Fix signature of the waveInProc/waveOutProc callbacks.

Parameters are DWORD_PTR instead of DWORD, which did not matter
on 32bit but caused MinGW64-compiler warnings and potential
crashes on 64bit.

Change-Id: I840ae3ea7ea532746f73f20b3233cae842931d45
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
(cherry picked from qtmultimedia/699a5d75aab2de7e2c341be8533446597bee355e)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
8 years agoQLocale: Fix infinite loop in error case
El Mehdi Fekari [Wed, 20 Nov 2013 13:43:38 +0000 (14:43 +0100)]
QLocale: Fix infinite loop in error case

QBBSystemLocaleData emits qwarnings when it fails to open or read a pps object.
If the user code installs a message handler that will invoke QLocale API again
(i.e QDate, QDateTime, ...) then this will cause an infinite loop, where the
QBBSystemLocaleData ctor() is calling itself.

This patch logs the QBBSystemLocale's warnings to stderr and
skips the Qt message handler.

Cherry-picked: qtbase/1e446fc99167a992b1a8342168b6254f43b097fe

Change-Id: Iff99973532e0cba752854e325d0cd987765547d9
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
8 years agoThreads: Fix mingw-gcc warning about 'cast to pointer from integer of different size'
Kai Koehne [Wed, 12 Sep 2012 13:30:59 +0000 (15:30 +0200)]
Threads: Fix mingw-gcc warning about 'cast to pointer from integer of different size'

Use reinterpret_cast to convert from DWORD to pointer.

Change-Id: I17a12940850aeb0bc27080725a18eb93fee72ff7
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from qtbase/edfdaba696d94206794203f9621d7e3aa8e5ab26)
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
8 years agoQUiLoader/Designer: Fix gcc 4.8 warnings about unused typedefs.
Friedemann Kleint [Fri, 5 Apr 2013 12:51:49 +0000 (14:51 +0200)]
QUiLoader/Designer: Fix gcc 4.8 warnings about unused typedefs.

Change-Id: I792f3060c808ef860b31b47b3b00e5ac1991eedd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
(cherry picked from qttools/3455a96c6728873a3ba69585ebb27bf8e733c0f9)

8 years agoMake sure .qch file is opened read-only
Kai Koehne [Wed, 13 Nov 2013 15:33:51 +0000 (16:33 +0100)]
Make sure .qch file is opened read-only

So far qsqlite tried to open the file first read/write, and falling back
to read access only if this fails. This has resulted in excessively long
loading times e.g. on Windows XP.

Task-number: QTCREATORBUG-10697

(cherry-picked from commit 0bf84aa7873edd7bb411fabb94481b03d1501c68 in

Change-Id: I94be15e2d7c5845bcadf6b32e54462a7c1bcb98a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoKernel: Fix gcc warning in qsharedmemory_win.cpp
Kai Koehne [Wed, 12 Sep 2012 13:43:09 +0000 (15:43 +0200)]
Kernel: Fix gcc warning in qsharedmemory_win.cpp

Fix gcc 4.7 'arning: converting 'false' to pointer type 'HANDLE {aka void*}' [-Wconversion-null]'

Change-Id: I28d890d5fd4975517a9329d68c9ef73f6fadf36c
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from qtbase/baf8a2fbf710314096832b0ee5735ffdc8b24210)

8 years agoqsimd: Fix compilation with MinGW 64.
Friedemann Kleint [Mon, 18 Nov 2013 10:39:29 +0000 (12:39 +0200)]
qsimd: Fix compilation with MinGW 64.

Task-number: QTBUG-34856
Change-Id: Ie1dbeb5787e1a60aeaca585160319bbe0943e2cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoFix MinGW-warnings about narrowing/invalid conversions.
Friedemann Kleint [Mon, 18 Nov 2013 16:15:17 +0000 (18:15 +0200)]
Fix MinGW-warnings about narrowing/invalid conversions.

Change-Id: I9b49dd6d12a5e59c6f2674ab3c82a8a7ec583775
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
8 years agoMinGW: Fix warnings about assigned but not used variables.
Friedemann Kleint [Mon, 18 Nov 2013 16:11:26 +0000 (18:11 +0200)]
MinGW: Fix warnings about assigned but not used variables.

Change-Id: I114483273db0f9ffe0527b4a3e4cd881375a3448
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
8 years agoQObject: use per-thread storage for qFlagLocation()
Marc Mutz [Sat, 21 Sep 2013 15:42:33 +0000 (17:42 +0200)]
QObject: use per-thread storage for qFlagLocation()

qFlagLocation() uses a global char* array to transport source location
information from the connect() side to the metaobject side. The size
of the array is 2 (two), which just about suffices for a single connect()

Obviously, if more than one thread makes a (_any_) connection at the same
time, the data is useless and, worse, there's a data race.

The non-reentrancy of qFlagLocations() cannot and need not be fixed,
but use a per-thread flagged_locations array in QThreadData so threads
don't disturb each other.

Task-number: QTBUG-3680

Change-Id: If1797c60751f551694def69afee6fbe295bbe2d2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qtbase/c012ee2940bc087720b4aa0d257540921cf9a139)
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoFully expand entities to ensure deep or widely nested ones fail parsing
Mitch Curtis [Tue, 12 Nov 2013 12:44:56 +0000 (13:44 +0100)]
Fully expand entities to ensure deep or widely nested ones fail parsing

With 512a1ce0698d370c313bb561bbf078935fa0342e, we failed when parsing
entities whose partially expanded size was greater than 1024
characters. That was not enough, so now we fully expand all entities.

This is a backport of f1053d94f59f053ce4acad9320df14f1fbe4faac.

Change-Id: I41dd6f4525c63e82fd320a22d19248169627f7e0
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoWhen reparenting a widget, children need to reregister as a drop site
Andy Shaw [Thu, 14 Nov 2013 13:57:50 +0000 (14:57 +0100)]
When reparenting a widget, children need to reregister as a drop site

If a widget is a drop site and an ancestor gets reparented then the
widget needs to be reregistered as a drop site so that it is correctly
associated with the new native parent widget.

Task-number: QTBUG-30276

Change-Id: I440077e54f614d0bfbaef46104de6598411c986b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
8 years agoQThreadPool: fix race at time of thread expiry.
David Faure [Fri, 1 Nov 2013 09:49:30 +0000 (10:49 +0100)]
QThreadPool: fix race at time of thread expiry.

The current synchronization mechanism was racy: decrementing waitingThreads
and then hoping that the wakeOne will wake a thread before its expiry
timeout happens. In other words, on timeout, a just-assigned task would
never run. And then no other task would run, if maxThreadCount is reached.

Fixed by using a queue of waiting threads (rather than just a count), and by
moving the wait condition into the thread itself, so we know precisely
which one we're waking up, and we can remove it from the set of waiting threads
before waking it up, and therefore it can determine on wakeup whether it
has work to do (caller removed it from the queue) or it expired (it's still
in the queue). This is reliable, whereas the return value from QWaitCondition::wait
isn't reliable, when the main thread has already decided that this thread
has work to do.

Task-number: QTBUG-3786
Backport from qtbase/a9b6a78e54670a70b96c122b10ad7bd64d166514

Change-Id: Ic766ff67dea7a8bb8f1bc893943060ee5428d782
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoQThreadPool: fix counting of waiting threads
David Faure [Fri, 21 Jun 2013 08:32:17 +0000 (10:32 +0200)]
QThreadPool: fix counting of waiting threads

QTBUG-21051 has a testcase where activeThreadCount() could actually
end up at -1 (converted to an autotest in this commit).
The reason was: start() calls tryStart() which returns false due to
too many active threads (reserveThread() causes this), so it calls
enqueueTask() - which actually wakes up the waiting thread, but
it didn't decrement the number of waiting threads.

Note that tryStart() is "if I can grab a waiting thread, enqueue task and wake it"
while start(), in case tryStart() fails, wants to "enqueue, and then if I can grab
a waiting thread, wake it". This is why enqueue shouldn't wake; waking must happen
only if we can grab a thread (d->waitingThreads > 0).

Task-number: QTBUG-21051
Backport from qtbase/dacf9961da86751a59da0e84bc943fe0d1c8d95b

Change-Id: I1e437da27b733a72b48ff1b6f2b78f81a7ed129b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoQThreadPool: fix data races in activeThreadCount()
David Faure [Mon, 19 Aug 2013 08:45:06 +0000 (10:45 +0200)]
QThreadPool: fix data races in activeThreadCount()

Rather than trying to make it lock-free (which requires double-bookkeeping of
4 atomic ints!), just lock the mutex before calling it.
tst_bench_qthreadpool shows no difference whatsoever between the two
solutions, I get 0.005 msecs per iteration in startRunnables().

Of course looping over calls to activeThreadCount() is a bit slower,
from 0.0002 msecs per iteration to 0.00027 msecs, i.e. 35% more.
But polling activeThreadCount() from the app is a really wrong thing to
do anyway, this benchmark was just for my own curiosity about the
price of a mutex in a function that sums up 4 ints.
What matters is start() performance, which is unchanged (0.00007 msecs
is just noise compared to a 0.005 total, that's 1.4%).

Backport from qtbase/85b24bb2dea97c3a9b013bacd5a422b26fe5d14b

Change-Id: Id32791069bc1e2dd61cef708d5287c9f9b7e5582
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoQThreadPool: fix typos
David Faure [Fri, 21 Jun 2013 12:21:02 +0000 (14:21 +0200)]
QThreadPool: fix typos

Task-number: QTBUG-31919
Backport from qtbase/37dc44d499884bd0d7ab9d2f1547db468c9fe53b

Change-Id: I9496b059ed201da6b7a5ec02c4acb8f231e40c30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoQWizard: provoke 'enum value not handled in switch' warnings in object_name_for_button
Marc Mutz [Fri, 25 Oct 2013 17:17:28 +0000 (19:17 +0200)]
QWizard: provoke 'enum value not handled in switch' warnings in object_name_for_button

This is strictly speaking a behavior change, since we're no longer returning
something for Stretch and NoButton, but - guessing here - that shouldn't matter.
Yet, better safe than sorry, thus submitted as a separate patch.

Change-Id: I20cb084147f8c9257ce37d1e87ea38febabec28d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtbase/269590516d89a35ea3121366f7d4bf43b0d391ca)

8 years agoQWizard: give all buttons an objectName
Marc Mutz [Tue, 8 Oct 2013 11:31:19 +0000 (13:31 +0200)]
QWizard: give all buttons an objectName

Only Commit, Finish and Cancel didn't have an object name, yet.
Also Extract Method on the switch statement, add a test, and
use QStringBuilder.

Task-number: QTBUG-29924
Reported-by: Leo Arias
Change-Id: I8c29606bc53e9d4caab631da2089e971a9da2d75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtbase/1ea191276ea49ce2334d21b1f4a2c66ee8889466)

8 years agoOptimize macDisplayColorSpace
Morten Johan Sørvig [Sun, 27 Oct 2013 16:46:41 +0000 (17:46 +0100)]
Optimize macDisplayColorSpace

On 10.9, getting the display based on the rect is slow(er).

Use a window -> color space cache instead of a
display -> color space cache.

Change-Id: If40a6d089019a54ceb724b8007adaffea89c96fb
Task-number: QTBUG-34358
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agoDesigner: remove dead code in QStackedWidgetPreviewEventFilter::updateButtonToolTip()
Marc Mutz [Mon, 11 Nov 2013 10:56:45 +0000 (11:56 +0100)]
Designer: remove dead code in QStackedWidgetPreviewEventFilter::updateButtonToolTip()

The local variable 'className' is no longer used, since at some point
in time, it was replaced with the query stackedClassName(), a file-
static function.

So remove the code that sets it.

Change-Id: I2ee7dedc66acfa10949b628499c52f87dab02e7a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qttools/c98012e7a6b6287ec13b8ca4a4d08ed584f7ee8a)

8 years agoUpdate Hebrew translation
Genghis Khan [Sat, 26 Oct 2013 17:14:18 +0000 (20:14 +0300)]
Update Hebrew translation

Started-by: Diego Iastrubni <diegoiast@gmail.com>
Change-Id: I32932ec0b5b1c96ef5f18da0297ef646c5780c24
Reviewed-by: Genghis Khan <genghiskhan@gmx.ca>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
8 years agoUse the correct system font on OS X Mavericks.
Jake Petroules [Fri, 1 Nov 2013 18:13:25 +0000 (14:13 -0400)]
Use the correct system font on OS X Mavericks.

Task-number: QTBUG-32789

Change-Id: I7b1988d5f74e5becd2e02274fae4d2bcc8140901
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agoActive Qt: Remove invalid memset()-call.
Friedemann Kleint [Mon, 11 Nov 2013 09:27:51 +0000 (10:27 +0100)]
Active Qt: Remove invalid memset()-call.

It uses the wrong size and is not need since the subseqent
memcpy-call overwrites it.

Task-number: QTBUG-34722
Change-Id: Ic1662454cd76a98eff11f52ad6a847c3402e37c3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
8 years agoQt Designer: Implement property() for QAxWidgetPropertySheet.
Friedemann Kleint [Wed, 6 Nov 2013 15:50:18 +0000 (16:50 +0100)]
Qt Designer: Implement property() for QAxWidgetPropertySheet.

Access the control property of the QAxWidget directly.

Task-number: QTBUG-34592

Change-Id: I7d0971ad8fc265d0443da7ae72330e2b7f3a8d70
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qttools/611ac50c1ed80bd6c6c15f2b39e720b6f7c1acb8)

8 years agoCocoa File Dialog: Remove sandbox-ufriendly QDir::entryList() call
Gabriel de Dietrich [Wed, 6 Nov 2013 13:09:50 +0000 (14:09 +0100)]
Cocoa File Dialog: Remove sandbox-ufriendly QDir::entryList() call

QDir::entryList() uses QDirIterator, which itself uses QFileSystemEngine,
and whose backend uses POSIX API in a relatively liberal way.

This is a backport of Qt 5's Ia872b9b1244f7b390d173a498011379b9309b3c6.

Task-number: QTBUG-34012
Change-Id: I0a17359510e7623b4ee53dd86bb5bdc39785600e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
8 years agoDisallow deep or widely nested entity references.
Mitch Curtis [Thu, 7 Nov 2013 08:36:29 +0000 (09:36 +0100)]
Disallow deep or widely nested entity references.

Nested references with a depth of 2 or greater will fail. References
that partially expand to greater than 1024 characters will also fail.

This is a backport of 46a8885ae486e238a39efa5119c2714f328b08e4.

Change-Id: I0c2e1fa13d6ccb5f88641dae2ed3f28bfdeaf609
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoBlackBerry: Prevent superfluous removal of socket notifiers
Bernd Weimer [Tue, 5 Nov 2013 10:04:51 +0000 (11:04 +0100)]
BlackBerry: Prevent superfluous removal of socket notifiers

File descriptors have always been removed from bps before adding them,
which lead to an annoying warning.
"QEventDispatcherUNIX::registerSocketNotifier()" needs to be called
after "ioEvents()" to prevent this.

Back-port of qtbase/e9c51a1fdc9092e5589fd6f823ad0e704e293c88

Task-number: QTBUG-34536

Change-Id: I767a15cb2883bc820da5c858613ffb26abc002e4
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Petr Nejedlý <pnejedly@blackberry.com>
8 years agoCorrect QToolBar layout on retina displays.
Morten Johan Sørvig [Mon, 4 Nov 2013 07:33:37 +0000 (08:33 +0100)]
Correct QToolBar layout on retina displays.

QStyleOptionToolButton::iconSize will be 2x on retina
displays. The layout size should not be 2x however,
that causes excessive spacing in the toolbar.

Task-number: QTBUG-34484
Change-Id: I48cf47044af5b76f39e08c1d580034b84ef2755d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoQPdfEngine - Remove Producer copyright notice
Samuel Gaist [Sun, 3 Nov 2013 19:55:25 +0000 (20:55 +0100)]
QPdfEngine - Remove Producer copyright notice

Remove the copyright notice from the PDF Producer field which could be
misunderstood. Comparison to other PDF Producers shows no other company
does this.

Based on https://codereview.qt-project.org/#change,70182

Task-number: QTBUG-33853
Change-Id: I3a2820c1466963e7391b4a9a729c7261a3582e0b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
8 years agoExpose QTest::currentAppName() and remove hard-coded argv[0] in tests
Samuel Gaist [Sun, 3 Nov 2013 22:00:18 +0000 (23:00 +0100)]
Expose QTest::currentAppName() and remove hard-coded argv[0] in tests

Except where we're actually testing QCoreApplication::applicationName()
and friends.

Based on a3530859e9a7423db0b6839f15538f248aaf4a79

Change-Id: I36ef8cbb5d8bce45225a7f81409f46f1d584287b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
8 years agoBackport of Qt5 applicationName handling
Samuel Gaist [Thu, 31 Oct 2013 09:18:30 +0000 (10:18 +0100)]
Backport of Qt5 applicationName handling

Currently applicationName returns an empty value unless the user
explicitly sets it. Qt 5 is smarter and get the name either based on the
application arguments or a platform specific way (e.g. OS X using the
menu bar name) if the user didn't set it.

Based on f04b46f34e9446417cd5681f511332344679ef30
and 696060134d10d44175970ffd38618544ecdd9387

Change-Id: Ifc17cf4a74fed8cfabb46b3540dfbd64a5452640
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
8 years agoFix tab-completion for variables that have digits in them
Andy Shaw [Tue, 22 Oct 2013 05:10:58 +0000 (07:10 +0200)]
Fix tab-completion for variables that have digits in them

In the QtScript Debugger if a variable had a number in it then it would
not tab complete to show the member variables. This accounts for digits
so that it is correctly able to find the variable to complete on.

Change-Id: I4fe0b3b776aba0e3caa6dd524c1a0c59421ea515
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
(cherry picked from qtscript/925f1264c590c12aaa5f93a687c7b2aba4370115)

8 years agoMake QCoreWlan plugin compile on 10.9
Morten Johan Sørvig [Sun, 27 Oct 2013 15:50:22 +0000 (16:50 +0100)]
Make QCoreWlan plugin compile on 10.9

Backport of 79ccb4fc from Qt 5:

We take the path of least resistence and keep the old API code for 10.6 while
updating the code for 10.7 and newer. This means we have some code duplication.
It also means that we only compile the 10.6 code for QCoreWlanEngine when the
deploymen target is 10.6.

The 10.6 version file should be removed once we drop support for Snow Leopard.

Change-Id: I07284a2579ba127abdca660ad4b8573576756399
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
8 years agoKeep web fontdata alive as long as CG uses it
Allan Sandfeld Jensen [Tue, 29 Oct 2013 10:52:43 +0000 (11:52 +0100)]
Keep web fontdata alive as long as CG uses it

With OS X 10.9 font decoding appears to happen lazily, this means we
have to ensure the data we provide CG is kept alive until CG dereferences
it itself.

Backport of 89ab2671051671ecf440ba480caf0b6b6768b1a9

Change-Id: I29d5bf9d6efac4668ea2c85fa5393ed1c1e621b5
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
8 years agoFix resetting of string properties.
Friedemann Kleint [Tue, 22 Oct 2013 14:52:21 +0000 (16:52 +0200)]
Fix resetting of string properties.

Task-number: QTBUG-34171
Change-Id: Ib5fe8194d891eb999e41bafde19834be56c84103
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
(cherry picked from qttools/78d8ee2513bdf52da2e0141be93dfe7bab8a1488)

8 years agoBlackBerry: improve BPS event lifetime management
Jonathan Hoffmann [Thu, 12 Sep 2013 15:36:30 +0000 (11:36 -0400)]
BlackBerry: improve BPS event lifetime management

In QEventDispatcherBlackberry::select(), if an event handler called
through filterEvent() starts a nested event loop by creating a new
QEventLoop, we will recursively enter the select() method again.
However, each time bps_get_event() is called, it destroys the last
event it handed out before returning the next event.  We don't want it
to destroy the event that triggered the nested event loop, since there
may still be more handlers that need to get that event, once the
nested event loop is done and control returns to the outer event loop.

So we move an event to a holding channel, which takes ownership of the
event.  Putting the event on our own channel allows us to manage when
it is destroyed, keeping it alive until we know we are done with it.
Each recursive call of this function needs to have it's own holding
channel, since a channel is a queue, not a stack.

However, a recursive call into the select() method happens very rarely
compared to the many times this method is called.  We don't want to
create a holding channel for each time this method is called, only
when it is called recursively.  Thus we have the instance variable
d->holding_channel to use in the common case.  We keep track of
recursive calls with d->loop_level.  If we are in a recursive call,
then we create a new holding channel for this run.

Backport from qtbase/5cc76dae7e985a7a39d839524dc8ad6475e597f3

Change-Id: Ib3584676d2db5a9a3754a1535d5fb6c9e14f5dbc
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
8 years agonetwork: fix multi-phased NTLM authentication
Peter Hartmann [Fri, 25 Oct 2013 08:56:01 +0000 (10:56 +0200)]
network: fix multi-phased NTLM authentication

tested manually with internal NTLM proxy.

Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com>
(cherry picked from commit 338da730e8bc23e227e26b094cba6bb6233c42de)

Change-Id: I889056545b60deccf55053c2b41ecb1ea0cba62d
Reviewed-by: Richard J. Moore <rich@kde.org>
8 years agoRevert "Return the correct system font on OS X Mavericks."
Jake Petroules [Wed, 30 Oct 2013 00:05:59 +0000 (01:05 +0100)]
Revert "Return the correct system font on OS X Mavericks."

This fix is broken and a working solution will replace it shortly.

This reverts commit 7c4c43afb36449c9fb2d281327423df8eb916d64

Change-Id: I764e7da6e7a52916b87650483271d9aed099ed2b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
8 years agoQLocale: Update Portuguese and Greek locales data
El Mehdi Fekari [Mon, 28 Oct 2013 16:00:41 +0000 (17:00 +0100)]
QLocale: Update Portuguese and Greek locales data

* Update timeFormat for Portuguese/Brazil locale.
* Update abbreviated day names for Greek locale.

Note: Those locales are already fixed in the recent CLDR v23.1
data used in Qt 5.2.

Change-Id: I351e3a9ae65dcff4ab6b4787242141c3c9d86e24
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
8 years agoQLocale - Fix Mac date format code translation
John Layt [Fri, 25 Oct 2013 20:54:21 +0000 (22:54 +0200)]
QLocale - Fix Mac date format code translation

Mac uses the CLDR format codes which need to be translated into their
Qt equivalent. The existing code mistranslates the year code, is
outdated for a number of new codes introduced in recent versions of
CLDR, and by default accepted any codes it didn't recognize.

This change updates support to the latest version of CLDR, fixes the
treatment of years, and defaults to ignoring any new format codes
added in the future.

Back-ported from qtbase/77dc33dcdbe0eec8ddc9059c4e0ff9dde264c5fa

Task-number: QTBUG-25057

Change-Id: Ide040eca467cfada46fb0e2010db179a76b3096a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>