Commit Graph

33809 Commits

Author SHA1 Message Date
Shawn Rutledge
83729ad7a1 make the QTouchDevice available in each QNativeGestureEvent
QtQuick is beginning to have a use for this, to distinguish native
gestures which come from actual trackpad rather than from the "core pointer".
It might as well use a real device ID instead of making one up,
as it has to do for the core pointer.

So far on macOS, the device ID isn't a real one; but that can be fixed,
as the qCDebug lines demonstrate (different trackpads have different IDs).

Change-Id: I5841deb1c4cc0b77a3b1df70904f70b3d2d71853
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-09-21 16:35:06 +00:00
Timur Pocheptsov
be0a9a7688 Fix loadOpenSslWin32
The libraries are now 'libssl-1_1' and 'libcrypto-1_1', not 'ssleay32' or
'libeay32'. 64-bit versions also have -x64 suffix in their names.

Task-number: QTBUG-62692
Change-Id: Ic15bf8f8271d0f6266cb9d2143e292ddba643ded
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-09-21 12:55:04 +00:00
Morten Johan Sørvig
3ad8295451 Revert "macOS: Deduplicate QNSWindow/QNSPanel code"
All Qt applications crash on startup on macOS 10.13 with an
infinite recursion in -[QNSWindow sendEvent:].

This reverts commit a980250a66.

Change-Id: I155a89e61b1695f18627bf158389eb130b98751a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-21 12:34:54 +00:00
Liang Qi
e5114e10dc Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2017-09-21 06:55:09 +00:00
Sebastian Sauer
5a918ad866 XCB/Input methods: Implement IBus HidePreeditText and ShowPreeditText
IBus engines that call HidePreeditText() or ShowPreeditText() not work
correctly on Qt5 because the ibus platforminputcontext plugin does not
implement this functions.

Patch-By: Fuminobu Takeyama
Task-number: QTBUG-48412
Change-Id: I936d4c46518b5bee7c5ad2b03d8c24202ab1074e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
2017-09-21 04:21:53 +00:00
Friedemann Kleint
34aa7a18af QOperatingSystemVersion: Add debug operator
Change-Id: Ibc942196bef0edc74f34501830fc83cb64259e39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-09-20 12:19:56 +00:00
Friedemann Kleint
29b38bea45 Polish the StorageView example
Introduce nullptr and override. Change the ready/valid columns to
use check marks. Right-align the numerical columns. Add a shortcut
to refresh. Sort by path, making sure the root volume is first.

Task-number: QTBUG-60635
Change-Id: I74cda7647f544902aaf4d2a0ab76986f1523aa6f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2017-09-20 12:19:39 +00:00
Liang Qi
01bc69f99f Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/util/qcompleter.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmdisubwindow.cpp

Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
2017-09-20 11:58:32 +02:00
Tony Sarajärvi
bf41fbb233 Blacklist tst_QGraphicsScene::isActive in openSUSE 42.3
This autotest is blacklisted as it is deemed flaky.

Task-number: QTBUG-63260
Change-Id: I3e83bcb0dbbe4fbf9d5c16f764fbeeca2b52d10c
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2017-09-20 09:48:36 +00:00
Alex Trotsenko
aa4e6345bb QHttpSocketEngine: replace dummy buffer + read() with skip()
Change-Id: Iace00f478b0ea5dc3f874f337212b996af1e5104
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-09-19 18:45:02 +00:00
Kevin Funk
58c14c4a7e Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
  (definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:55 +00:00
Kevin Funk
47c92fbb0b Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in:

src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
  (definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:42 +00:00
Stephan Binner
6d699d0820 Convert features.menu to QT_[REQUIRE_]CONFIG
Change-Id: I031356411294b259ebd2b22c53159c93fd92af6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-19 10:57:12 +00:00
Stephan Binner
9833e68217 Convert features.textedit to QT_[REQUIRE_]CONFIG
Change-Id: I0fb0e658796484f374586d8d1f0f1b9167ab30d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-19 10:57:08 +00:00
Laszlo Agocs
14e20bb474 windows: Blacklist Intel 8.15.10.1749
Task-number: QTBUG-56360
Change-Id: I438e58e13b364a7c4748a4325cb7ff00bb00b25b
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-19 10:52:49 +00:00
Laszlo Agocs
93dd85141b kms: Discover all available planes
Task-number: QTBUG-63058
Change-Id: I655384916bedbeb0da516e2eaa177d1128272d1c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-09-19 09:22:10 +00:00
Laszlo Agocs
a31b5bf5da eglfs_kms: Remove unused virtuals and move flip callback
...to the screen, where it belongs.

Task-number: QTBUG-63088
Change-Id: I4bfc4c259f91431d12851f888a7d044e43856d63
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-09-19 09:22:04 +00:00
Laszlo Agocs
6ada5f876e eglfs: Forward nativeRes.ForInteg.() to backends
Expose the fd from eglfs_kms. More exposed bits will follow
later on.

[ChangeLog][Platform Specific Changes][eglfs] The DRM+GBM backend
now exposes the DRM/GBM device handle under the key "dri_fd",
queriable via nativeResourceForIntegration().

Task-number: QTBUG-63088
Change-Id: Iac95393c115bb83d1f65cb4a7acc0ea3e7d3e68f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-09-19 09:21:59 +00:00
Laszlo Agocs
c6439a00b1 eglfs: Allow forwarding platformFunction() to backends
Task-number: QTBUG-63088
Change-Id: I52cc56324c755cc4f7c9388470bfd27793b4abeb
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-09-19 09:21:55 +00:00
Laszlo Agocs
d47475bf65 eglfs_kms: Move out window subclass from integration
Clean up the includes too while we are at it.

Task-number: QTBUG-63058
Change-Id: I36eaaa5fc18219ca271b6bea8425ac8cc7cb8b6d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-09-19 09:21:50 +00:00
Laszlo Agocs
9273044567 kms: Fix crtc allocation logic
The intention of choosing a different CRTC for each connector is fine,
but the code is flawed: the bitmask thas marks used crtc must be based
on the crtc index, not the id.

In practice the fix makes a difference only when multiple connectors
are in use and there are crtc ids above 31.

Task-number: QTBUG-63058
Change-Id: I74e01add72df9c6e0b8fbddab978c102573a282c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-09-19 09:21:46 +00:00
Laszlo Agocs
d6c828c65a kms: Rename the plane index workaround vars appropriately
...and purge support from eglfs_kms. That path never worked, the environment
variable was meant for the NVIDIA backend only.

Task-number: QTBUG-63058
Change-Id: I8cf47168d5878e18eb22c839d56e2d48cbb4fdad
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-09-19 09:21:38 +00:00
Allan Sandfeld Jensen
6c4a1914e0 Hide ibus IM on password fields
We haven't hooked on any of the properties to tell ibus IMs the type of
field or that it should be hidden, so hide it like is standard.

Change-Id: Iaa64c669f7162b60c16971ec962101b974108e65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-09-18 22:20:05 +00:00
Thiago Macieira
4e30001e5f Mark Clang 5.0 as warning-free
Change-Id: I27b55fdf514247549455fffd14b17a4ae1d8ff2d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-09-18 21:21:15 +00:00
Andy Shaw
3c95c748e0 Fix recordOCI() test to treat clob/nclob as QByteArray
Change-Id: I0315b23dad66f98fc681c624d4afa8b5abb54a7b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-18 21:06:49 +00:00
Andy Shaw
2d168af7d7 OCI: Use correct type for getting doubles
Change-Id: Iffb81a37a517e58d48757d82f93f20e8c5100033
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-18 21:06:42 +00:00
Jake Petroules
83122b1932 Remove unnecessary VxWorks ifdef
Change-Id: Ie655bdff9a09c6060f66e4346b94ba52443241f4
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-18 21:06:25 +00:00
Jake Petroules
54a242f7ed Add missing pwd.h include
This file uses functions declared in this header, and it is not pulled
in transitively on all platforms.

Change-Id: I6654118883a8dc22dacf1beb7b9b1c662719d25c
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-18 21:06:21 +00:00
Thiago Macieira
9378bce442 Port QSemaphore to use futexes
This is interesting because QSemaphore now needs to allocate no memory:
it's just a simple 31-bit counter and the contention flag.

Change-Id: I6e9274c1e7444ad48c81fffd14dbc0ab42bc2e00
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-18 17:39:09 +00:00
Thiago Macieira
5b5153fd5b Move the futex implementation to a header
So I can use it in QSemaphore and provide a Windows implementation.

Change-Id: I6e9274c1e7444ad48c81fffd14dbc0a8e2201302
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-18 17:39:08 +00:00
Giuseppe D'Angelo
6011e8a9eb QRegion: explain why there's an apparently unused variable
The variable is there to work around an aliasing issue.
Since this code is likely coming straight from Qt 2 or 3,
I'm not doing any major modification, just explaining why that
variable is necessary and mark it as unused (so that a static
analyzer that knows about value classes won't complain that
we're creating a QVector without using it).

Change-Id: Ie8777563724ec3c0bf97d8bc24e1b184fe26bd2f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2017-09-18 15:13:53 +00:00
Jake Petroules
69b16a46e8 Exclude QSystemSemaphore test with -no-feature-systemsemaphore
Change-Id: I9db6b68c3d26b27a0203c68c48ab73602eb15095
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-09-18 08:56:53 +00:00
Giuseppe D'Angelo
0d409f2d4e ModelTest: cleanups
In preparation to move the code into QTestLib proper.

* Move to PMF-based connect() statements
* Remove a bunch of commented out code
* Streamline the logging of debugging / warnings, use categorized logging

Change-Id: Iec0872b63959decce49487762472c9a82bcc9fa1
Reviewed-by: David Faure <david.faure@kdab.com>
2017-09-17 21:27:58 +00:00
Giuseppe D'Angelo
fc208838ae QScopedPointer: add get()
For self-consistency with QSharedPointer and minor consistency
with std::unique_ptr (although QScopedPointer isn't movable, so we
can't claim STL compatibility with it).

[ChangeLog][QtCore][QScopedPointer] Added get().

Change-Id: Ib58f936afa0e0d5bce57a61d1467b69956f37ceb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-17 11:42:26 +00:00
Giuseppe D'Angelo
81a19050d8 QSharedPointer: fix undefined behavior in operator<
Pointers belonging to different arrays must be compared using
std::less.

Change-Id: Ib77af7b1b2da58d7243fa77273a8a45ee9035a1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-17 11:41:40 +00:00
Jake Petroules
2740b9d668 Use QT_LSTAT instead of lstat directly
Not all platforms (such as VxWorks) have lstat.

Change-Id: If42f0041f9a6d9bec0a355173c88f28f1819bd57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-15 20:52:23 +00:00
Giuseppe D'Angelo
72f700edd6 tst_qidentityproxymodel: map the index to the source model
In data(), index belongs to the proxy, not to the source. It needs
to be mapped back to it first.

Change-Id: Ie5dcbf13166dadf62f3d85b594d3227383132521
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-15 13:52:10 +00:00
Shawn Rutledge
d0e93b128d iOS: disable Apple Pencil support if configure -no-feature-tabletevent
Task-number: QTBUG-59042
Change-Id: Ia60cb01206316ae85fffac44c453803f39d3a611
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-09-15 12:13:58 +00:00
Shawn Rutledge
0d51767b5d Tablet example: update only the drawn areas of the canvas
This makes an enormous difference in responsiveness on the iPad Pro:
it actually feels like real-time drawing with hardly any lag.

Change-Id: I17c3b948e818d4ee46b4d24934c929ab9b386e69
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-09-15 12:13:51 +00:00
Jake Petroules
7127202358 Exclude tst_QDir::mkdirOnSymlink on Unix platforms without symlinks
One example is VxWorks.

Change-Id: I253df715a9417c1f9cede79b1e1860924e0da8a9
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-15 11:20:32 +00:00
Jake Petroules
ceffc7e0e7 Exclude DBus performance test with -no-feature-process
Change-Id: I3e650b21139bd59b1f8386f4abb39aadf85e412f
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-15 11:20:21 +00:00
Lars Knoll
c248a1fa57 Fix compilation with clang 4 on Linux
Change-Id: I7fdafeced7cdef7a97b4e004e9302cb2f1e6f258
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-09-15 10:29:06 +00:00
Robert Loehning
2d7b143085 Fix conditions in some QMAKE_COMPILER_DEFINES assignments
We obviously should check the variable we're about to get the data from.

Amends 1216f596bd.

Change-Id: Ibe87138b9c9aa99837b4fbf3769cd26ca1aaacb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-09-15 09:03:12 +00:00
Friedemann Kleint
c23c4a921d Fix documentation code snippet of QString::arg(QStringView)
Fix qdoc warning:
src/corelib/tools/qstring.cpp:7809: warning: Command '\snippet (//! [11-qstringview])' failed at end of file 'qstring/main.cpp'

Change-Id: Ie5a57bd94ba64ceab5179593f1df35be29c9985a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-09-15 07:46:00 +00:00
Shawn Rutledge
b87a2b3508 Add Apple Pencil support on iOS
The Apple Pencil now generates QTabletEvents, with tilt, rotation and pressure.
Predicted touches are not supported, because we don't yet have a suitable
QEvent or flag for that.

[ChangeLog][iOS] The Apple Pencil now generates QTabletEvents, with the
complete feature set (tilt, rotation, pressure).

Task-number: QTBUG-59042
Change-Id: Id58e22ac4cf8dfa80519d516c388309966f773f9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2017-09-14 15:05:50 +00:00
Thiago Macieira
5d48143ff8 Autotest: use QUdpSocket instead of QTcpSocket in tst_QNetworkInterface
We don't need to bother the network test server with a TCP SYN packet.
All we need is for the local operating system to figure out the IP
address it would use to send a packet to the test server. We can do that
with QUdpSocket.

Also, the network test server hasn't been called "fluke.troll.no" for
almost a decade.

Change-Id: I209fcd5dbc2b4e5381cffffd14df65ccc7133247
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-09-14 13:17:02 +00:00
Timur Pocheptsov
6aa001570d Fix OpenSSL 1.1 build
Fix the 'shared' OpenSSL code for those our users who build with QSSLSOCKET_DEBUG
defined and OpenSSL 1.1 detected: the preprocessor-excluded fragment is using old
API. Also remove never used in this file (and commented out) macro.

Task-number: QTBUG-63170
Change-Id: Id24ccf2955f0a65e4f1dea1ecb06e10245105080
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-09-14 12:18:34 +00:00
Tobias Koenig
62ea3eaf05 Improve PDF/A-1b support in QPdfWriter
Fix warning of missing F key in Annot directory. The F key needs
to have the printing flag (bit 3) enabled and all other bits disabled.
(Clause 6.5.3 in ISO 19005-1:2005)

Change-Id: Iddba6b71f516aca75cd573584aa184c1b808863d
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-09-14 11:56:54 +00:00
Joerg Bornemann
342609b542 Fix quoting of mocinclude.opt for paths containing spaces
If MOC_INCLUDEPATH exceeds a certain limit, its content is written into
a file named mocinclude.opt, which is then passed to moc as a response
file. That moc parameter was not properly quoted, and the moc call
failed for paths containing spaces.

Task-number: QTBUG-63197
Change-Id: Ib0542d80ce1bab239e0e6b6e24fadd11007b1846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-14 11:22:49 +00:00
Michael Winkelmann
3d67793a9e Revamp SQL examples to C++11
Changed signals and slots to new syntax, used nullptr and replaced
foreach with new C++11 range based for loops.
Also fixed a few minor flaws.

Task-number: QTBUG-60633
Change-Id: Ice4030133971912f96752d9d84c638c70fd73e35
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-14 10:48:48 +00:00