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

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

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

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

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

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

4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoFix the assert failure in QShortcutMap::find
Gatis Paeglis [Mon, 6 May 2013 12:07:48 +0000 (14:07 +0200)]
Fix the assert failure in QShortcutMap::find

Don't send Qt::Key_unknown down the shortcut handling pipe, because
unknown keys are not part of a shortcut sequence and results in an assert.

Task-number: QTBUG-30871
Change-Id: Idd451fb793bd07124a96d75ed7b936f7ff584f28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
(cherry picked from qtbase/c5a6b894e7484544c44a8a415a84e196c4b633c3)

4 years agoIntroduce Windows version 8.1 and detect by checking the version.
Friedemann Kleint [Thu, 24 Oct 2013 13:05:34 +0000 (15:05 +0200)]
Introduce Windows version 8.1 and detect by checking the version.

Change-Id: I04012218c34f7a95a87fcf2dc7fc095f0e743e67
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
(cherry picked from qtbase/dff6d73d6c37c40790d90bfdf3cb2f6e75c5bfa4)

4 years agoFix compilation of Qt Script with MSVC 2013.
Friedemann Kleint [Thu, 24 Oct 2013 10:54:20 +0000 (13:54 +0300)]
Fix compilation of Qt Script with MSVC 2013.

Starting with MSVC 2013, more functions are provided.

Change-Id: Iabbc9a94e7ed01584baaa1bb17c06e41ac70830f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
(cherry picked from qtscript/24d678ce9c3996f46d1069c2b1193e7ec1083fc8)

4 years agoFix misaligned selection region with text when centered
Jonathan Liu [Tue, 22 Oct 2013 13:28:17 +0000 (00:28 +1100)]
Fix misaligned selection region with text when centered

If the text is centered, the x/y position in the selection QRectF may
be a multiple of 0.5 which is rounded up. This rounding causes
misalignment of the selection region with the text.

The alignment is fixed by using qFloor on the x and y components.

Task-number: QTBUG-34218
Task-number: QTBUG-34234
Change-Id: I4f2fadeb38602f62a93773c6e5faecf03b28069f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
(cherry picked from qtbase/5d8a882c11201a29475c5ea71cfb76c9de6573f5)

4 years agocorrectly fix compilation of NEON_ASM sources
Oswald Buddenhagen [Fri, 18 Oct 2013 09:57:36 +0000 (11:57 +0200)]
correctly fix compilation of NEON_ASM sources

This reverts commit 7a6cee83e15ab8e0b84603d100cafda7a592b126, as
assembler files in SOURCES break compiling with -pch, as we don't create
a respective PCH.

instead, compile assembler code with QMAKE_CC, not QMAKE_CXX.

the reason why this change is needed in the first place is not clear to
me, but i guess that CXX defines some c++-related macros when
preprocessing the file, which breaks further down the line. this is
counter-intuitive, as the g++ frontend should treat the same sources the
same way as the gcc frontend (differences should be limited the the ld
invocation).

(partial cherry-pick from qtbase/77196b9dc3caa7dda1072a64ed953bf7231b1af3)

Task-number: QTBUG-29765
Change-Id: Ic0116b3a5fa621f12ac41cadf3062ff00b538e85
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoFix sigchld-Handler
H. Rittich [Wed, 25 Sep 2013 18:35:18 +0000 (20:35 +0200)]
Fix sigchld-Handler

Changed the sigchld-Handler such that the SA_SIGINFO flag is handeled
correctly. Furthermore the signal mask is preserved such that the original
signal handler is not interrupted when not allowed.

Backport of the patch that was added to qtbase (Qt5) in
  97279d05822a70da1fb3dab083d823a5f5a008fe
also contains the fix from
  f83fa3c95e9ac6badc393c198c8bc08bc45bea96
.

Task-number: QTBUG-32979
Change-Id: Iec7663e7289ea5d95155f52cf8788ebf646cfabd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoProperly paint QListView dragged item in icon mode
Samuel Gaist [Fri, 18 Oct 2013 10:46:05 +0000 (12:46 +0200)]
Properly paint QListView dragged item in icon mode

Currently, when dragging a QListView item in icon mode, only the
item is moved and once out of the view port, the visual feedback is
lost. This patch updates the QDrag pixmap to have a persistent view of
what is moved

Based on Qt 5 c3bf3bd8b74187b44ec91582e1cf2be546a73349

Task-number: QTBUG-1180

[ChangeLog][QtGui][QTBUG-1180] Dragging an item outside the QListView in icon mode doesn't lose the icon.

Change-Id: I9d7fee4c31a4d3d5467510f16fd573635eb6d6f0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
4 years agoWindows: Fix tablet position in relative (mouse) mode.
Arthur Krebsbach [Tue, 8 Oct 2013 15:51:23 +0000 (08:51 -0700)]
Windows: Fix tablet position in relative (mouse) mode.

When in "mouse" or "relative" mode with the pen position information
would not be calculated correctly resulting in a significant offset
between the tablet pen location and the mouse cursor location. Logic
was added to detect when the two were not in sync and use the mouse
location when this happens.

Change-Id: Id3db5f2de0a657a0d072cee95c6b27179ea9182a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
(cherry picked from qtbase/17ebcd2b4690f73c8fd2332b0ba55b3ee3e2e8bb)

4 years agoEnsure lastPixel.y is also initalized to -1 when necessary
Andy Shaw [Tue, 8 Oct 2013 13:45:42 +0000 (15:45 +0200)]
Ensure lastPixel.y is also initalized to -1 when necessary

Task-number: QTBUG-31579

Change-Id: Ia4916ac0d384ea523bbfad0dafbc90044da7ec3e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
(cherry picked from qtbase/f0b950144dde85b65df0c3cf83f7c8df0e94bbbf)

4 years agoAdd missing variables initialization before requesting png offset
Samuel Gaist [Thu, 19 Sep 2013 07:13:25 +0000 (09:13 +0200)]
Add missing variables initialization before requesting png offset

Initialize all values read to sensible default in case reading them
fails.

Qt 5 fix commit 0ab3e290c4808f73d46903a5274929e3833d8d3c

Task-number: QTBUG-32674
Change-Id: I3a120b5673b67f705a4ebec4359aa52e2392492a
Reviewed-by: aavit <eirik.aavitsland@digia.com>
4 years agoconfigure: Update contact information for commercial users
Kai Koehne [Wed, 18 Sep 2013 07:00:39 +0000 (09:00 +0200)]
configure: Update contact information for commercial users

Cherry-picks most of commit ef23f6d9bd in qtbase (qt5).

Change-Id: I8d9e939e3e39d76b41b07ef00d82428950dd4324
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
4 years agoCompilation fix for libjpeg release 9
aavit [Tue, 10 Sep 2013 09:46:51 +0000 (11:46 +0200)]
Compilation fix for libjpeg release 9

In the latest libjpeg version, the "boolean" type is changed so that
true and false no longer can be used instead of TRUE and FALSE.

Also, purge some ancient code remains meant to support a now defunct
OS´s idea about the boolean type.

Task-number: QTBUG-33166
Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
(cherry picked from qtbase/fad6aa619bf6eb048821a58065433f6b598c10e4)

4 years agoRevert "QTBUG-15319: fix shortcuts with secondary Xkb layout."
Gatis Paeglis [Sat, 31 Aug 2013 19:22:47 +0000 (21:22 +0200)]
Revert "QTBUG-15319: fix shortcuts with secondary Xkb layout."

The change which attempted to fix QTBUG-15319 broke keyboard
shortcuts for non latin keyboard layouts.

This patch reverts QTBUG-15319 (f45cdeda8) since it caused a
regression.

Task-number: QTBUG-32908

Change-Id: I47d7984fa7986d5218d1f3ff1fc36d2ec67c9ba7
Reviewed-by: David Faure <david.faure@kdab.com>
4 years agoAdd missing interpolator for unsigned int.
Jan Arve Saether [Tue, 10 Sep 2013 12:14:55 +0000 (14:14 +0200)]
Add missing interpolator for unsigned int.

Note that there are also some missing interpolators for char, short,
long long etc, but those are most likely less common than unsigned int.

Task-number: QTBUG-33268

Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
(cherry picked from qtbase/09da1f7d1f04f51eca4dc11add2854355fad6cd4)

Change-Id: Ieae8c5f66dab0f997522ea7e7990485ecde33e27
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
4 years agoFix layouts with expanding items with maximum size
Paul Olav Tvete [Tue, 27 Aug 2013 12:47:55 +0000 (14:47 +0200)]
Fix layouts with expanding items with maximum size

Layout items with a Preferred size policy would be treated as fixed
size if they were in the same layout as an Expanding item (or one with
a stretch factor).

This occurred e.g. if a layout was configured similar to this:
1. One item with ExpandFlag/stretch but with a maximumSize set,
   e.g. (100x100).
2. Another item with 'just' GrowFlag, and a maximum size bigger than
   its  size hint.

If the above layout was resized to e.g. (200x50) it would cause the
expanding item to correctly get the size (100x50), but the 'growing'
item would not stretch beyond its size hint.
Instead, it would distribute space around both items, behaving as if
the 'growing' item was fixed'.

The expected behavior is to continue to grow the 'growing' item after
the expanding item has reached its size limit.

Task-number: QTBUG-33104

Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
(cherry picked from qtbase/b855e578044e49b588b32085968c63a910b9daae)

Change-Id: I943f1effd53fc7adc19824ce0747443797a0a235
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
4 years agoTest layout engine fundamentals
Paul Olav Tvete [Tue, 27 Aug 2013 11:29:48 +0000 (13:29 +0200)]
Test layout engine fundamentals

Done with Jan Arve

Task-number: QTBUG-33104

Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
(cherry picked from qtbase/f3c019649ba99844b743a4b2ceb838aba86e7070)

Change-Id: I9bd761ea8c4de032b5a83a63ad65536697e80220
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
4 years agoFix compile when QT_NO_WARNING_OUTPUT defined without QT_NO_DEBUG_STREAM
Jonathan Liu [Tue, 3 Sep 2013 05:54:16 +0000 (15:54 +1000)]
Fix compile when QT_NO_WARNING_OUTPUT defined without QT_NO_DEBUG_STREAM

qWarning is forward declared as returning QDebug when QT_NO_DEBUG_STREAM
is not defined. This conflicts with the declaration of qWarning
returning QNoDebug when QT_NO_WARNING_OUTPUT is defined.

Avoid forward declaration of qWarning when QT_NO_WARNING_OUTPUT is not
defined to fix compilation.

This does not apply to Qt 5.

Task-number: QTBUG-33301
Change-Id: Ia4750cd63ac404700aedc36f07e5516d4163e9d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoWindows: Introduce QFileDialog::DontUseCustomDirectoryIcons
Sergio Martins [Wed, 29 May 2013 11:04:55 +0000 (12:04 +0100)]
Windows: Introduce QFileDialog::DontUseCustomDirectoryIcons

Folders can have a custom icon, set by the user. Some system
folders also have one, for example c:\windows\fonts.

This option allows you to disable this behavior, you'll get the
folder directory icon.

As a side-effect, you'll get a very big performance improvement
on removable/network media: 2 seconds vs 60 seconds on a SDCard
with 10000 folders.

Unlike in Qt5, here we didn't add new methods to QFileIconProvider
do avoid introducing new symbols.

Change-Id: I0b98a180e53c9ee7d583f19b3917fcc9166cb3eb
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from qtbase/46685f755b01288fd53c4483cb97a22c426a57f0)
(cherry picked from qtbase/149f3efc39bebbe8fceacf2553836f90d2e1c383)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoDoc: update Project Options section in qmake Manual
Leena Miettinen [Thu, 22 Aug 2013 13:25:29 +0000 (15:25 +0200)]
Doc: update Project Options section in qmake Manual

Explain which mkspecs have the configuration option
precompile_header set.

Task-number: QTBUG-25683

Change-Id: I9b11eafad16b65523cbb90897fe88829add58bea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/ad4bda8b754a5fb4f7c6d5c4c3b941579df83c41)

4 years agoRemove duplicated contexts in qt_de.ts
Friedemann Kleint [Tue, 3 Sep 2013 14:57:44 +0000 (16:57 +0200)]
Remove duplicated contexts in qt_de.ts

Task-number: QTBUG-33271

Change-Id: I09fb79d2c55078445e3b91530984c46a1bd721c0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoDoc: update description of qmake SUBDIRS variable
Leena Miettinen [Mon, 26 Aug 2013 08:13:13 +0000 (10:13 +0200)]
Doc: update description of qmake SUBDIRS variable

You can specify a relative path to a .pro file in any directory.

Fixed a capitalization issue and a grammar issue and changed the
visible text in a link target.

Task-number: QTBUG-14139
Change-Id: Ib476bd400c46645709950c582492edcaaba9d7ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtbase/31e665c7cd9b2edb25fa695bed9c528c95ad0c64)

4 years agoFix QOleDropTarget object leak
Jian Liang [Fri, 30 Aug 2013 01:41:44 +0000 (09:41 +0800)]
Fix QOleDropTarget object leak

1) call Release() to nativeExtra->dropTraget in
QWidgetPrivate::unregisterOleDnd() to prevent leak

2) call RevokeDragDrop() in QWidgetPrivate::setParent_sys() when the old
window handle is to be destroyed and the current widget has already
registered an ole drop target object to prevent leak

Change-Id: I767f4e0ea3e6cb5f14d72ba88e1f8f1bc8c0dc3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoAdd Q_ASSERT in qAllocMore() function.
Leonard Lee [Mon, 19 Aug 2013 09:13:55 +0000 (11:13 +0200)]
Add Q_ASSERT in qAllocMore() function.

The negative range test is no longer needed in QByteArray's autotest.

Task-number: QTBUG-33038
Change-Id: I4d77e78e485b3b64a31dffd99b9fe2c14420d0a2
(partial cherry picked from qtbase commit fb8be9905d5f3216edc3fbb72b8ce1c380737eac)
(partial cherry picked from qtbase commit 0ed3cf2a1c487387bbc958317c791c9c53cf5a16)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoFix crash in QProcess::waitForStarted() on Unix.
Christian Strømme [Tue, 13 Aug 2013 11:20:05 +0000 (13:20 +0200)]
Fix crash in QProcess::waitForStarted() on Unix.

Invoking waitForStarted() on a QProcess before or after an unsuccessful
call to start() (e.g., with an empty command), would execute FD_SET with
an invalid file descriptor and cause the process to abort.
The bug can be reliably reproduced on OSX.

(cherry-picked from qtbase commit c8d9b17367cfdcb034d11f8a168ca4ae3993e7c3)
Task-number: QTBUG-32958
Change-Id: Id25b7781168489281645e21571361ca1a71d43e3
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
4 years agoSun CC: Fix QtNetwork compilation
Sergio Ahumada [Wed, 31 Jul 2013 09:53:41 +0000 (11:53 +0200)]
Sun CC: Fix QtNetwork compilation

Change QT_SOCKLEN_T from int to socklen_t

Change-Id: I3f93230f36c9af1a709e3ff301a63d18e1e02b4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
4 years agoBlackBerry: Fixed cover mode
Bernd Weimer [Wed, 21 Aug 2013 12:29:45 +0000 (14:29 +0200)]
BlackBerry: Fixed cover mode

When the application is minimized a "thumbnail" version of the current
screen is displayed. The windows were hidden before the navigator could
capture a screenshot, so the cover was just black. This fix avoids that.

In Qt5 "setVisible" doesnt't get called, so it's not a problem there.

Change-Id: I4b657e75afcab03b8b100ac5dd41807e2ce9ef33
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
4 years agoFix scrollbar appearance on Win8
J-P Nurmi [Thu, 22 Aug 2013 19:51:48 +0000 (21:51 +0200)]
Fix scrollbar appearance on Win8

(Cherry-picked from qtbase/61948f84da12432b9b8b178875a86f54fef12e32)

Task-number: QTBUG-26503
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Change-Id: I1ff92e9f2825e9c0171dbbf5425bb2c997d9cf5a

4 years agoOSX: Disable window restoration for the Mac font panel
Liang Qi [Tue, 6 Aug 2013 05:38:11 +0000 (07:38 +0200)]
OSX: Disable window restoration for the Mac font panel

because if it is automatically restored it's out of the application's
control, so the user's interaction will be ignored.  Change
I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows
by default, but the dialog helpers generate windows which aren't
affected by that.

Change-Id: I46ce3f85ee0c11dca778eb663c87774e322d6b6b
(cherry-picked from qtbase commit c9182bc11b77675405941a0a163603cac064d8bc)
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
4 years agoOSX: Disable window restoration for the Mac color panel
Liang Qi [Tue, 6 Aug 2013 05:37:02 +0000 (07:37 +0200)]
OSX: Disable window restoration for the Mac color panel

because if it is automatically restored it's out of the application's
control, so the user's interaction will be ignored.  Change
I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows
by default, but the dialog helpers generate windows which aren't
affected by that.

Task-number: QTBUG-31750
Change-Id: Ida063f2d36ab038af5e85de7dfa2acf61cb6dda2
(cherry-picked from qtbase commit 69554e458669c941130c2dc03d42a59ffd00e39e)
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
4 years agoUpdate for OS X Mavericks.
Jake Petroules [Wed, 21 Aug 2013 15:01:16 +0000 (11:01 -0400)]
Update for OS X Mavericks.

(Qt 4 equivalent of qtbase/bd97768ae54d643270e824f74d152892dbea1b9f)

Change-Id: I7ecebd2e185d61a0baeb5b47b802c2f760edeff3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoFix unused private field warning in QMacMime.
Jake Petroules [Wed, 21 Aug 2013 14:33:32 +0000 (10:33 -0400)]
Fix unused private field warning in QMacMime.

Does not apply to Qt 5.

Change-Id: Ia1e5c5d8813a2285dd80189f7264d959ea8056c1
Reviewed-by: David Faure (KDE) <faure@kde.org>
4 years agoDoc: Update description of qmake LIBS variable
Leena Miettinen [Wed, 21 Aug 2013 13:02:06 +0000 (15:02 +0200)]
Doc: Update description of qmake LIBS variable

Rewrite the note about specifying libraries on Windows
to make it clearer and change the library name to match the
one in the snippet.

Task-number: QTBUG-30229

Change-Id: I55c5579f5ead2fadc5d75baa2172b03f20c9f689
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoUse correct mask constant in the Windows event dispatcher.
Friedemann Kleint [Mon, 19 Aug 2013 14:14:01 +0000 (16:14 +0200)]
Use correct mask constant in the Windows event dispatcher.

Mask out QS_TOUCH, QS_POINTER when running a VS2012-compiled binary
on pre-Windows 8 systems.

Task-number: QTBUG-32257
Task-number: QTBUG-28513
Task-number: QTBUG-29097
Task-number: QTBUG-29435
Task-number: QTBUG-18852
Change-Id: I33ce3a659a234cb04d3b5ae9d668d193d681be7f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/54f1d7e2e48b896755aa930ee7e4ecacf51bf977)

4 years agoRevert "Disable precision timers when running MSVC2012 code on pre-Windows 8."
Friedemann Kleint [Tue, 20 Aug 2013 10:34:13 +0000 (12:34 +0200)]
Revert "Disable precision timers when running MSVC2012 code on pre-Windows 8."

This reverts commit aea654b84713b8085ee0a291e3325b1ca53080aa.

Follow-up commit will fix the issue.

Task-number: QTBUG-18852
Task-number: QTBUG-27266
Change-Id: Iadbae6b94de6e47e0b9bf428f57b63ffa286e382
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoOnly release when there is no lock on the object
Andy Shaw [Wed, 14 Aug 2013 08:35:39 +0000 (10:35 +0200)]
Only release when there is no lock on the object

When the widget was unregistered for drag and drop then it would call
Release() on the dropTarget before doing anything else. If the widget
itself did not have a handle then this was not a problem. However in the
case of a widget with a handle then it would call Release() before
the lock on the dropTarget was released which would cause it to crash.

Therefore it is moved so that it is called after the lock is released
to ensure it can be released correctly.

Task-number: QTBUG-13237

Change-Id: Iaec3eb8be3a4ea988218012e973f69cbcdcc45de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoexecute some loops even in cumulative mode
Oswald Buddenhagen [Fri, 9 Aug 2013 10:17:11 +0000 (12:17 +0200)]
execute some loops even in cumulative mode

we execute foreach loops now. this is (mostly) safe nowadays, because
a previous change added precautions against exponential value list
growth, so it's unlikely that two nested loops would keep the cpu busy
for a day as before.

we continue to exclude forever loops and loops with excessive integer
counts.

Task-number: QTBUG-8550
Change-Id: Iaa116086986cc7fd5023834753f791dd205102e5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/dd4d594c787a62fa8aa12695c5d115c71b59bacd)

4 years agoDo not send clipboard message to application under debugger.
Friedemann Kleint [Tue, 26 Feb 2013 13:31:01 +0000 (14:31 +0100)]
Do not send clipboard message to application under debugger.

Fix Qt Creator hang when copying a stack trace from an
application showing a runtime assert.

Change-Id: I874bd48643ebce1a3551644dc850cb7cf5869522
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qtbase/333817b9cf1304cca7c1dbd45880115cd128f60e)

4 years agoSun CC: Fix QFileDialog compilation
Sergio Ahumada [Wed, 31 Jul 2013 11:03:07 +0000 (13:03 +0200)]
Sun CC: Fix QFileDialog compilation

Only use the old getpwnam_r() function when _POSIX_C_SOURCE is
defined.

Task-number: QTBUG-21451
Change-Id: I6bfc4c9f784616fc08866542c34ed71ab69559e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agogdb_dwarf_index: Use a sed call that's more POSIX-compliant.
Raphael Kubo da Costa [Sun, 11 Aug 2013 12:08:48 +0000 (15:08 +0300)]
gdb_dwarf_index: Use a sed call that's more POSIX-compliant.

sed versions other than the GNU one often default to being POSIX-compliant,
in which case "+" (with and without escaping) is always an ordinary
character.

Achieve the same functionality in a way that works with both GNU and BSD
seds by using "xx*" insted of "x\+".

Cherry-picked from qtbase/faea8d1056e4b034404febd0ef44a00e7784018d.

Change-Id: I462e070992ff214a7261d45c208f2e5f3e962e8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agolupdate: Fixing decoding of QML files
El Mehdi Fekari [Fri, 26 Jul 2013 10:29:37 +0000 (12:29 +0200)]
lupdate: Fixing decoding of QML files

Decode text stream from QML files as UTF-8 even when the latter
is not the default system encoding (QML supports UTF-8 only).

Cherry picked from qttools/441f3d964301942e417b238b6e71

Change-Id: I9cc75854ffb610deccba6c7d3c8ddaf61f6da120
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agorestore QProcessEnvironment shared data thread safety on unix
Oswald Buddenhagen [Fri, 19 Apr 2013 16:11:05 +0000 (18:11 +0200)]
restore QProcessEnvironment shared data thread safety on unix

implicit sharing together with 'mutable' is a time bomb.

we need to protect the nameMap, because concurrent "reads" may try to
insert into the hash, which would go boom.
we need to protect the key/value of Hash objects, because while the
refcounting is atomic, the d pointer assignments are not, which would
also go boom.

we can simply use a QMutex to protect the whole environment, because it
is very cheap in the uncontended case.

Task-number: QTBUG-30779
Change-Id: Iaad5720041ca06691d75eb9c6c0e1c120d4a7b46
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qtbase/85e61297f7b02297641826332dbdbc845a88c34b)

4 years agofix namespaced build
Oswald Buddenhagen [Fri, 19 Apr 2013 16:11:12 +0000 (18:11 +0200)]
fix namespaced build

Change-Id: I9d0a3cb08de5e91807da7f0358c83b6693ebd1ea
Reviewed-by: hjk <hjk121@nokiamail.com>
(cherry picked from qtbase/da55d48ad731ee2499467b3e93e11eb3b53df89d)

4 years agoMac: make windows not restorable on 10.7 and later
Liang Qi [Tue, 6 Aug 2013 05:34:45 +0000 (07:34 +0200)]
Mac: make windows not restorable on 10.7 and later

The default value for NSWindow::setRestorable: is true, it means
application will have some information for each window stored.
After a crash happened and application relaunched, the application
tries to restore those windows from the broken file. And then the
"Retore Windows" will pop up. There is no workaround for
application users or develoeprs. What they can do is to manually
remove the the saved application state file for the application.

To avoid that, better to switch it off.

Task-number: QTBUG-28281
Change-Id: I4cc81b51b157139ff5e299e85a9bbce05f544219
(cherry-modified from qtbase commit 2aef22b77aa15eb0863a9585af77ccab04425dbd)
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
4 years agoRemove OS X unsupported warning.
Jake Petroules [Sat, 10 Aug 2013 06:49:46 +0000 (02:49 -0400)]
Remove OS X unsupported warning.

No other platform has such a warning and it really is not important.

Change-Id: I70185dff6b0fad11c7a767f787679dc53d04ecc7
(backported from qtbase/cd17b500a85b34c16ff8f4212cf2ff35715040ba)
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoAccessibility: ComboBoxes should expose their line edits as text
Frederik Gladhorn [Thu, 18 Jul 2013 09:53:18 +0000 (11:53 +0200)]
Accessibility: ComboBoxes should expose their line edits as text

Change-Id: I6617635544c5b77f3768df949589bb91d08db33c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
4 years ago[WK1] NPStream::headers not initialized
Allan Sandfeld Jensen [Fri, 9 Aug 2013 08:02:38 +0000 (10:02 +0200)]
[WK1] NPStream::headers not initialized

https://bugs.webkit.org/show_bug.cgi?id=119574

Reviewed by Alexey Proskuryakov.

Initialize the header field. According to user feedback that should solve some
cases of random crashes when loading plugins on Mac and Windows.

* plugins/PluginStream.cpp:
(WebCore::PluginStream::PluginStream):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153828 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Task-number: QTBUG-32181
Change-Id: I45410e618cf0337ac1b2c8c4bafa572e8e1e0d19
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoAdd offset reading support in pnghandler
Samuel Gaist [Thu, 8 Aug 2013 12:32:51 +0000 (14:32 +0200)]
Add offset reading support in pnghandler

This patch adds the offset reading that matches the offset writing in
writeImage

Qt 5 fix commit 0b62a5d3c931aa4d91b986ec518567e9463a6360

Task-number: QTBUG-32674
Change-Id: I64f7e31049834ecbd052a061b79d3ed97e60e063
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
4 years agoLink to correct function in QApplication documentation.
Mitch Curtis [Wed, 7 Aug 2013 07:42:02 +0000 (09:42 +0200)]
Link to correct function in QApplication documentation.

Task-number: QTBUG-26123
Change-Id: Ieb15aac13b27cdbf6a2dfd7c157c366c07e9fb39
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
4 years agoRevert ea6ec4c781d5e94425b70f9f4e45d3e50eb12299
Albert Astals Cid [Wed, 7 Aug 2013 18:15:43 +0000 (20:15 +0200)]
Revert ea6ec4c781d5e94425b70f9f4e45d3e50eb12299

It has been discovered it changes the behavior of qdbuscpp2xml
resulting in builds of some apps breaking. Even if the
behavior is more correct, such behavior change in a stable branch is
not acceptable

Change-Id: I94826b06861188455779ee22218685951f0f8d6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoInclude <new> instead of <ciso646> for libc++ detection.
Raphael Kubo da Costa [Mon, 5 Aug 2013 19:49:09 +0000 (22:49 +0300)]
Include <new> instead of <ciso646> for libc++ detection.

As usual, MSVC does things differently and its ciso646 header does
unexpected things, like #define'ing xor and causing all sorts of breakages.

Include <new> instead: it should be as inocuous as ciso646 should have been.

No backport because Qt5 does not have QT_NO_STL.

Task-number: QTBUG-32773
Change-Id: I01a48ec2c726367e9498aeec4efb42f49d68bbe4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoRemove a left over cast that is now semantically incorrect.
Jake Petroules [Mon, 29 Jul 2013 18:51:54 +0000 (14:51 -0400)]
Remove a left over cast that is now semantically incorrect.

CFPropertyListRef is a typedef for void*, which is why this code was
compiling OK prior to this change.

Change-Id: I67f2affeeb97459f85eedc8becb5d963557d34c3
(cherry-picked from qtbase commit fb25d6c7f6690402060027422343957c7d8ee718)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoMake sure to also check for null CFPropertyLists.
Thiago Macieira [Thu, 18 Apr 2013 21:41:50 +0000 (14:41 -0700)]
Make sure to also check for null CFPropertyLists.

In 1b08e0307dfebe561fbb0819a2d6b53edd8e8e93, I removed the null check
by accident. It's possible for the Darwin API to return a null
property list.

Task-number: QTBUG-30760
Change-Id: Iaf0125767fe4b47c19810b70483a5219e94e4305
(cherry-picked from qtbase commit 96134c6f585963c9d449db17589f21e67519a2a8)
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
4 years agoDon't assume that all CFPropertyListRef are CFArrayRefs
Thiago Macieira [Thu, 21 Feb 2013 01:53:39 +0000 (17:53 -0800)]
Don't assume that all CFPropertyListRef are CFArrayRefs

We might need more robust code in the future. But at least for this case
it looks like a CFStringRef is also a possibility.

Task-number: QTBUG-29776
Change-Id: Iaf50835122fcbb7e6e9c7fbf65e31e6143b2bc54
(cherry-picked from qtbase commit 1b08e0307dfebe561fbb0819a2d6b53edd8e8e93)
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoMake libtiff link on OS X 10.9.
Jake Petroules [Mon, 5 Aug 2013 14:06:35 +0000 (10:06 -0400)]
Make libtiff link on OS X 10.9.

Backport of Ie6f8639fb920e57289c7d0ad8952603abcfe7377.

Change-Id: I9d0cd625734fda88a9564d4fef7b1f5e9f22c774
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoReturn the correct system font on OS X Mavericks.
Jake Petroules [Mon, 5 Aug 2013 13:55:35 +0000 (09:55 -0400)]
Return the correct system font on OS X Mavericks.

Also prints a warning if other private system fonts are encountered.

Task-number: QTBUG-32789
Change-Id: I04e1471d25119caddb587972561e98defb1ffda1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
4 years agoFix double transform for items ignoring parent transformations.
Andreas Aardal Hanssen [Mon, 29 Jul 2013 21:11:14 +0000 (23:11 +0200)]
Fix double transform for items ignoring parent transformations.

Previously, the topmost untransformable's scene transform, which
includes the item's position and local transformation, was used to
determine the item's anchoring position. This position was then
passed on to be multiplied by the item's transform again. This
works fine for toplevel untransformable items that don't have any
transform set at all, but those who do would have their transforms
applied twice - one to determine the anchoring position, and again
to transform the item itself. Since only translation transformations
can affect the first operation (the anchoring pos), this bug only
applies to items that set ItemIgnoresTransformations and use a
local transform that includes translation.

Task-number: QTBUG-21618
Change-Id: I3f3c4f2357e2ca6cd0c75cb5b7e428c0803d9e73
Reviewed-by: Alexis Menard <alexis@webkit.org>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
4 years agoFix QListWidget item widget scroll bug
Samuel Gaist [Mon, 5 Aug 2013 09:39:15 +0000 (11:39 +0200)]
Fix QListWidget item widget scroll bug

This fix applies the patch uploaded in the bug report. The patch was
provided by Qt-Commercial support but seems to have never found it's
way to the sources although the bug was fixed in Qt 5.

Task-number: QTBUG-27043
Change-Id: I41c5a7b8f3698bb4396046e5e74863e090ba185a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
4 years agoFix build regression caused by 7b7c321d5f35b6ee70db5a72d5d37e19e125d7cf.
Jake Petroules [Fri, 2 Aug 2013 21:44:15 +0000 (17:44 -0400)]
Fix build regression caused by 7b7c321d5f35b6ee70db5a72d5d37e19e125d7cf.

Change-Id: I54f4e0ca2ca677a41c22183263931c9d65896168
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoQHttpMultiPart: fix data corruption in readData method
Peter Hartmann [Thu, 25 Jul 2013 16:05:29 +0000 (12:05 -0400)]
QHttpMultiPart: fix data corruption in readData method

When readData() is called repeatedly, we need to keep track which
part of the multipart message we are currently reading from.
Hereby we also need to take the boundary size into account, and not
only the size of the multipart; otherwise we would skip a not
completely read part. This would then later lead to advancing the
read pointer by negative indexes and data loss.

Task-number: QTBUG-32534
Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
(cherry picked from qtbase/af96c6fed931564c95037539f07e9c8e33c69529)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoChange QDBusPendingCallPrivate to full reference counting for deletion.
Peter Seiderer [Mon, 17 Jun 2013 20:44:30 +0000 (22:44 +0200)]
Change QDBusPendingCallPrivate to full reference counting for deletion.

Fixes race between QDBusConnectionPrivate::processFinishedCall()
releasing the mutex before emitting signals (using various members of
QDBusPendingCallPrivate) and deletion of the QDBusPendingCallPrivate
object through QDBusPendingCall::d's destructor (a member of type
QExplicitlySharedDataPointer<QDBusPendingCallPrivate>) leeds to
segmentation fault with CrashTest example on slow/single core
arm cpu).

Task-number: QTBUG-27809
Change-Id: I3590d74d1cfa5816ede764b50b83a7008ec780ff
(cherry-picked from qtbase commit 6c21f42657b494e24112c90d8b9fff719f1f8791)
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoRemove QDBusPendingCallPrivate::autoDelete logic.
Peter Seiderer [Mon, 17 Jun 2013 18:56:08 +0000 (20:56 +0200)]
Remove QDBusPendingCallPrivate::autoDelete logic.

First step to fix race condition about deleting QDBusPendingCallPrivate.

In a multithreaded application on a slow/single core cpu the following
race (and segmentation fault) can occur:

First thread A is running:
A:  QDBusPendingReply<> reply = pi->asyncCallWithArgumentList(method, argumentList);

Then when the dbus answer arrives thread B will call:

B:  QDBusConnectionPrivate::processFinishedCall()
B:      ...
B:      locker.unlock()

and runs until here, go on with thread A:

A:  reply.waitForFinished();
A:    QDBusPendingCallPrivate::waitForFinished()
A:    {
A:        QMutexLocker locker(&mutex);
A:        if (replyMessage.type() != QDBusMessage::InvalidMessage)
A:            return;

which returns immediately (mutex acquired, replyMessage alread set), now
reply goes out of scope (destructor called) and QDBusPendingCall::d's
destructor of type QExplicitlySharedDataPointer<QDBusPendingCallPrivate>
deletes the reference counted object QDBusPendingCallPrivate.

Now thread B continues, still in processFinishedCall()

B:      if (call->watcherHelper)
B:          call->watcherHelper->emitSignals(msg, call->sentMessage);
B:
B:      if (msg.type() == QDBusMessage::ErrorMessage)
B:          emit connection->callWithCallbackFailed(QDBusError(msg),
B:              call->sentMessage);

accessing alread deleted object QDBusPendingCallPrivate via call->...

Fixed QDBusPendingCallPrivate deletion by proper reference counting
will be done in the next commit.

Task-number: QTBUG-27809
Change-Id: I15b3f0242471b62eaafadc763fb6a33339ff2fe1
(cherry-picked from qtbase commit 72ecf5a7ecb688a7e19cbc2f70e358a94d02edf7)
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoFix unprotected access to QDBusPendingCallPrivate::pending.
Peter Seiderer [Mon, 17 Jun 2013 18:17:08 +0000 (20:17 +0200)]
Fix unprotected access to QDBusPendingCallPrivate::pending.

In QDBusConnectionPrivate::waitForFinished() pcall->pending was used
after the protection by pcall->mutex was released. A simultaneous
call to QDBusConnectionPrivate::processFinishedCall() was able
to reset pcall->pending to null before it was used for the
q_dbus_pending_call_block(pcall->pending) call.

Fixed by releasing (and setting to 0) of pcall->pending in
processFinishedCall() only in case no one is waiting yet, otherwise
release pcall->pending by the first thread waiting in waitForFinished().

There is still a race condition about deleting QDBusPendingCallPrivate
(too early) which will be fixed in the next two commits.

Task-number: QTBUG-27809
Change-Id: I040173810ad90653fe1bd1915f22d8dd70d47d8c
(cherry-picked from qtbase commit 64e3bd481e5d54d555959ceecbd5c4576c571241)
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoQDBusPendingCall: add a missing QWaitCondition::wakeAll() call
Marc Mutz [Fri, 24 Aug 2012 08:27:02 +0000 (10:27 +0200)]
QDBusPendingCall: add a missing QWaitCondition::wakeAll() call

In QDBusConnectionPrivate::waitForFinished(), threads that see
pcall->waitingForFinished == true go to sleep on
pcall->waitForFinishedCondition, but there was no call to
waitForFinishedCondition.wakeAll() anywhere in the code, so add it.

Change-Id: I8d068dc0cc4f20786eb40fd7e2bb9840d8b70c7f
(cherry-picked from qtbase commit 20d7763b19400c062a07f440cc601f486be4039b)
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoDon't crash if the relayed signal was emitted from the wrong thread
Thiago Macieira [Sun, 23 Jun 2013 23:39:56 +0000 (16:39 -0700)]
Don't crash if the relayed signal was emitted from the wrong thread

Under normal circumstances, this should never happen. Signals exported
to D-Bus should only be emitted from the object's own thread. That's the
only way for the receiver (the QDBusAdaptorConnector object) to know
what the sender object and signal were. If they are emitted from another
thread, the sender will be null.

Task-number: QTBUG-31932
Change-Id: Ia5a45d648985e0645bffd4abc0881fca9da64f79
(cherry-picked from qtbase commit d94961d08f91696824d9035f666af5fe28d59ef6)
Reviewed-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoRemove Nokia reference in Qt Test documentation
Sergio Ahumada [Fri, 2 Aug 2013 11:10:04 +0000 (13:10 +0200)]
Remove Nokia reference in Qt Test documentation

Task-number: QTBUG-29307
Change-Id: I00d7faa32058a74955f57296dad900f150dbbf6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
4 years agoconfigure: Add QtConcurrent support for Sun CC 5.1x
Sergio Ahumada [Wed, 31 Jul 2013 11:18:15 +0000 (13:18 +0200)]
configure: Add QtConcurrent support for Sun CC 5.1x

It compiles and demos run without crashing.

Change-Id: I570a0855ec4fc5673e45580bfdbc387cf86680d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years ago[Qt][WK1] navigator.plugins shows too few entries.
Michael Brüning [Wed, 31 Jul 2013 13:38:05 +0000 (15:38 +0200)]
[Qt][WK1] navigator.plugins shows too few entries.

Backport r153517 from webkit trunk and Qt 5 to Qt 4.8.

https://bugs.webkit.org/show_bug.cgi?id=119332

Reviewed by Jocelyn Turcotte.

Based on input by Choon Sik Cho.

WebPlatformStrategies::getPluginInfo was using the
WTF::Vector::resize method wrongly.

This patch removes the call to Vector::resize as
Vector::append will take care of increasing capacity
if needed.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::getPluginInfo):

Task-Number: QTBUG-30141
Change-Id: Ief250ee98c4c5d2cb5165d6da3d7b43c54cbd7c8
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
4 years agoExpose invokables that are not slots in the xml
Albert Astals Cid [Wed, 31 Jul 2013 08:37:37 +0000 (10:37 +0200)]
Expose invokables that are not slots in the xml

Without it the invocations were working but were not listed on introspection

Backported from Qt5: qtbase commit c3f485c5250a503832e767e1fe5e40595126f6c5

Change-Id: Ie62f7dc3577f52b6888ddebf0392fdf51f2845a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoQNX: adapt SSL lib file name lookup heuristics
Peter Hartmann [Mon, 22 Jul 2013 15:41:47 +0000 (17:41 +0200)]
QNX: adapt SSL lib file name lookup heuristics

I.e. do not try to load file names that are not there anyhow. The
code would search for libcrypto.so.1.0.0 and libssl.so.1.0.0, while
on QNX the libs are called libcrypto.so and libssl.so, and there
are no symlinks with version numbers.

This saves ~ 45 ms in real apps (tested with Facebook, Twitter and
Foursquare), and ~ 24 ms at app startup in an isolated app without
GUI (difference maybe because threads are fighting for CPU or so).

Task-number: QTBUG-32548
(backport of commit 69b31f7b657a7ca611ad980c2974597de160598c)

Change-Id: I33e1c9e2c490b9c7f94aca06add8dc183cce083d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoSun CC 5.10 supports Template-Template Parameters
Sergio Ahumada [Tue, 30 Jul 2013 11:33:58 +0000 (13:33 +0200)]
Sun CC 5.10 supports Template-Template Parameters

See http://www.oracle.com/technetwork/systems/cccompare-137792.html

Task-number: QTBUG-18879
Change-Id: Icb08771527a718c1ce4f0919116c3834cf979be4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
4 years agoChange domain used in cpp-extensions-example.
Friedemann Kleint [Thu, 18 Jul 2013 10:39:32 +0000 (12:39 +0200)]
Change domain used in cpp-extensions-example.

Task-number: QTBUG-32390
Change-Id: I373183e096390bd1564c2d263190fb9063a733a2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
(cherry picked from qtquick1/cb9d1a61b127030562a206c0142d99997eb82c8e)
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
4 years agoDocumentation: Remove references to Nokia and obsolete QSA-product.
Friedemann Kleint [Thu, 11 Jul 2013 13:08:14 +0000 (15:08 +0200)]
Documentation: Remove references to Nokia and obsolete QSA-product.

Change-Id: I427e1b98fd196686f44f3862167f90252e8d665e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
(cherry picked from qtactiveqt/35e1b7dd8fef475a6bf7daf4067bae08dd635c11)
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>