Commit Graph

26631 Commits

Author SHA1 Message Date
Błażej Szczygieł
78ad8f208d xcb: Fix drag and drop between xcb screens
Set the proper screen before creating a shaped pixmap window in
QBasicDrag::startDrag(). Grab mouse again when D&D window is
recreated.

Task-number: QTBUG-51215
Change-Id: I5cb47d3b11672b56d17b32072d84a722bdcdcd9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-18 20:08:07 +00:00
Lars Knoll
4889269ff0 Fix quadratic behavior when converting from QVariant
The old code called insert for each item, leading to constant
reallocation of the data structure. Instead rely on the fact
that a QVariantMap (as well as the variant list) is sorted, so
we can convert to the QJson data structure in one go without
lots of reallocations.

Task-number: QTBUG-44737
Change-Id: Id2d38d278fb9afa5e062c7353b4d4215bdfb993c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-18 07:38:37 +00:00
Lars Knoll
03f1a69e9c Avoid size overflows when inserting into very large JSON objects
QJson has a size limitation for arrays and objects. Make sure we
don't go over that size limit and create corrupt objects when
inserting data.

Change-Id: I45be3caefc282d8041f38acd120b985ed4389b8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-18 07:38:28 +00:00
Oswald Buddenhagen
6342fb2c3e Bump version
Change-Id: I62b55dde4a21a46470cafcc0e0b46bc70c097052
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-18 07:38:22 +00:00
Jake Petroules
cf47e2e181 Fix build when QMacStyle is disabled.
Change-Id: Ica66ab2b48266590b14d16a323b572f63168a580
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-18 07:38:17 +00:00
Jake Petroules
de82352d28 Wrap legacy APIs in a QT_MAC_DEPLOYMENT_TARGET_BELOW macro.
If the deployment target is OS X >= 10.10 or iOS >= 8.0, we always have
the NSProcessInfo API available and do not need to compile-in this code
at all.

Change-Id: I8470a5be475a82e7b88d62f4558925f62527b6f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-18 07:38:06 +00:00
Andreas Hartmetz
719623a11d Fix builds without session management.
My previous change broke it.

Change-Id: I3c3a9a65775032a95eebf3526c1bbf2c50773230
Reviewed-by: Samuli Piippo <samuli.piippo@theqtcompany.com>
2016-02-18 07:24:38 +00:00
Vyacheslav Grigoryev
34472e946a QSqlDriver: use table prefix in WHERE clauses
If the WHERE clause is used in a query involving multiple tables,
such as generated by QSqlRelationalTableModel, the table prefix
may be necessary to disambiguate column references. It is harmless
if not needed.

Task-number: QTBUG-43320
Change-Id: I39e1ab7359bf748afa8bcd8578220e3abb3ee24a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2016-02-17 23:13:58 +00:00
Friedemann Kleint
ed4ef55ec5 QtNetwork: Silence Clang on Windows.
Remove dead code and fix override.

Task-number: QTBUG-50804
Change-Id: I9cc28507e549d56a1f15fcc54bb6f7465beef644
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-17 18:58:18 +00:00
Ariel Molina
42b39f9827 Add source device information to qDebug output of QTouchEvent
This is a simplistic patch to make it easier to debug touch input when
using multiple physical or virtual devices.

Change-Id: I996237cdce5e0ff0c4a0660dabb0d190679ab585
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-02-17 05:07:14 +00:00
Gabriel de Dietrich
049fad42a2 QWindow: Make screen warning more informative
Change-Id: Icd7933422e272434370ae6080348de6159d2e725
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-17 04:57:53 +00:00
Gabriel de Dietrich
9212727813 QOpenGLExtensionMatcher: Fix possible use of unintialized memory
Some drivers don't support GL_NUM_EXTENSIONS, so we may be reading
random bits from numExtensions.

Change-Id: Ibe61fa6d7c379f3f1428458edd3e0ddba0eb04d7
Task-number: QTBUG-48943
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-02-17 04:57:21 +00:00
Anton Kudryavtsev
a3b8e355fc QListView: fix skipping indexes in selectedIndexes().
Remove spurious increment of i.

Task-number: QTBUG-51086
Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-17 04:53:16 +00:00
Maurice Kalinowski
5b727576b1 winrt: add logging to platform plugin
Task-number: QTBUG-38114
Change-Id: I24c96bb2e29e1bbfe93dfe45aa764451aa9ddde8
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:52:41 +00:00
Maurice Kalinowski
e7a06c9843 winrt: Fix clipboard
Native implementation was missing and so far it only used the Qt
internal fallback mode.

Unfortunately this does not apply to Windows Phone 8.1.

Task-number: QTBUG-49766
Change-Id: I8cbbb0c843d077d7df1396d673fedeab2799b5a6
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:51:46 +00:00
Maurice Kalinowski
ad16703fa8 Update testdata
Some entries were not updated and tests failed to succeed on platforms
which need to deploy content/testdata.

Change-Id: Ieb2b44c375b04cbaaecc1fb2303cc2478b86a100
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:50:50 +00:00
Maurice Kalinowski
8b0dc80294 winrt: Fix usage of testdata
testdata needs to be deployed to temp and current directory
needs to be set to that directory for the test to succeed.

Change-Id: I2dd023af9073d90afbb4ad60fcfb50bb1af4e159
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:50:14 +00:00
Maurice Kalinowski
6c7c34f219 winrt: Disable tests which connect to localhost
WinRT does not allow do connect to the localhost due to security
constraints and sandboxing. Hence we need to disable those
currently.

Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-16 19:35:10 +00:00
Liang Qi
e19fc4324b Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2016-02-16 19:20:37 +00:00
Liang Qi
0d239d1d92 Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: Ic011149c50dcbff3468d8fbdd3069a51ecd8f21c
2016-02-15 19:04:06 +01:00
Andreas Hartmetz
e7bf0edfd4 Add option to disable "session management by closing windows".
That feature is a poor man's session management for applications
that do not implement any specific session management features.
It badly interferes with proper session management support, so
applications must be able to disable it.

This enables fixing applications with
QGuiApplication::quitOnLastWindowClosed() true - the default -
dying too early, before they are enumerated for the list of
applications to restart on session restore, thus preventing them
from being restored. See
https://bugs.kde.org/show_bug.cgi?id=354724

[ChangeLog][QtGui] Qt asking to close windows on session exit as
a fallback session management mechanism has been made optional.
Disabling it fixes session management for applications that
implement full session management. See
QGuiApplication::isFallbackSessionManagementEnabled().

Task-number: QTBUG-49667
Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-02-15 16:10:20 +00:00
Friedemann Kleint
bfb47b39f6 Windows QPA: Fix the signature of the font enumeration callbacks.
Instead of casting the function in the calls to EnumFontFamiliesEx(),
use the correct signature and cast inside the callbacks. Also
avoid unconditionally casting the TEXTMETRIC parameter to
NEWTEXTMETRICEX since according to documentation
NEWTEXTMETRICEX is passed for TrueType fonts only.

Task-number: QTBUG-50804
Change-Id: I0393474ac06000fc3f12d2dbc2a5aa37a6b44849
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-15 14:53:49 +00:00
Samuel Gaist
58141642b6 Doc: Fixed Qt::TextWordBreak to Qt::TextWordWrap
Change-Id: I0c50eab22c7ffaa7f39111b37979b92fd5c7f35f
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2016-02-15 14:22:29 +00:00
Samuel Gaist
018e670a26 OS X: Implement download folder display name query
Up to now, the download folder display name was queried using
FSFindFolder and kDesktopFolderType. Now that NSFileManager can be used
unconditionnaly, the query has been replaced to use NSFileManager.

[ChangeLog][QtCore][OS X] QStandardPaths now returns the correct
display name for the download folder.

Task-number: QTBUG-50262
Change-Id: Ie16c8daea3261a4dd5ca051956fc08d51656e0fa
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-02-15 14:22:14 +00:00
Heiko Becker
c689bcafd3 Search for libsystemd first, fall back to libsystemd-journal
systemd >= 209 merged the individual libraries libsystemd-journal,
libsystemd-login, libsystemd-id128 and libsystemd-daemon into
a single library, libsystemd. To ease the transition one could pass
an option to its build to generate stub libraries and matching
pkg-config files. With systemd >= 229 this option has now been
removed, causing the build to fail when the journald option is
enabled.

Change-Id: I26670f207f1a9e79c16be5ce8c8a49353143c5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-02-15 13:32:21 +00:00
Liang Qi
80bf4bfe3d Merge remote-tracking branch 'origin/5.6.0' into 5.6
Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
2016-02-15 08:09:50 +01:00
Friedemann Kleint
ac8a3b948d QtGui: Use QImage::constBits()/constScanLine() in non-const contexts.
Prevent potential detaching by using constBits()/constScanLine() instead
of bits()/scanLine().

Change-Id: If03f8d4d3b8ed4c07aed5eff7f580e57ca771919
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-13 08:17:00 +00:00
Friedemann Kleint
9915630d08 QPlatformWindow::screenForGeometry(): Use mapToGlobal().
QPlatformWindow::mapToGlobal() should be used to obtain global coordinates
for foreign/embedded windows. They do not have a parent QWindow, but the
geometry passed in might be local to their native parent window.
For normal top-level windows, this is a no-op.

Task-number: QTBUG-50206
Task-number: QTBUG-41186
Change-Id: I00889b28db69ae65057f48b9e74bd4d8cfffa136
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-12 18:57:19 +00:00
Friedemann Kleint
966e893151 Windows QPA: Prefer const-versions of API where applicable.
Ensure no detaching occurs by using Container::constFirst()
and QImage::constScanLine().

Change-Id: Ie197d795d9329de8be76ed388ba2c71ccf201f5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-12 18:57:00 +00:00
Maurice Kalinowski
62984d8918 Fix input pane usage on Windows 10 IoT Core
Running on Raspberry Pi casting to IInputPane2 fails with E_NO_INTERFACE
as there is no input pane available for the device.
However, if E_NO_INTERFACE is returned from the lambda, then deletion of
the ComPtr holding the AsyncAction in runOnXamlThread() crashes
somewhere deep internally of Release().

As we do not check for the return value anywhere, avoid the crash by
returning S_OK instead.

Change-Id: Icd38ec482b365285a482e5ff792ec1b4f13317d5
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-02-12 18:03:53 +00:00
Sérgio Martins
70fb36e4bd docs: State that QMap::equal_range() returns an open-ended interval
Change-Id: If31dd078aeb92e479db8c1f0a5e58e56b549b5f6
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-12 17:26:55 +00:00
Joerg Bornemann
707068bd66 Remove Windows CE build hacks from QWindowsPipeWriter
Those were added in ancient times to make QWindowsPipeWriter compile
on Windows CE. It was never used though.

Change-Id: Ica71b182f7ee4e47d9e33638d78475842b2ecdff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-12 16:46:16 +00:00
Joerg Bornemann
3cf4c492c2 Document QWinOverlappedIoNotifier restrictions
Change-Id: I13cd14c29ddaf4c7423d672b0551081f87d8726b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-12 16:46:10 +00:00
Marc Mutz
448e9fdb57 Enable NRVO in QJsonObject::keys()
... for poor compilers (such as GCC).

The test (!d) was changed to match what other
member functions test for, e.g. toVariantHash().

Change-Id: I85aee0df6e50da3623ad0afce24abb586e0bd1bc
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-12 16:33:04 +00:00
Błażej Szczygieł
8dc55367ca QtGui: Avoid rgba64->rgba32 conversion on every pixel in gradient
Convert rgba64 color table to a new rgb32 color table only once. Use
this cache when required.

This patch can 2x speed up gradient painting using 32bit color format.

Task-number: QTBUG-50930
Change-Id: I9212e01e397c2e0127cdf3070cc49880a2d8df88
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2016-02-12 16:20:36 +00:00
Ariel Molina
2ee7541616 Optionally force delivery of TUIO pseudo touch events
TUIO is not a standard "device" as the first application takes
exclusive ownership, this patch makes it deliver the events to the root
window when the app is not focused, allowing for interactive
application development on simulators running on the same desktop.
To force delivery set the environment variable
QT_TUIOTOUCH_DELIVER_WITHOUT_FOCUS to 1

Change-Id: I157f59982a1b2025ef8efdf709fe40c78339c1b4
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-02-12 04:08:43 +00:00
Ariel Molina
3fa7035b53 Fixed bug preventing parsing of unbundled TUIO messages
Unbundled TUIO messages were being ignored. TUIO protocol
defaults to bundled but states it should work with any
Open Sound Control (OSC) implementation. Unbundled handling
was already in place, just fixed the logic to make it work.

Change-Id: I6d91449bd2069ac891e493fb7f50c010bcc3e8be
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-02-11 23:12:59 +00:00
Simo Fält
5d8354e63a Autotest: Enable make check on rhel 7.1
Blacklisting all tests, which were failing locally.

Task-number: QTQAINFRA-949
Change-Id: I40c25ab0155b8977596d61297ab252a546515f87
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2016-02-11 05:47:38 +00:00
Sérgio Martins
4fc070a419 QLocale: Use QVariant::toStringList() instead of template instantiation
Avoids (binary) code duplication.

Change-Id: I57a23e2f6e151963163d8073b309b3562f8e8684
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-10 20:36:05 +00:00
Sérgio Martins
2c9f6b1a18 Fix usage of QMutexLocker, destroy it only at end of scope
Change-Id: I87f2c433c987b5f7b4680639cae51cdf6ce9ddc6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-10 20:35:52 +00:00
Friedemann Kleint
e395bda9a5 Windows accessibility: Add override declaration.
Change-Id: I982c91a9316f10a5e6d88abd60c028664ed3e28e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-10 12:43:59 +00:00
Friedemann Kleint
d145929fd7 Windows accessibility: Remove some cruft.
Change-Id: I5cb35bdd5441a8dd7a51193048b32a6feccba2b2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-10 12:43:56 +00:00
Friedemann Kleint
5cf6a8a50c QWindowsVistaStyle: Suppress animation when QLineEdit's base color is set.
Introduce utility function to check using
QWindowsXPStylePrivate::isLineEditBaseColorSet().

Task-number: QTBUG-40634
Change-Id: Iaa6962a17217352aa59d0c54421b764ad47d3bf8
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-02-10 12:43:45 +00:00
Friedemann Kleint
6cb462d7aa QWindowsXPStyle: Introduce utility function for QLineEdit's palette.
Introduce QWindowsXPStylePrivate::isLineEditBaseColorSet() checking
whether the base color has been set in the widget's palette taking
into account the QSpinBox special case and simplify the code
accordingly.

Task-number: QTBUG-40634
Change-Id: I0e7527031b333d71727fbd30db6dd80aa715c9ab
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-02-10 12:43:40 +00:00
Aleix Pol
8b4ac65e29 Provide QCss with the correct font for <pre> blocks
Labels would use a statically defined font for <pre> blocks.
Use the one defined by the QPlatformTheme instead, through
QFontDatabase::systemFont(FixedFont)

Task-number: QTBUG-50564
Change-Id: I5491bd0defce651bdf809bcbc6a529a900f4959b
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2016-02-09 21:24:46 +00:00
Eskil Abrahamsen Blomfeldt
8c2b426600 Account for hinting preference in alpha map bounding box
We would ignore the vertical hinting when calculating the
bounding box, giving an off-by-one error in the base line of
some characters when rendering with PreferVerticalHinting,
which is the default when doing High-DPI on Windows.

Task-number: QTBUG-50940
Change-Id: I2846765ec044eaf317026ee8c7bb9588257bf05c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-02-09 18:04:21 +00:00
Friedemann Kleint
f5b9cdbb08 HighDPI: Extend exposed region to avoid artifacts by rounding.
Introduce a special scaling function fromNativeLocalExposedRegion()
for exposed regions that uses the floor of the top left point
and the ceiling of the bottom right point similarly to how it
was done in the XCB plugin in 5.5.

Task-number: QTBUG-46615
Task-number: QTBUG-50463
Change-Id: I95e4a571b814357c014605ed79e374a821fa155b
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-02-09 18:04:12 +00:00
Edward Welbourne
22c262d2d7 Readability fix for MS isRelative, isAbsolute.
The layout and phrasing of these two QFileSystemEntry methods was such
as to obscure what they actually test.  (Overlong lines, extraneous
parentheses, spurious conditions and poor line-breaking.)  Rewrote to
make both clearer; and, in particular, to make it obvious that they
are *not* mutually complementary.  Behavior is not changed.

Change-Id: If748e48d41fe3a76bab3a1f840c7b7ca62442f8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-09 16:12:12 +00:00
Maurice Kalinowski
2ddd11dde2 Cleanup testcase for platforms without QProcess support.
Change-Id: Ib56c90262605ad975772f6b26c6232020e308ca6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-09 15:45:17 +00:00
Friedemann Kleint
42f788ffe2 QWindow::setMask(): Apply High DPI scaling.
Move code from QWidget::setMask() and reimplement QWidget::setMask()
using QWindow::setMask().

Task-number: QTBUG-50938
Change-Id: I040688d6b18df91368fa6ab6392a3b4cd80f2683
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-02-09 15:40:56 +00:00