4 years ago[QtSql][QSqlTableModel] fix failure to refresh in selectRow()
Mark Brand [Fri, 25 Apr 2014 15:55:04 +0000 (17:55 +0200)]
[QtSql][QSqlTableModel] fix failure to refresh in selectRow()

Caused by missing braces, leaving the break outside the scope of the if clause.

Task-number: QTBUG-38509
Change-Id: I6b0a7f34512a3a9b0fbd790116f81f54f4a91cf0
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoFix identical sub-expressions in comparison
Konstantin Ritt [Fri, 18 Apr 2014 13:10:00 +0000 (16:10 +0300)]
Fix identical sub-expressions in comparison

Found by static analyzer (see http://www.viva64.com/en/b/0251/).

Change-Id: I611def790a98abf7574e96e6039f10714316d81e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
4 years agoRemove old symbols from QOpenGLContext
Laszlo Agocs [Thu, 24 Apr 2014 15:13:40 +0000 (17:13 +0200)]
Remove old symbols from QOpenGLContext

Task-number: QTBUG-38564
Change-Id: I39a0482e4411cdc644ed34813626c39dacb5b6af
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
4 years agoCocoa: Fix crash on Combobox popup close.
Morten Johan Sørvig [Wed, 23 Apr 2014 09:32:44 +0000 (11:32 +0200)]
Cocoa: Fix crash on Combobox popup close.

Regression caused by 0be1c4899c.

The calls to handleCloseEvent/flushWindowSystemEvents
may result in popup window deletion and a stale/null
pointer access.

Get the window type before closing it.

Task-number: QTBUG-38418
Change-Id: I212a56979e0248076e1eb5bf9ede1ff0d424e041
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoUse runtime detection of XInput 2.1 to disable legacy wheel events
Allan Sandfeld Jensen [Thu, 24 Apr 2014 12:53:50 +0000 (14:53 +0200)]
Use runtime detection of XInput 2.1 to disable legacy wheel events

Ensure we fall back to using wheel button events if xinput 2.1
scroll events are not available. Handles lack of xinput 2.1
support in the server or in the input devices drivers.

Task-number: QTBUG-38169
Change-Id: Ie4ad9069f648d0ab02d8f9540ed01ad58fd9e9d8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoRename new QOpenGLContext APIs
Laszlo Agocs [Thu, 24 Apr 2014 15:11:23 +0000 (17:11 +0200)]
Rename new QOpenGLContext APIs

isES() becomes isOpenGLES(). The library type enums are changed
DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now
unnecessary version number, the confusing "desktop" term and provides
better readability.

The old function/values are kept until the related qtdeclarative
changes are integrated.

Task-number: QTBUG-38564
Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
4 years agoUn-export QSignalBlocker: it's all inline
Thiago Macieira [Tue, 22 Apr 2014 23:45:55 +0000 (16:45 -0700)]
Un-export QSignalBlocker: it's all inline

Change-Id: I0fb5a30eebd9edba853b7e4bd74cc7e9b06da486
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
4 years agoFix vcxproj generation on Windows Phone
Andrew Knight [Wed, 23 Apr 2014 05:54:12 +0000 (08:54 +0300)]
Fix vcxproj generation on Windows Phone

f412f2b5 refactored the platform tool set retrieval, but made the
call too early to choose the right tool set on Windows Phone. This
fixes the call so that it does not depend on the WinPhone member variable,
and also makes it forward-compatible with Windows Phone 8.1.

Task-number: QTBUG-38516
Change-Id: Ide91563f5c7f909c4d1a258adc29af6c94595dc9
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoQPrintEngine - Fix alpha engine state sync
John Layt [Wed, 16 Apr 2014 13:56:13 +0000 (15:56 +0200)]
QPrintEngine - Fix alpha engine state sync

Move the copy of the paint engine to after the engine state has been
synced, otherwise the transform is incorrectly applied after the new

Task-number: QTBUG-38329
Change-Id: I2e134889b3ef10f6e3dce42edac2a58e78c66c30
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQSqlError: Mark deprecated functiond with QT_DEPRECATED
Olivier Goffart [Wed, 23 Apr 2014 13:12:46 +0000 (15:12 +0200)]
QSqlError: Mark deprecated functiond with QT_DEPRECATED

And move the default argument from the deprecated constructor to
the new one

Also make sure that the error number is consistent across the
two constructor

Change-Id: I3721266b39ab493f0add35b2d1f892b2f6094992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoCocoa: Make Qt::Tool windows hide on deactivate
Morten Johan Sørvig [Thu, 24 Apr 2014 12:34:34 +0000 (14:34 +0200)]
Cocoa: Make Qt::Tool windows hide on deactivate

This is a regression from 5.1.

Task-number: QTBUG-37706
Change-Id: Ib28eead869dde37ded37397a89a94b67fb150cca
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
4 years agoAndroid: Add "unversioned_libname" configuration
Eskil Abrahamsen Blomfeldt [Wed, 23 Apr 2014 14:26:26 +0000 (16:26 +0200)]
Android: Add "unversioned_libname" configuration

On Android, there's a limitation set on the names of the libraries
you deploy that they must start with "lib" and end with ".so", so
Android apps will link against and deploy with the unversioned
libQt5FooBar.so libraries. When cross-compiling on Windows however,
due to the lack of symbolic links, the only installed library
used to be the main library target "libQt5FooBar.so.X.Y.Z" (for
version X.Y.Z.) This has been worked around in packaging, but
breaks building add-on modules on top of Qt, and is clearly

This patch introduces a new "unversioned_libname" configuration
in qmake which is currently only supported for the Unix makefile
generator and only enabled for Android builds. When it is enabled,
only the unversioned library "libQt5FooBar.so" will be created.

Task-number: QTBUG-38347
Change-Id: Ia8897ca7a23a62e2a526d0e02854899b02eb19dc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agodocument new QTPLUGIN magic
Oswald Buddenhagen [Wed, 16 Apr 2014 13:43:29 +0000 (15:43 +0200)]
document new QTPLUGIN magic

Change-Id: Ia12f55a3e6bd670cb95c21c8f896b0451dd63693
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoAndroid input method fixes for SwiftKey
Paul Olav Tvete [Thu, 3 Apr 2014 13:36:27 +0000 (15:36 +0200)]
Android input method fixes for SwiftKey

Try to conform to the input method protocol in the way that
SwiftKey expects (and the way that the stock android
components actually do).

* Refactor cursor position logic
* fix getExtractedText() so it includes preedit text
* ignore the hintMaxChars parameter to getExtractedText(), since
  it looks like everybody else does
* fix setComposingRegion when preedit is active
* track the start of the preedit and the preedit cursor position,
  since the Qt input method query does not give us this information

Change-Id: I2ed8797abacd97ca749ca152fab2a2d5446ef603
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoQAbstractSocket: enable read notification for unbuffered sockets
Peter Hartmann [Thu, 24 Apr 2014 15:52:29 +0000 (17:52 +0200)]
QAbstractSocket: enable read notification for unbuffered sockets

This restores behavior for UDP sockets as it was in 5.2.1. Change
13c246ee119fdb10d91f509b968a221d4fc1d8ba introduced a behavioral
change / regression in that respect.

Task-number: QTBUG-37489
Change-Id: I8f0b26d763dd66ea6edcc343e91ff5c9c7bdc0f2
Reviewed-by: Richard J. Moore <rich@kde.org>
4 years agoDon't crash on broken GIF images
Lars Knoll [Thu, 24 Apr 2014 13:33:27 +0000 (15:33 +0200)]
Don't crash on broken GIF images

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

Initial patch by Rich Moore.

Task-number: QTBUG-38367
Change-Id: Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e
Security-advisory: CVE-2014-0190
Reviewed-by: Richard J. Moore <rich@kde.org>
4 years agoDeprecate setSharable in Qt containers
Thiago Macieira [Thu, 6 Mar 2014 21:01:20 +0000 (13:01 -0800)]
Deprecate setSharable in Qt containers

The ability to set a container to be unsharable has very little use and
it costs us an extra conditional for every refcount up and possibly

This change is a no-op for current Qt 5. It shuffles a few things around
just so Qt can compile if you define QT_NO_UNSHARABLE_CONTAINERS. That
is done to ease the fixing of the code in Qt 6 and to make my life
easier: I'll keep that defined in my local Qt build so I can catch any
misuses of this deprecated API.

The newly deprecated methods are not marked QT_DEPRECATED because the
bootstrapped tools wouldn't build -- they're built with QT_NO_DEPRECATED
defined, which causes build errors.

[ChangeLog][QtCore] The setSharable() and isSharable() functions in Qt
containers has been deprecated and will be removed in Qt 6. New
applications should not use this feature, while old applications that
may be using this (undocumented) feature should port away from it.

Discussed-on: http://lists.qt-project.org/pipermail/development/2014-February/015724.html
Change-Id: I789771743dcaed6a43eccd99382f8b3ffa61e479
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoQOpenGLFunctions: Compile on Mac OS 10.6
Morten Johan Sørvig [Wed, 23 Apr 2014 12:29:03 +0000 (14:29 +0200)]
QOpenGLFunctions: Compile on Mac OS 10.6

The 10.6 OpenGL headers have "GLenum" as the type
for the 3rd argument. The OpenGL standard has "Glint",
which is also what Qt expects.

Work around this by casting the pointer type.

Task-id: QTBUG-38406
Change-Id: I6d820f41e0d14cbc2d50d91997b6c40b626b159f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoUpdate the changelog for 5.3.0
Thiago Macieira [Tue, 22 Apr 2014 23:09:16 +0000 (16:09 -0700)]
Update the changelog for 5.3.0

Change-Id: Ic678258dc37d271daa4ee6a871907ca15db2ffde
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoDocument QString's UTF-8 conversion behaviors
Thiago Macieira [Fri, 4 Apr 2014 17:34:15 +0000 (10:34 -0700)]
Document QString's UTF-8 conversion behaviors

We haven't handled the Unicode non-characters specially since Qt 5.2
(since commit 9327bc87c3abf58bb471693b5448cd78e3db1b46), so this part of
the documentation was stale.

Since Qt 5.3 (since 8dd47e34b9b96ac27a99cdcf10b8aec506882fc2), QString
will insert one replacement character for each byte that can't be decoded

[ChangeLog][Important Behavior Changes][UTF-8 decoding] The QString
UTF-8 decoder changed behavior slightly: when it encounters invalid
sequences, it will insert one replacement character per byte that is
invalid, instead of one replacement character for the whole invalid

Change-Id: Ia4ec78afded9445bbe937311d6be80f71bd1a55f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoRestore handling of BOMs in QString::fromUtf8
Thiago Macieira [Wed, 23 Apr 2014 18:18:17 +0000 (11:18 -0700)]
Restore handling of BOMs in QString::fromUtf8

8dd47e34b9b96ac27a99cdcf10b8aec506882fc2 removed the handling of the
BOMs but did not document it. This brings the behavior back and adds a
unit test so we don't break it again.

Discussed-on: http://lists.qt-project.org/pipermail/development/2014-April/016532.html
Change-Id: Ifb7a9a6e5a494622f46b8ab435e1d168b862d952
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agodoc fixes
Oswald Buddenhagen [Wed, 16 Apr 2014 19:19:07 +0000 (21:19 +0200)]
doc fixes

Change-Id: I77da456b89accd7fc363471fe8e370da17e2fdcc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agodeprecate import_qpa_plugin and qpa_minimal_plugin
Oswald Buddenhagen [Wed, 16 Apr 2014 19:18:27 +0000 (21:18 +0200)]
deprecate import_qpa_plugin and qpa_minimal_plugin

they have been fully superseded by 4255ba40ab073afcf2a095b135883612859af4c2.

Change-Id: If7ac14c8b7d3cf00fb0cb916036b62eb86c9cee0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoBuild Qt tools for iOS
Tor Arne Vestbø [Tue, 22 Apr 2014 12:53:36 +0000 (14:53 +0200)]
Build Qt tools for iOS

Change-Id: Ie3dc93e01ed878233c8094ca92bef25a6cf4dcd9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
4 years agoWindows printer support: Fix linking problem when built with -no-opengl .
Friedemann Kleint [Tue, 22 Apr 2014 10:01:05 +0000 (12:01 +0200)]
Windows printer support: Fix linking problem when built with -no-opengl .

Add missing libraries that were otherwise pulled in by opengl.prf.

Task-number: QTBUG-38431
Change-Id: I1705d432088a47b5a202595e818e9efcd5f6a4cf
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoFix warning with -Wswitch-enum
Konstantin Ritt [Fri, 18 Apr 2014 12:51:51 +0000 (15:51 +0300)]
Fix warning with -Wswitch-enum

> warning: enumeration values 'Joining_None', 'Joining_Left', and 'Joining_Transparent'
> not explicitly handled in switch [-Wswitch-enum]

Change-Id: I314b486462451e7d62980b6185b46cd115be1547
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoWinRT: Handle back button as press or release
Andrew Knight [Tue, 22 Apr 2014 05:51:40 +0000 (08:51 +0300)]
WinRT: Handle back button as press or release

Earlier, only the back press was checked for acceptance. By also checking
the release event, this makes the backstepping behavior consistent with
Qt for Android, and fixes the expected behavior found in our demo

Task-number: QTBUG-35951
Change-Id: I9c2f18816b838d57713ba4dd3624e2f3f1ac40ac
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
4 years agoANGLE WinRT: Call Trim() when application suspends
Andrew Knight [Tue, 22 Apr 2014 06:14:39 +0000 (09:14 +0300)]
ANGLE WinRT: Call Trim() when application suspends

This is required by Windows Store Apps to pass certification.

Task-number: QTBUG-38481
Change-Id: I6dc00431ee5f6c7d4c64111ccc38f46483d3b9a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
4 years agoWinRT: Fix TCP socket reads
Andrew Knight [Tue, 22 Apr 2014 09:43:28 +0000 (12:43 +0300)]
WinRT: Fix TCP socket reads

All read calls are now pulled from an intermediate buffer which is
populated from the asynchronous callback (this was a TODO previously, and
was breaking downloads of large requests). As a side-benefit, the use of
only async callbacks ensures fewer first-chance exceptions appear in the
debug output.

Task-number: QTBUG-30196
Change-Id: I5653742d8d94934a4b4a4227298865d20518bc4c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
4 years agoQPrintDialog - Fix Mac reference counting error.
Morten Johan Sørvig [Wed, 16 Apr 2014 20:09:36 +0000 (22:09 +0200)]
QPrintDialog - Fix Mac reference counting error.

"key" is accessed with a "Get" function and should
not be released. Switch from using QCFString to a

Change-Id: Id4eecc642de8698314fc57d44af05c202966b11c
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: John Layt <jlayt@kde.org>
4 years agoQPrintDialog - Fix mac change of printer name
John Layt [Wed, 16 Apr 2014 14:47:14 +0000 (15:47 +0100)]
QPrintDialog - Fix mac change of printer name

If the user changes the printer name in the Mac print dialog then
update the print device in QPrint to reflect this.

Task-number: QTBUG-37808
Change-Id: I3aaf27e2db7277ab083dc8f8d59f0f80ecd424f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoAndroid input method fix
Paul Olav Tvete [Thu, 3 Apr 2014 07:47:32 +0000 (09:47 +0200)]
Android input method fix

Let textBeforeCursor return the text immediately before the cursor,
and not the text at the beginning of the paragraph, even if that is
also technically before the cursor. (Apparently I do not know the
difference between left and right.)

Change-Id: I6043ebe53838e68880b6407dbb9e5370bc785c1b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoRevert "Automatically link printsupport plugins to static applications."
Oswald Buddenhagen [Wed, 16 Apr 2014 17:35:17 +0000 (19:35 +0200)]
Revert "Automatically link printsupport plugins to static applications."

It has been fully obsoleted by 4255ba40ab073afcf2a095b135883612859af4c2.

This reverts commit 99eecab83d4a4c79979aa0b1fcf1f58c14dcf526.

Change-Id: Id7b8d3bba27ff43e38e4fe32a4f2950de9ced493
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
4 years agoWhen a window loses focus to a popup, event has PopupFocusReason
Shawn Rutledge [Wed, 22 Jan 2014 13:17:31 +0000 (14:17 +0100)]
When a window loses focus to a popup, event has PopupFocusReason

Followup to debe31e047060d790fb32c06e514d9df476df8bf : a popup
window can have focus, but a QQuickWindow needs to know why
it loses focus when a menu is opened, so that for example
copy/cut/paste Actions can apply to the text which did have
focus before the menu opened.  The event's focus reason provides
enough information to deal with this situation.

Task-number: QTBUG-36292
Task-number: QTBUG-36332
Change-Id: Ifae999a364a61b125a4764c9db204a167bddf0b7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
4 years agoRestore Qt 4 behavior in default double click handler
Laszlo Agocs [Tue, 15 Apr 2014 16:14:08 +0000 (18:14 +0200)]
Restore Qt 4 behavior in default double click handler

Revert 3bb902495291c50a2f06e8e03a62a647db3e5cd4. That fix was an attempt
to handle the issue that has been fixed in 5.3 by
9063edef796ad10eb9ac2229627f36d60168f0e2 and should have been reverted
when the new approach, that restores Qt 4 behavior for widgets, was

Task-number: QTBUG-38242
Task-number: QTBUG-36423
Change-Id: I8f8a82da22605fac90543492e9b2cd2b568544e7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoRemove internal public function from QOpenGLFunctions
Laszlo Agocs [Thu, 10 Apr 2014 09:49:48 +0000 (11:49 +0200)]
Remove internal public function from QOpenGLFunctions

QOpenGLContext uses glGetTexLevelParameteriv on desktop OpenGL and so it
got recently added to QOpenGLFunctions as part of the dynamic GL loading

This is unnecessary since such desktop-only code can use the versioned
wrappers (QOpenGLFunction_1_0 for example). In related upcoming changes
in 5.4 the function is removed. This change has to be backported to 5.3
to prevent introducing this public API unnecessarily.

Change-Id: I6fc331091e4e6416e430bf985afcc17a392fc2e3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoWinRT: Don't use the native thread handle for waiting
Andrew Knight [Thu, 10 Apr 2014 14:12:20 +0000 (17:12 +0300)]
WinRT: Don't use the native thread handle for waiting

There is no guarantee that the handle from std::thread will be valid
when a wait is made. Instead, simply use an elapsed timer and check
if the thread is finished. This prevents an exception from being thrown
when a bad handle is encountered.

Task-number: QTBUG-31397
Change-Id: Ie2a7e6cbfbb27bf1baff779322670d85e92e10dd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
4 years agoiOS: fix crash in auto correction when using unknown font family
Richard Moe Gustavsen [Wed, 9 Apr 2014 13:46:26 +0000 (15:46 +0200)]
iOS: fix crash in auto correction when using unknown font family

If QFont reports a family name that cannot be used to instanciate
a UIFont, we end up trying to insert a nil object to an
NSDictionary. This will raise an exception.

This patch will check that we have a valid UIFont before using it.

Task-number: QTBUG-38018
Change-Id: Id8a2e4afea8c915ff43a7e4680304ba19328f9c2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoAndroid: Reset input method when focus changes
Paul Olav Tvete [Fri, 11 Apr 2014 11:46:48 +0000 (13:46 +0200)]
Android: Reset input method when focus changes

Qt Quick does not have the widgets workaround of explicitly hiding
the input method on focus out. This fix copies what happens in
the iOS port: Commit the current preedit and reset the IM when we
see that the focus object changes.

Task-number: QTBUG-38047
Change-Id: I30805265286dc650b3734e2a24807cdc8bfbcd16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoFix font merging for complex scripts on Windows
Konstantin Ritt [Sat, 12 Apr 2014 00:45:28 +0000 (03:45 +0300)]
Fix font merging for complex scripts on Windows

As long as QWindowsFontDatabase::fallbacksForFamily() does not take script
parameter into account, we should prefer QFontEngineMultiQPA's loadEngine()
implementation for complex scripts; otherwise we could fall into a situation
where reported fallback fonts doesn't support the requested script at all.

This finishes c3b2425791ec1e17a8b1e2f5b35b8e79176fc9c4.

Task-number: QTBUG-37836
Change-Id: I2c43d97f1331ad05116856f9fe77560ed4dd02c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agodon't make relative paths if we don't know the top-level build dir
Oswald Buddenhagen [Mon, 14 Apr 2014 09:51:02 +0000 (11:51 +0200)]
don't make relative paths if we don't know the top-level build dir

regression from qt4.

Task-number: QTBUG-37113
Change-Id: I34813f03d8ec686e3ecb49f66629079489a3d83d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoDoc: Adding Enginio's export macro to the list of excluded QDoc tokens.
Jerome Pasion [Mon, 14 Apr 2014 12:12:00 +0000 (14:12 +0200)]
Doc: Adding Enginio's export macro to the list of excluded QDoc tokens.

-helps the QDoc parser read C++ API when the macro is excluded.

Task-number: QTBUG-33360
Change-Id: Ic7e86c0d1cec4a1960d20b1c92c4b60396eb3ea6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
4 years agofix debug_and_release builds
Oswald Buddenhagen [Tue, 15 Apr 2014 12:51:37 +0000 (14:51 +0200)]
fix debug_and_release builds

Task-number: QTBUG-38358
Change-Id: Idb02fd845c1f36b963150cc150dd2ee5bdd7bc4a
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoDoc: recommend using QLocale for loading translations
Leena Miettinen [Tue, 15 Apr 2014 14:49:08 +0000 (16:49 +0200)]
Doc: recommend using QLocale for loading translations

Users can choose to use different UI languages and regional settings on
their devices. QTranslator::load(const QLocale &) function uses
QLocale::uiLanguages() and not to the locale name, which refers to the
formatting of dates and numbers.

Change-Id: Iec6327dd1e91d913176499b23482d725b9d0a8aa
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoReload lastScrollPosition on window enter
Allan Sandfeld Jensen [Fri, 11 Apr 2014 10:09:59 +0000 (12:09 +0200)]
Reload lastScrollPosition on window enter

We need the lastScrollPosition position to calculated scrolling deltas
on scroll events. Since the position is tied to the device and might
have changed while scroll events were send to other applications we need
to reload the value when mouse focus reenters our application.

Task-number: QTBUG-38274
Change-Id: Ic166648f8e7ae486288cbed339a057e3faa1ef2d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoDisable C++11 initializer lists and rvalue refs for old libstdc++
Thiago Macieira [Tue, 8 Apr 2014 17:41:55 +0000 (10:41 -0700)]
Disable C++11 initializer lists and rvalue refs for old libstdc++

This can happen if you're using a recent compiler other than GCC (that
is, Clang or Intel) and using an older version of the GCC headers.

The check is not strictly correct: we're disabling for libstdc++ that
came with GCC 4.2 and enabling for everything afterwards, even though
both of those features were not present in GCC 4.3. However, the
__GLIBC_LIBSTD__ macro only exists on Apple's patched version of
libstdc++ and they're not going to update it anyway.

libstdc++ does not provide a version macro that we can use.

Task-number: QTBUG-38193
Change-Id: I34d38a2f2e5b4ac51bce35c30ec0fcf19de9cdf4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
4 years agoDisable all C++11 rvalue refs with Dinkumware C++ library too
Thiago Macieira [Fri, 11 Apr 2014 20:26:48 +0000 (13:26 -0700)]
Disable all C++11 rvalue refs with Dinkumware C++ library too

Our code assumes that Q_COMPILER_REF_QUALIFIERS implies
Q_COMPILER_RVALUE_REFS. Technically, it should check both macros, but
the only point of ref qualifiers is to have both lvalue- and rvalue-
reference member functions. We might then use std::move without a check
to see if the standard library does provide it.

Change-Id: Ia3eedd298c2218f100aee2e41bdea6e2c5c07a15
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
4 years agoRemove the #ifdef check just before #undef
Thiago Macieira [Sat, 12 Apr 2014 17:01:50 +0000 (10:01 -0700)]
Remove the #ifdef check just before #undef

No warning is printed anyway. This code is only for one compiler (GCC on
QNX, a.k.a. QCC).

Change-Id: I28d085c72ab5a957146efab0a36c72f213d9d2c3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
4 years agoDisable threaded rendering if Mesa is used
Ulf Hermann [Thu, 10 Apr 2014 13:51:56 +0000 (15:51 +0200)]
Disable threaded rendering if Mesa is used

Mesa and xcb show some bad interaction which leads to frequent crashed
on multithreaded access. Also, the selective approach to blacklisting
only specific chipsets isn't feasible, given the resources available.

The client glx vendor string is used to identify mesa instead of the
server GL vendor and/or renderer string as that is much more reliable.

Task-number: QTBUG-38221
Change-Id: I2d8c037aa4fd9c38eb9537452a5e7e62f72a081d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
4 years agoImprove the Unicode script itemization implementation
Konstantin Ritt [Thu, 10 Apr 2014 10:50:53 +0000 (13:50 +0300)]
Improve the Unicode script itemization implementation

Make it closer to the Unicode specs (UAX#24):
* Common now inherits the preceding character's script, if any;
* In a combining character sequence, if the base character is
  of Common script, the entire sequence is treated like if it were
  of the first non-Inherited, non-Common script in the sequence.
See http://www.unicode.org/reports/tr24/tr24-21.html for more details.

[ChangeLog][QtGui] Fixed regression in arabic text rendering.

Task-number: QTBUG-28813
Task-number: QTBUG-29930 (related)
Task-number: QTBUG-35836
Change-Id: Id85761965b08ca94c674d5f3613fe58b82b2ce9c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
4 years agoMake HarfBuzz-NG the default shaper on Mac
Konstantin Ritt [Thu, 10 Apr 2014 10:50:01 +0000 (13:50 +0300)]
Make HarfBuzz-NG the default shaper on Mac

For AAT shaping support, we need either the pre-QPA shaping trick
or the new HarfBuzz on Mac; prefer the latter.
Disable some test cases aimed to test the HB-old behavior; enable ones
that should guarantee shaping-unaware behavior.

[ChangeLog][OS X] Use CoreText text shaping engine for support of
complex scripts. If required, the shaping engine used in previous
versions can be preferred by configuring Qt with -no-harfbuzz.
Alternatively, the QT_HARFBUZZ environment variable could be set to "old".

Task-number: QTBUG-18980 (relates)
Task-number: QTBUG-38246
Change-Id: Iee6fe4f5bc047e77259182b8585385c5febd02b3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agodocs: Q_CLASSINFO is used in a couple more places besides ActiveQt
Shawn Rutledge [Wed, 9 Apr 2014 05:27:21 +0000 (07:27 +0200)]
docs: Q_CLASSINFO is used in a couple more places besides ActiveQt

Change-Id: I000f538dc11477224efbf2edc91873822eb9fef2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
4 years agoCocoa: Don't consume events when closing tool tips
Morten Johan Sørvig [Fri, 11 Apr 2014 13:11:09 +0000 (15:11 +0200)]
Cocoa: Don't consume events when closing tool tips

With change acebf677 we treat Qt::ToolTip similar
to Qt::Popup and close them on a mouse click on the
parent window. This mouse click is not forwarded
to the standard mouse event handler.

Add an exception for Qt::ToolTip.

Task-number: QTBUG-38267
Change-Id: Ie3121f651a6ccc2427040e61db4f63967467604d
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoDoc: document QTimeZone::swap()
Marc Mutz [Mon, 3 Mar 2014 18:29:19 +0000 (19:29 +0100)]
Doc: document QTimeZone::swap()

Change-Id: I80d55df65546b671772ed93cb852e88ee040114a
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoDoc: document obsolete QApplication::setGraphicsSystem()
Marc Mutz [Tue, 4 Mar 2014 09:21:29 +0000 (10:21 +0100)]
Doc: document obsolete QApplication::setGraphicsSystem()

Change-Id: I5a87564d2dbfa5e739d1ca40db480e8e0c1b7fdf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoCocoa: Post event to "show()" a modal window
Gabriel de Dietrich [Wed, 9 Apr 2014 11:26:57 +0000 (13:26 +0200)]
Cocoa: Post event to "show()" a modal window

The way we were doing it, we may have interferred with other
events in the CFRunLoop source and call processEvents() at
the wrong moment or for the wrong reason. By using a posted
event, we make the notification channel unambiguous.

This ammends ff3dcc49c4a1912189091e35e87cb61af2f62d47.

Task-number: QTBUG-38214
Change-Id: I94f7e89cf4c9803289749394f85119cba62ef0e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoCocoa: Send expose event on screen change.
Morten Johan Sørvig [Wed, 9 Apr 2014 10:16:09 +0000 (12:16 +0200)]
Cocoa: Send expose event on screen change.

Required to repaint OpenGL content properly.

Task-number: QTBUG-38105
Change-Id: Ie9441d56bd9d1a4eb399210369592f03e19c4929
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoCocoa: Set the COCOA_MENU_ANCESTOR() also when sync'ing
Gabriel de Dietrich [Wed, 9 Apr 2014 14:24:06 +0000 (16:24 +0200)]
Cocoa: Set the COCOA_MENU_ANCESTOR() also when sync'ing

Task-number: QTBUG-38044

Change-Id: I2769bf2f4beec058c15ba1d126e59106f41dab37
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoXCB: Print error code on Xlib I/O errors
Uli Schlachter [Tue, 8 Apr 2014 21:12:28 +0000 (23:12 +0200)]
XCB: Print error code on Xlib I/O errors

When Xlib detects that its underlying XCB connection got into an error
state, it calls its I/O error handler. However, the default
implementation doesn't print the error code from XCB which might be
useful for debugging.

This commit adds an I/O error handler which prints the error code from
XCB with a string describing the error and then calls Xlib's default
error handler.

Change-Id: I7f1fb3f1e8d0fdc3ac9db03ae7d154330c31db0c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoMake Xcode debug info format controllable through a qmake variable
Tor Arne Vestbø [Thu, 13 Mar 2014 15:16:22 +0000 (16:16 +0100)]
Make Xcode debug info format controllable through a qmake variable

The default is still DWARF instead of DWARF with dSYM for static builds
of Qt, so that debug builds of the final application don't take forever
to build due to generating the dSYM file.

Change-Id: I370d800d7c959e05c1a8780c4ebf58fff250daa1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
4 years agoHB-NG w/CoreText backend: Fix clustering of neutral characters
Eskil Abrahamsen Blomfeldt [Wed, 9 Apr 2014 12:19:32 +0000 (14:19 +0200)]
HB-NG w/CoreText backend: Fix clustering of neutral characters

Say you have a string with logical contents "abc ABC, " where
lowercase is LTR and uppercase is RTL. In this case, the UBA
will give "abc " LTR direction, and "ABC, " will get RTL.

However, our itemization currently divides "ABC, " into two
script items: "ABC" and ", ". CoreText will return glyphs in
visual order, so for the first we will get "CBA" and for the
second we will get ", ". But as the ", " item has an adapted
directionality of RTL in the context of the full paragraph, it
should actually be " ," visually.

This caused a mismatch which broke the tst_QComplexText test
with HB-NG using CoreText backend. As a temporary fix for this,
we check whether the directionality of the first run in the text
is different from the directionality expected by HB-NG. If this
happens, it means the order of the glyphs produced by CoreText
will be the reverse order of what is expected by HB-NG, and
we therefore need to reverse it.

Task-number: QTBUG-38113
Change-Id: I9f5a041791e4529a14041a362b2d5dd00490a38b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
4 years agoCocoa: Fix DnD when using native widgets.
Morten Johan Sørvig [Wed, 26 Feb 2014 11:33:29 +0000 (12:33 +0100)]
Cocoa: Fix DnD when using native widgets.

Adding a native widget such as QGLWidget often causes
other widgets to become native, through native ancestor
and sibling propagation.

This includes QFocusFrame, which typically sits on
top of item views. QFocusFrame is mostly transparent
(except for the frame) and also has the WA_TransparentForMouseEvents
flag set. Its window has the corresponding
WindowTransparentForInput flag set.

Cocoa does not know about WindowTransparentForInput.
Forward the drag calls to the correct window.

Task-number: QTBUG-37077
Change-Id: I02201c7027915b1e82d0cd7e9c2e787ca6b2338b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoQTextImageHandler: Load @2x images on retina
Morten Johan Sørvig [Fri, 21 Mar 2014 10:36:55 +0000 (11:36 +0100)]
QTextImageHandler: Load @2x images on retina

Look for and load "@2x" image versions. Adjust
getPixmap/ImageSize to take the image devicePxielRatio
into account.

Use doc->documentLayout()->paintDevice() to get the
target window devicePixelRatio (like the existing
DPI-based scaling). In practice this pointer may/
will be null, fall back to qApp->devicePixelRatio
as usual.

Task-number: QTBUG-36383
Change-Id: Ib5e113b67242b5a9b3410272f2183a76a60bc773
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoOS X: Add more text editing key bindings.
Morten Johan Sørvig [Wed, 2 Apr 2014 07:12:20 +0000 (09:12 +0200)]
OS X: Add more text editing key bindings.

ctrl + K : Cut
ctrl + Y : Paste
ctrl + F : Cursor right
ctrl + B : Cursor left
ctrl + N : Cursor down
ctrl + P : Cursor up
ctrl + V : Cursor next page
ctrl + O : Insert line separator

(ctrl as in the key, not Qt::CTRL)

These are low-priority (0) key sequences. Add them to the
end of each StandardKey range and change the priority
of an existing item to 1 where it makes sense.

Task-number: QTBUG-32837
Change-Id: Id321e6c6ad4277d729b27297a1de66c4628e4201
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoMac: Implement unified toolbar look for QTabBar
Morten Johan Sørvig [Fri, 10 Jan 2014 14:41:20 +0000 (15:41 +0100)]
Mac: Implement unified toolbar look for QTabBar

Extend the unified title and toolbar gradient to
tabs in document mode that are adjacent unified
tool bars.

Change the updateMacBorderMetrics() function to
register the tab bar geometry and visibility status
with the Cocoa platform plugin. The Cocoa platform
plugin will then merge this area with other registered
areas if possible.

Add QCocoaNativeInterface::testContentBorderPosition().
This function tests whether the given point is within
the unified title and toolbar area.

Use testContentBorderPosition() in QMacStyle to enable
code paths that skips drawing the QToolBar bottom
separator line and paints the active tab background
with transparent pixels to make the background gradient

Change-Id: I2b70f9bb0c2c59af053a691a7df538f958783dab
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoCocoa: Update unified toolbar area on toolbar hide
Morten Johan Sørvig [Mon, 31 Mar 2014 10:19:20 +0000 (12:19 +0200)]
Cocoa: Update unified toolbar area on toolbar hide

Add setContentBorderAreaEnabled() which us used to
enable or disable an area. Used together with
registerContentBorderArea() this allows changing the
border area geometry and enabled status independently.

Add section to the QToolBar show/hide event handler
which calls setContentBorderAreaEnabled().

Make sure QToolBar and QToolBarLayout uses the same
identifier - the QToolBar object pointer.

Rename enableContentBorderArea -> setContentBorderEnabled.
The "ContentBorder" is now the entire unified toolbar
area while "ContentBorderArea"s are the sub-areas
covered by toolbars.

Change-Id: I339f381a50856e048ae40e7ffadd6a8a510c4994
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
4 years agoFix tst_QListWidget::task217070_scrollbarsAdjusted()
J-P Nurmi [Tue, 8 Apr 2014 20:46:17 +0000 (22:46 +0200)]
Fix tst_QListWidget::task217070_scrollbarsAdjusted()

QMacStyle::styleHint(SH_ScrollBar_Transient) wants either a style
object or the widget argument in order to return correct values.

Change-Id: I2fdef0820334fa66e076a4734eb2a30c722c841c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
4 years agomake cmake registration of qt plugins make use of PLUGIN_EXTENDS
Oswald Buddenhagen [Wed, 2 Apr 2014 20:19:01 +0000 (22:19 +0200)]
make cmake registration of qt plugins make use of PLUGIN_EXTENDS

instead of assigning plugins to the first module which claims the whole
type, try to assign it to a module which the plugin claims to extend.

as we are getting stricter in that go, somebody needs to claim the
'generic', 'platformthemes', and 'platforminputcontexts' plugin types.
the natural claimant is QtGui. however, as we don't want to auto-link
any of these plugins, make them all claim that they extend a
non-existing module.
QtGui also claims 'iconengines' plugins.
the 'printsupport' plugins are also claimed by the respective module.

Change-Id: I7af7c16089f137b8d4a4ed93d1577bd85815c87b
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agomake QTPLUGIN work in prefix builds for plugins outside qtbase
Oswald Buddenhagen [Fri, 4 Apr 2014 14:49:26 +0000 (16:49 +0200)]
make QTPLUGIN work in prefix builds for plugins outside qtbase

this means creating forwarding pris also for plugins.

unlike for qt modules, we don't actually populate the .PATH unless it we
are making a prefix build (and thus expecting it to be outside the
regular location).

Change-Id: Id836821cddec8d5f53d0708ae001e8eaa13cc71b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoautomatically link plugins belonging to qt modules when building static apps
Oswald Buddenhagen [Wed, 2 Apr 2014 20:17:40 +0000 (22:17 +0200)]
automatically link plugins belonging to qt modules when building static apps

the plugins already declare which modules they belong to.
additionally, we allow plugins to declare which modules they "extend" -
e.g., while the Quick accessibility plugin belongs to Gui's 'accessiblity'
type, it makes no sense to link it unless Quick is actually linked.
finally, it is possible to manually override the plugins which are linked
for a particular type, by setting QTPLUGIN.<type> (to '-' if no plugins
of this type should be linked at all).

Task-number: QTBUG-35195
Change-Id: I8273d167a046eb3f3c1c584dc6e3798212a2fa31
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agofix typo in qmake source file list
Oswald Buddenhagen [Wed, 9 Apr 2014 11:49:30 +0000 (13:49 +0200)]
fix typo in qmake source file list

the effect of this is negligible, as this list is only used for
dependency scanning.

Change-Id: Iae9fc73c8633cfc8217bc90014498d9635d53ad0
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
4 years agoDoc: Fix template code for unordered lists
Topi Reinio [Wed, 9 Apr 2014 09:48:57 +0000 (11:48 +0200)]
Doc: Fix template code for unordered lists

The CSS for unordered lists placed a nested list
vertically too close to its parent list item.
This commit fixes the issue.

Task-number: QTBUG-38217
Change-Id: Ia5003f2aab197f455ed5bbea2e1ee2e6475aaffe
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
4 years agoFix a typo in QBitArray documentation
Jędrzej Nowacki [Tue, 8 Apr 2014 16:31:18 +0000 (16:31 +0000)]
Fix a typo in QBitArray documentation

Task-number: QTBUG-37839

Change-Id: Id55d2d606b93f7f9e58ef423544e42b548035ee3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoQNX: Fix QCompleter autotest
Fabian Bumberger [Wed, 9 Apr 2014 16:24:24 +0000 (18:24 +0200)]
QNX: Fix QCompleter autotest

The tests expect a home folder which usually is not present on QNX

Change-Id: I44f548a95f14414c0db6f752fd115696069a7b90
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
4 years agoSupport for DH and ECDH key exchange for QSslSocket servers
Richard J. Moore [Sun, 6 Apr 2014 11:38:52 +0000 (12:38 +0100)]
Support for DH and ECDH key exchange for QSslSocket servers

Despite supporting DH and ECDH key exchange as a client, Qt did not provide
any default parameters which prevented them being used as a server. A
future change should allow the user to control the parameters used, but
these defaults should be okay for most users.

[ChangeLog][Important Behavior Changes] Support for DH and ECDH key exchange
cipher suites when acting as an SSL server has been made possible. This
change means the you can now implement servers that offer forward-secrecy
using Qt.

Task-number: QTBUG-20666
Change-Id: I469163900e4313da9d2d0c3e1e5e47ef46320b17
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
4 years agoOnly define Q_COMPILER_INITIALIZER_LISTS for MSVC 12 SP 2
Frederik Gladhorn [Wed, 9 Apr 2014 12:25:58 +0000 (05:25 -0700)]

Nested initialization is broken before SP2, so just disable the whole
feature as tst_qvector crashes(release)/fails(debug)
Done-with: Jedrzej Nowacki

Task-number: QTBUG-38186

Change-Id: I9c5c9e55c75854fc1f05a59fab2ac7dce9b37fbb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoFix crash when trying to place toolbar into zero-height window.
Friedemann Kleint [Fri, 28 Mar 2014 14:55:31 +0000 (15:55 +0100)]
Fix crash when trying to place toolbar into zero-height window.

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

Task-number: QTBUG-37183
Change-Id: I7029eb9739cbe603460e87d3e5493f116bdb3a89
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
4 years agoChange QVERIFY in tst_qnetworkreply to warning.
Friedemann Kleint [Tue, 1 Apr 2014 10:04:44 +0000 (12:04 +0200)]
Change QVERIFY in tst_qnetworkreply to warning.

FAIL!  : tst_QNetworkReply::ioPostToHttpUploadProgress() 'args.at(0).toLongLong() != sourceFile.size()' returned FALSE. ()

Task-number: QTBUG-37449
Task-number: QTBUG-24226
Change-Id: Idcc0ceac0332705b1e3a073d40fa8098bea2c9f3
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
4 years agoQWindowsOpenGLContextFormat: Default to version 2.
Friedemann Kleint [Tue, 8 Apr 2014 09:11:20 +0000 (11:11 +0200)]
QWindowsOpenGLContextFormat: Default to version 2.

glGetString() returns NULL when no current context exists.

Task-number: QTBUG-38063

Change-Id: I5cdb265fb2d74bbc5f3e2c34528909323573b2e1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoFix crash in qt_try_modal.
Friedemann Kleint [Tue, 8 Apr 2014 09:49:14 +0000 (11:49 +0200)]
Fix crash in qt_try_modal.

Task-number: QTBUG-34580

Change-Id: Idc549116fa99aa49ac7c67dcfc76d32ca71f3c76
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
4 years agoAdd unhandled Android keys.
BogDan Vatra [Tue, 8 Apr 2014 12:38:04 +0000 (15:38 +0300)]
Add unhandled Android keys.

Sort case values.

The following new keys were added:

Change-Id: I599e9e46ea720e52004a53747d6b21fc7a44262e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
4 years agoQNX: Fix QHeaderView autotest
Fabian Bumberger [Wed, 2 Apr 2014 21:21:24 +0000 (23:21 +0200)]
QNX: Fix QHeaderView autotest

Some margines and sizeHints are DPI dependent on QNX and BlackBerry.
This patch skips two test that expect the section size to be of a
certain pixel size.

Change-Id: I7869f77fc2b623e091f53e420d1a4fdb3ec30724
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
4 years agoQNX: Work around dlclose issue
Bernd Weimer [Tue, 8 Apr 2014 07:38:28 +0000 (09:38 +0200)]
QNX: Work around dlclose issue

"Shared objects still referenced" dlerror should actually be treated as
"for your information" only, not as an actual error.

Change-Id: Ie02bd1db0dd2dc93bb759f8b6c7e825070e17bb9
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoAndroid: Fix compilation on Windows
Eskil Abrahamsen Blomfeldt [Mon, 7 Apr 2014 08:38:26 +0000 (10:38 +0200)]
Android: Fix compilation on Windows

151cf2047aa36ac395a841a3ced8b2142a997aec broke cross-compilation
for Android on Windows, since evdev-support was detected, but
there was no corresponding test to disable the mtdev-code in the
evdev files.

Task-number: QTBUG-38155
Change-Id: Ifb08fa1160a348ef64b970a89922e66dc6ddd263
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
4 years agoFix out-of-range shifting
Maurice Kalinowski [Fri, 4 Apr 2014 09:51:16 +0000 (11:51 +0200)]
Fix out-of-range shifting

offsetHi needs to be casted first before shifting.

Change-Id: I29c773dd13d5b16042629604015bbf5645fab861
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
4 years agoQComboBox: Set the proper font after a MacSizeChange event
Gabriel de Dietrich [Thu, 3 Apr 2014 15:50:42 +0000 (17:50 +0200)]
QComboBox: Set the proper font after a MacSizeChange event

Change-Id: I5c90817e52a3e87d9b06b2bb670d69a6953efd47
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
4 years agoCocoa: Use private property to enable NSWindow child windows
Gabriel de Dietrich [Mon, 13 Jan 2014 13:35:17 +0000 (14:35 +0100)]
Cocoa: Use private property to enable NSWindow child windows

Enabled for QToolBar to allow it to overlap OpenGL widgets when

Task-number: QTBUG-33082
Change-Id: I76dc8da52bc04eedc6d6779c48753da100ed1c9f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoQPageSize: remove QPageSize:: overqualifications
Marc Mutz [Fri, 4 Apr 2014 22:09:43 +0000 (00:09 +0200)]
QPageSize: remove QPageSize:: overqualifications

This is not Qt style, not needed, and clutters the code, so remove
QPageSize:: qualifications where they're not needed.

Change-Id: Ia93ac9523ef43a40cf4dab3bcb383a54af666c96
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoCocoa: Fix possible printing memory leak.
Morten Johan Sørvig [Mon, 7 Apr 2014 07:26:48 +0000 (09:26 +0200)]
Cocoa: Fix possible printing memory leak.

The created page format must always be released,
even if one of the subsequent PM* functions fails.

Change-Id: If42aaeccd6bdb51ba53444f491ca2878783d0678
Reviewed-by: John Layt <jlayt@kde.org>
4 years agoCocoa: Fix crash when creating printer object.
Morten Johan Sørvig [Mon, 7 Apr 2014 07:24:37 +0000 (09:24 +0200)]
Cocoa: Fix crash when creating printer object.

Fix reference counting error in QCocoaPrintDevice::
createPageSize(). "key" is accessed with a "Get"
function and should not be released. Switch from
using QCFString to a plain CFStringsRef with manual
ref counting.

Task-number: QTBUG-38023
Change-Id: I04d661bffeb5b3122b0c3c8eaaffdd1af51842fd
Reviewed-by: John Layt <jlayt@kde.org>
4 years agoUpdate qtgui.qdoc regarding OpenGL
Laszlo Agocs [Mon, 7 Apr 2014 08:55:50 +0000 (10:55 +0200)]
Update qtgui.qdoc regarding OpenGL

Change-Id: Ibda6987d005a1e42ebaef23b41ef18ae0b7ffa66
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
4 years agoStabilize tst_QListWidget
J-P Nurmi [Tue, 8 Apr 2014 21:38:00 +0000 (23:38 +0200)]
Stabilize tst_QListWidget

Replace weird QEventLoop hacks by sending all posted deferred delete

Change-Id: I6da743f2b3fb6ef5dfc960dd3d752973cd511037
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
4 years agoQOpenGLWidget: Avoid crashing if updateGL is called before the first resize
Jocelyn Turcotte [Tue, 8 Apr 2014 16:16:37 +0000 (18:16 +0200)]
QOpenGLWidget: Avoid crashing if updateGL is called before the first resize

Change-Id: I9e7788334de98b35dc5d6beee97a63783a1fe267
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
4 years agoAndroid: Add some ci usage features to Android testrunner
Simo Fält [Tue, 8 Apr 2014 07:07:15 +0000 (10:07 +0300)]
Android: Add some ci usage features to Android testrunner

Added new options:
- silent to suppress the noice from ext tools, making it easier to
parse failed test cases.
- ci, to check test insignificance. Requires QMake::Project cpan
module if used.

Also added printing out results after each test as well as full
summary after test run is complete.

Task-number: QTQAINFRA-641
Change-Id: Ie5f02710a939f7526e0dd39979a0cd97ed19f55b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoAccessibility Mac: Cache Accessible Elements and Notify about changes
Frederik Gladhorn [Thu, 20 Mar 2014 15:38:36 +0000 (16:38 +0100)]
Accessibility Mac: Cache Accessible Elements and Notify about changes

The big change is that we now keep the id objects representing accessibles
around so that they are persistent for ATs.
This improves performance of Mac accessibility significantly.

This is required for notifications which are now sent so that many things work much better,
for example the VoiceOver focus follows the keyboard focus.

The parent element in QCocoaAccessibleElement was removed, we can
dynamically access it more reliably.

Change-Id: I686d212f40d28b392dcc22f16f3c3430f08bdc98
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoCorrect QOpenGLContext::versionFunctions() docs
Laszlo Agocs [Tue, 8 Apr 2014 15:32:26 +0000 (17:32 +0200)]
Correct QOpenGLContext::versionFunctions() docs

The example is incorrect: no context parameter is needed.

There was also no mentioning of the fact the the context must be
current at the time of calling initializeOpenGLFunctions(). This
is corrected too.

Change-Id: If8695140096e4b4f84927579c099b0af80750703
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
4 years agoForward "_q_platform_*" QWidgets's properties to QWindow.
Tomasz Olszak [Wed, 8 Jan 2014 20:58:16 +0000 (21:58 +0100)]
Forward "_q_platform_*" QWidgets's properties to QWindow.

This way we can customize QPlatformWindow by using
dynamic "_q_platform_" properties in corresponding

Change-Id: I987b7a17d252541fe766af6aa37a6cffb67f1807
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
4 years agoAdd diagnostic output to tst_QtConcurrentIterateKernel.
Friedemann Kleint [Mon, 31 Mar 2014 09:24:43 +0000 (11:24 +0200)]
Add diagnostic output to tst_QtConcurrentIterateKernel.

Add messages to comparisons and expect failure of blockSize()
on Windows.

Task-number: QTBUG-37822

Change-Id: Ie71d35a3d1ba0e52c93d5ba3fd7e92465b170d49
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
4 years agoXCB: Only use the XFixes extension if available
Uli Schlachter [Tue, 8 Apr 2014 20:26:24 +0000 (22:26 +0200)]
XCB: Only use the XFixes extension if available

Commit 0d4918950e61f added a new place
(QXcbWindow::setTransparentForMouseEvents()) where requests from the
XFixes extension are generated. However, this wasn't checking if the
extension is actually supported before using it.

Fix this by turning QXcbWindow::setTransparentForMouseEvents() into a
no-op if the XFixes extension isn't available.

This means that the window in question won't be transparent for mouse
events, but we cannot do much about that if the X server doesn't support
the required extension.

Task-number: QTBUG-38109
Change-Id: I2931481eb71bab990f2dcf0ec600b9e62d3d799c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
4 years agoDoc: Add a section all modules can use for example documentation.
Jerome Pasion [Tue, 8 Apr 2014 12:59:37 +0000 (14:59 +0200)]
Doc: Add a section all modules can use for example documentation.

-modules that use the qt-module-defaults.qdocconf have access to the
 .qdocinc file.

-content about running examples can be used by example documentation.

Task-number: QTBUG-33597
Change-Id: I88d93a9982c05a24b4f7ac1b2cfb3293e56031b2
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>