Commit Graph

31982 Commits

Author SHA1 Message Date
Stephan Binner
45f7d35f7b Fix warning for -no-feature-gestures
Change-Id: Iaadc4e27ee2a75a8c053de4438ef74daaa48ee64
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-19 08:00:16 +00:00
Stephan Binner
dde83fdeeb Fix warnings for -no-feature-texthtmlparser
Change-Id: Ie757e4ecb9ced14bd809f56d2d3d09274fc3bc39
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-19 08:00:06 +00:00
Friedemann Kleint
2381332b0d Doc: Hide QPA classes
Mark QPlatformGraphicsBuffer and QSystemTrayIcon as internal.

Change-Id: I39e5b4f635fca21ab0544cd840a113514b6b1e99
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-19 07:25:05 +00:00
Friedemann Kleint
c5dafb177f Add debug output for QScrollPrepareEvent and QScrollEvent
Change-Id: If283cecbefdf20c80ce00f689003f6a0ed9fe42b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-19 06:29:50 +00:00
Tor Arne Vestbø
47cc9e23a3 Initialize QLoggingRegistry rules on first use, not qApp construction
Allows categorized logging before QCoreApplication has been created,
which otherwise would silently fail to output anything because the
category would never be enabled, despite QT_LOGGING_RULES being set.

Change-Id: Ia733105c5b6f28e22af511ced5271e45782da12b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-18 21:09:43 +00:00
Friedemann Kleint
9595622e36 QGraphicsBlurEffect: Fix for high DPI scaling
Preserve the device pixel ratio in the various helper functions
and when drawing.

Task-number: QTBUG-60026
Change-Id: Ieac9360b00044b6aedd0d3e1ad6e3b16d436f20f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-18 20:27:36 +00:00
Nico Vertriest
fc2f0fb390 Doc: add missing doc for parameters
qhstspolicy.cpp:105: warning: Undocumented parameter 'flags' in QHstsPolicy::QHstsPolicy()
qhstspolicy.cpp:105: warning: No such parameter 'includeSubDomains' in QHstsPolicy::QHstsPolicy()
qnetworkaccessmanager.cpp:732: warning: Undocumented parameter 'knownHosts' in QNetworkAccessManager::addStrictTransportSecurityHosts()

Change-Id: I24217d328df12febab30e19e2abd351e87007959
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-04-18 14:18:36 +00:00
Friedemann Kleint
8b62673d9f QGraphicsDropShadowEffect: Fix for high DPI scaling
Preserve the device pixel ratio.

Task-number: QTBUG-60026
Change-Id: Ie818c582fe2c7b11ceb347b39cfbf7ea49361021
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-18 13:08:43 +00:00
Leena Miettinen
84fb8c5ec9 Doc: Remove broken link to QWindowSystemInterface::registerTouchDevice()
Mention that it is a private function. Also mention using
QTest::createTouchDevice() for adding simulated touch screens
to autotests.

Task-number: QTBUG-26647
Change-Id: I08c12225768e76b1b9e3fc0fda00af86d44ca766
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Bo Thorsen <bo@vikingsoft.eu>
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2017-04-18 12:57:45 +00:00
Friedemann Kleint
db2de20c59 QGraphicsColorizeEffect: Fix for high DPI scaling
Preserve the device pixel ratio.

Task-number: QTBUG-60026
Change-Id: I91a1bda6ce4defd064ec7edfcea40ff192a9068f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-18 12:27:57 +00:00
Nico Vertriest
f26be29ea8 Doc: add missing specs about parameters
qopengltexture.cpp:3476: warning: Undocumented parameter 'layerCount' in
QOpenGLTexture::setCompressedData() and QOpenGLTexture::setData()
qimage.cpp:2127: warning: Undocumented parameter 'format' in QImage::reinterpretAsFormat()

Change-Id: I17feb2256a29f3bb722d2de3a83b390abff85a35
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-04-18 11:33:21 +00:00
Nico Vertriest
28ea26e574 Doc: rephrase parameter description to avoid qdoc error message
Change-Id: I79d446289b4450d2fcce097cf46d2cf7b6d969da
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-04-18 10:37:50 +00:00
Tor Arne Vestbø
46976eea18 Add debug operators for font database structs for easier debugging
Change-Id: Ice1b27ff93de2d369dc6b66c72a64eb05da5639c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-18 09:40:41 +00:00
Liang Qi
18934bcb0c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/corelib/global/qglobal.cpp

Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
2017-04-18 10:46:22 +02:00
Paul Olav Tvete
bc5454d2c4 Fix build error with -no-feature-slider
Change-Id: Ia74aeefdba3ac6b831aeeaff40600e30d90183d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-18 06:59:54 +00:00
Thiago Macieira
285789781c icc: thread_local in macOS is working since 10.7
Change-Id: I0e1a09998253489388abfffd14b611b1403a0c9f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-17 16:24:47 +00:00
Ihor Dutchak
d1210281e4 Fix undefined behavior in QSharedPointer::create()
Initialize a deleter for a new object, created by
QSharedPointer::create(), only after the object is actually
constructed.

[ChangeLog][QtCore][QSharedPointer] Fixed undefined behavior when
creating an object with QSharedPointer::create() and its conscructor
throws an exception.

Task-number: QTBUG-49824
Change-Id: I07f77a78ff468d9b45b8ef133278e8cdd96a0647
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-17 09:56:15 +00:00
Thiago Macieira
34d2fd1497 Fix build with libdrm >= 2.4.78
drmEventContext has grown by one pointer, so the build fails with an
error about a member without initialization.

 qeglfskmsgbmdevice.cpp:147:5: error: missing initializer for member ‘_drmEventContext::page_flip_handler2’ [-Werror=missing-field-initializers]

Change-Id: I0e1a09998253489388abfffd14b6014b1ddc90e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-17 09:44:11 +00:00
Thiago Macieira
3bea9450e9 Update the Clang support for SIMD code generation
Clang 3.8 has support for __attribute__((target(xxx))) and its SIMD
headers can be included unconditionally.

Change-Id: Ic15b7ff417c8412893e5fffd14b5b42b950b48d7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-17 00:04:21 +00:00
Thiago Macieira
2814744a73 Update the Clang usual versions for Apple's build
Change-Id: Id69a70a52573241e1b6a05bd62a3fd01a8e78550
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-16 07:39:30 +00:00
Thiago Macieira
89c8dd30a1 qfloat16: Fix GCC warning about use of old-style cast
_mm_cvtps_ph is usually defined as a macro:
qfloat16.h:122:37: error: use of old-style cast [-Werror=old-style-cast]

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b516ec47826c0c
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-15 03:33:33 +00:00
Gabriel de Dietrich
d5d31c64a4 QSplitter::replaceWidget(): Add geometry related remark
The late geometry update on the widget has been confusing
some of our users.

Change-Id: I7f2600322be0a0c54fac3beb42065413a0693f74
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-14 17:06:27 +00:00
Dongmei Wang
ae6ef2e3ec QMenu: Fix torn-off menu display crash issue
When tearing off either a non-scrollable multi-colume menu
or a scrollable menu, displaying the torn-off menu crashes.
The root cause is when the torn-off menu is created, the
tear-off menu's style, margins and other attributes are not
set to it. The patch is to ensure the torn-off menu has
the same attributes as the tear-off menu does and set the
torn-off menu with a correct menu size.

Task-number: QTBUG-24815
Change-Id: Icea45f149ea8792671af4a62e62cad6ee01a1f95
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-14 17:06:12 +00:00
Dongmei Wang
eea585ad0b QMenu: Fix margins related display issues
Currently the contents margins and the menu paddings are not considered
for calculating the menu size, the positions and the size of tear-off
bar, scrollers and the positions of the menu items when scrolling the
menu, which results in the following problems when valid contents
margins and/or menu paddings are set:

- The tear off area is displayed in a wrong position. The mouse events
are not handled correctly in the tear off area. For example, when you
click in the tear off area, the menu should be torn off but nothing
happens
- For a multi-column menu, the menu width is not calculated correctly
- For a scrollable menu,
  - the menu width is not calculated correctly
  - the menu items are not displayed in correct positions
  - the scrollers are not displayed in correct positions
  - menu items are displayed on the area of borders and margins when
    scrolling the menu
  - the last menu item is not displayed above the bottom of the content
    area when scrolling the menu to the end.

The changes are to fix the problems above.

Change-Id: I7931e1088dff0029f2d4825e2aa34b4e32fdccd9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-14 17:06:00 +00:00
Marc Mutz
e1c8451ffe QVariant: implement QByteArray ↔ QUuid conversion
Seems like an obvious omission.

[ChangeLog][QtCore][QVariant] Can now convert QUuid to and from
QByteArray, not just QString.

Change-Id: Ib56ae86ca0c27adaf1e095b6b85e64fe64ea8d18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-14 12:54:21 +00:00
Marc Mutz
5662234afa QMatrix4x4: fix aliasing problem in operator*=
When multiplying a QMatrix4x4 by itself, we were clobbering the very
matrix we read from. Employ read-caching to avoid this aliasing problem.

[ChangeLog][QtGui][QMatrix4x4] operator*=() now calculates the correct
result even if the RHS and LHS are the same object.

Change-Id: I8534d56cfdd62c336577125127f05173fcec2873
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-04-14 12:29:35 +00:00
Jake Petroules
097073fa67 Fix precompiled headers on Apple platforms, with multiple architectures
The original commit only added support for GCC and Clang, but not ICC.

Amends 73331eeb

Change-Id: Id7638cf1b538edb1008fb3aa10754c1f517a994f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-14 00:00:56 +00:00
Friedemann Kleint
eca6f5492c Windows QPA: Move initialization of resources out of the Qt namespace
Q_INIT_RESOURCE() should not be within the Qt namespace; the
namespace is appended to the resource function.

Task-number: QTBUG-60118
Change-Id: I05203c3196ccdcffaf27658bcd7f3ec1c25f22d9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-04-13 12:40:03 +00:00
Simon Hausmann
f074d72c8f Preserve last modification timestamps of installed program files
Similar to the parent commit, this patch adds a unified code path in
qmake itself for installing program files while preserving their
original last modification timestamp.

Change-Id: I7b7dcfa6228c2bfd48ea6036549398bb6f90032f
Task-number: QTBUG-59004
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-13 11:33:21 +00:00
Jake Petroules
fbcdf6d753 Be more explicit about the supported platforms for OpenGL ES 2
The OpenGLES framework is only supported on iOS and tvOS, and does not
exist on macOS and watchOS.

Change-Id: I643d3bdac522b67a8d945648dfcc8f1780ab0d7f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-04-13 02:11:12 +00:00
Gabriel de Dietrich
e7443b88fc bootstrap: Remove redundant occurrence of qcore_foundation.mm
Already added in the "mac" clause.

Change-Id: I272882347cb65ef32e5aae7b1eee9f15cede6fcb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-12 23:24:31 +00:00
Samuel Gaist
98e0cb0a28 Doc: updated QSyntaxHighlighter documentation and use QRegularExpression
The documentation of QSyntaxHighlighter still uses the deprecated
QRegExp class. This patch updates the code samples as well as cleanup
some typos.

Change-Id: I87b525fddb560b7c5bb38f96d9aaceadb594f76c
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-04-12 22:09:43 +00:00
Giuseppe D'Angelo
feaaca456b QLocale: do not test for Q_OS_MAC before including qglobal.h
Found by clazy.

Change-Id: I66b6698c309720891db83626e18c5e1baca19091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-12 18:31:33 +00:00
Liang Qi
94c576cf66 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
2017-04-12 20:08:56 +02:00
Simon Hausmann
2ad7f6ddf5 Preserve last modification timestamps of installed files
On non-windows platforms, we use the "-p" parameter of install(1) to
preserve the last modification timestamps of files. On Windows the use
of copy does not preserve them. As a cross-platform solution, this patch
introduces a simple built-in install command in qmake to copy files.

Task-number: QTBUG-59004
Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-12 15:50:51 +00:00
Marco Trevisan (Treviño)
b727f11c2e QFontconfigDatabase: properly parse desktop environment variable
$XDG_CURRENT_DESKTOP is defined as a colon-separated list of
desktop strings, thus we can't check for equality, but split it
and check if it contains the desktop environments we care about.

Change-Id: Ia9ab0f28654a3e1a68b918794a079f3974f85642
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2017-04-12 11:11:32 +00:00
Tor Arne Vestbø
7f29367c09 Prevent QWindow transient parent loop
Clients may wrongly set the transient parent to the window itself,
causing endless loop when e.g. looking for the top level parent.

Change-Id: Ib23cae3a5576320435ae9b76dd618d1e5ae08b5d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-12 10:00:52 +00:00
Sami Nurmenniemi
6e649f9714 Skip testing of QOpenGlConfig on platforms that don't support it
Task-number: QTBUG-59966
Change-Id: If74657d0a0133c67f57bf92ae96d2d868d523f0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-12 08:36:39 +00:00
Sami Nurmenniemi
a890337433 Fix tst_toolsupport on 32-bit arm platform
On 32-bit arm platform, qint64 gets aligned differently than on 32-bit
x86. First difference between the platforms on QFilePrivate member
offset happens in QFileDevicePrivate::cachedSize:
- On 32-bit x86 it's offset is 148 (4-aligned)
- On 32-bit arm it's offset is 152 (8-aligned) and offsets of all the
  remaining members are +4 compared to x86
- On 64-bit architectures the offsets are the same

Change-Id: If110da27ea08504e78b167c0a21599420eaa9630
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-12 08:36:27 +00:00
Friedemann Kleint
59d4cbca0b QWindowsFontEngineDirectWrite: Fix build with MinGW
In member function 'void tn::QWindowsFontEngineDirectWrite::collectMetrics()':
windows\qwindowsfontenginedirectwrite.cpp:361:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (table.size() >= advanceWidthMaxLocation + sizeof(quint16)) {
                      ^
Amends 17fc188aec.

Task-number: QTBUG-58954
Change-Id: Ice2ff135d411b55d32290069b3c85ca0b5ea09af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-12 08:32:00 +00:00
Błażej Szczygieł
bdd5a67e65 QtWidgets: Don't open submenus when mouse is moving between actions
Don't set the current action during closing submenu when mouse moved
more than one action in the menu to the top or to the bottom.

Task-number: QTBUG-53215
Change-Id: I2383363bc48f644df046198662dfa4d080fe3f1d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-12 07:29:18 +00:00
Marc Mutz
11ed95ac9c Improve QStringBuilder docs
- Mention you can build QByteArrays, too
- Nicer list of types that can be used, separate for QByteArray and
  QString

Change-Id: Ia91445f0cb4872bab12a55f4812c283e9c38dba4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-12 06:46:12 +00:00
Thiago Macieira
cdc5f47aeb Restore compatibility with Qt 5.7.0 and 5.6.1
QSysInfo::productType() returned "osx" for all versions of macOS, even
10.12. Change 3e2bde3578 was incorrect.

[ChangeLog][Important Behavior Changes] QSysInfo::productType() and
QFileSelector behavior on macOS was restored to match what Qt used to
return in version 5.7.0 and earlier. The behavior found in Qt 5.6.2,
5.7.1 and 5.8.0 is removed.

[ChangeLog][Future Compatibility Notice] The identifiers that
QSysInfo::productType() and QFileSelector will use to identify macOS
systems will change in Qt 6.0 to match the Apple naming guidelines which
will be current then.

Task-number: QTBUG-59849
Change-Id: Ib0e40a7a3ebc44329f23fffd14b2b39392210c4f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 05:14:19 +00:00
Thiago Macieira
e45516ea0d QSysInfo: Bring back suppression of ICC warning #1478
Turns out that different versions of ICC use different warning numbers.
The Linux and Windows compilers emit 1786, but the macOS one emits 1478.
Don't ask me why.

Change-Id: I523b0abacd5148b2bf08fffd14b475a4c4d89ba1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 03:37:11 +00:00
Thiago Macieira
8ccd38d20d Move Apple-specific -fapplication-extensions option to the mkspec
The Intel compiler does not know about it.

Change-Id: I523b0abacd5148b2bf08fffd14b4748c3b33c8fb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 03:37:01 +00:00
Jake Petroules
cd5c8e78c7 QProcess: fix Unix build
This fixes a regression introduced in ff19ebcc

Task-number: QTBUG-60046
Change-Id: I47c357433b25f07011a7a3a64d3150591785b206
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-04-11 17:07:19 +00:00
Andy Shaw
1cd8c6f48e Make networkAccessibility() return the actual state of the network
If networkAccessibility() was queried when the networkAccessibleChanged
signal was emitted then it would report the wrong state and in some
instances it would incorrectly report NotAccessible. This ensures that
it is reflecting what the signal would have been emitted with.

Change-Id: Ib0a7ef9e9ec42c9007340020fd535c8ad36caa49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-04-11 16:31:32 +00:00
Tor Arne Vestbø
f9226217d1 macOS: Prevent leaking font data when creating QRawFont from QByteArrays
CTFontCreateWithGraphicsFont has a bug causing it to never release the
graphics font, which cascades down to the data provider never being
released and releaseFontData never being called.

Instead of relying on a callback to release the byte array font data,
we attach the font data to the engine's lifetime. Note that we are
still leaking the CoreFoundation types.

Change-Id: I6eda4212638ccc9439b90e004222272d204c707a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 14:30:26 +00:00
Tor Arne Vestbø
31273f079e macOS: Don't marshal app font data via URL when using FreeType font engine
Font descriptors can have attached attributes of any kind, not just pre-
defined constants like kCTFontURLAttribute. We take advantage of this and
attach the font data that was passed into addApplicationFont() to the
font descriptor, so we can read it out directly when later creating an
engine for it. This removes the need to build up a URL to represent the
font data, which also didn't work for the memory-font use-case. The
FreeType font engine now passes the same tst_QFontDatabase tests on
macOS as the native CoreText font engine.

This also fixes the leak caused by CTFontCreateWithGraphicsFont never
releasing the graphics font, resulting in releaseFontData never being
called:

  http://stackoverflow.com/questions/40805382/

We're now cleaning up the font data in releaseHandle, based on the
attribute set on the font descriptor.

Change-Id: Iba15222ec919f989e29fd98b263d9fb182c4d710
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-11 14:30:18 +00:00
Rolf Eike Beer
6ef07e0902 Qt5DBusMacros: remove intermediate variable
This has been there probably forever, likely from the time when the code
was derived from upstream CMake. Since this is just copying one variable
to another and the latter has a wrong name (_qt4_*) just drop it.

Change-Id: Ica74f3bc9a6b0a6669d80cfc0ebafc003f5b908e
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 14:07:29 +00:00