Commit Graph

39099 Commits

Author SHA1 Message Date
Edward Welbourne
84aea6c091 Add qFpClassify() to mirror std::fpclassify()
The rules of std don't permit us to add an overload for
fpclassify(qfloat16), so we need our own equivalent that we *can*
overload.  Deploy it in the few places we use fpclassify().

Extended qnumeric's testing to cover qFpClassify().

Change-Id: Ie5a0a5cc24599d1571404c573d33c682b0d305a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-03-19 17:52:30 +00:00
Edward Welbourne
368eb2ecec Refine and extend tst_qnumeric's checks on infinity and NaN
Renamed the test, since it covers both, verified slightly more and
added checks that QCOMPARE() copes as intended.  Fixed some minor
coding-style defects in the process.

Change-Id: I49c2ffa0568a29e9e4b7f7395d4cacdeb0401da0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-19 17:52:20 +00:00
Edward Welbourne
c0ab2ad98f Clean up and document the generator for qurltld_p.h
This scans the public suffix list and emits suitable content for the
header.  Made some modest efficiency gains while hopefully making the
code easier to understand.  Check for success when opening files.

Change-Id: If6b25c5c85f86209b33d9188743e820690e7dc05
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-19 17:52:09 +00:00
Qt Forward Merge Bot
11b9c813e6 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ief0a0b754c104d5348fee9ee15e967bd37c526f8
2019-03-16 01:01:30 +01:00
Liang Qi
8cc8eb8f24 Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev 2019-03-15 19:04:30 +00:00
Mårten Nordheim
73a2e9c409 tst_qhostinfo: remove dependency on network test server
Change-Id: Ic66a60bfe80d3ec05e9826939e3739bb5549749d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-15 17:47:25 +00:00
Mårten Nordheim
7111ba1736 Schannel: support for AES-encrypted keys
Task-number: QTBUG-54422
Change-Id: I7387cdf9ca927c91cccf3dab7d2deb577ce71802
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-15 17:46:58 +00:00
Friedemann Kleint
4554fa7b19 Fix some qdoc warnings
src/network/ssl/qsslsocket.cpp:1501: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/ssl/qsslsocket.cpp:1482: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/ssl/qsslsocket.cpp:1513: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::setDefaultCiphers()'
src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCiphers()'
src/gui/opengl/qopengltexture.cpp:4137: (qdoc) warning: Can't link to 'setComparisonFunction()'
src/widgets/dialogs/qfilesystemmodel.cpp:1215: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/widgets/graphicsview/qgraphicswidget.cpp:1229: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/widgets/graphicsview/qgraphicsscene.cpp:3313: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/gui/painting/qpaintengine_raster.cpp:3438: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/widgets/widgets/qtextedit.cpp:2544: (qdoc) warning: Overrides a previous doc
src/widgets/widgets/qplaintextedit.cpp:2932: (qdoc) warning: (The previous doc is here)

Change-Id: I0c68c59a87eb6a5d9e974f857af6aca0c6e0672d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-03-15 13:13:00 +00:00
Friedemann Kleint
c306663990 Fix qdoc errors in QProcess header
Split apart the #ifdef so that qdoc on non-Windows systems sees
Q_SECURITY_ATTRIBUTES and Q_STARTUPINFO, fixing:

LOG Build & visit PCH for QtCore
src/corelib/io/qprocess.h:204:9: error: unknown type name 'Q_SECURITY_ATTRIBUTES'
src/corelib/io/qprocess.h:205:9: error: unknown type name 'Q_SECURITY_ATTRIBUTES'
src/corelib/io/qprocess.h:210:9: error: unknown type name 'Q_STARTUPINFO'

Change-Id: I50b4ee6113da4cd49b6b08b84e6e6590438c5573
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-03-15 13:12:49 +00:00
Friedemann Kleint
041296a88c Fix qdoc errors in QIcon header
Add missing forward declaration, fixing:

src/gui/image/qicon.h:93:16: error: unknown type name 'QPainter'

This apparently only happens for qdoc.

Change-Id: I39e78258f16628d477b629778241c4f5031820c4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-03-15 13:12:40 +00:00
Andy Shaw
edf2e69985 Don't increase the size of the layout unnecessarily when moving toolbars
When the toolbar was moved from one position to another it could end up
increasing the size of the saveState data due to extra lines. This
removes any needless ones that should not be included.

Change-Id: I1c5d094ae1405d6a82db5fcdc3cd081904706837
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-15 12:24:02 +00:00
Lorn Potter
11228e54b6 wasm: fix touchpoint handling
emscripten sends a touchstart event for every touch point when a new
touch point happens, so this makes them moved or stationary if already
known.

This allows QtQuick PinchArea to work.

Task-number: QTBUG-72214
Change-Id: I8e7c0cd2d78b07cfeae21491846cc31092359050
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-03-15 02:04:09 +00:00
Qt Forward Merge Bot
e608b5d555 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
2019-03-15 01:00:43 +01:00
Kai Koehne
097bf6fdd2 Fix compilation of qCDebug("", ...) with QT_NO_DEBUG_OUTPUT
... and fix QT_NO_INFO_OUTPUT, QT_NO_WARNING_OUTPUT alongside.

Fixes: QTBUG-74359
Change-Id: I2167dc943ae8c52602e08e24ca815d95f82a5db8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-14 17:15:53 +00:00
Christian Ehrlicher
b8d5e0b4ce QAbstractItemView: Don't let editor width exceed item width if not needed
The editor geometry was adjusted in RTL but not in LTR mode before
Qt5.11. 3ed91da499 fixed this but now all
editors are shown with their default size instead adjusting to the item
width. This works in most cases but fails for small column widths and
e.g. a QDoubleSpinBox. Therefore adjust the size policy for the editors
so their default size is ignored and therefore the column width is used.
Don't do this for a QDateTimeEdit since this makes no sense to only show
a cut of part of the editor.

Fixes: QTBUG-74327
Change-Id: Ie526155571bf24a2d8f38e988d8b2af4bfcc92ba
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-14 16:50:59 +00:00
Christian Ehrlicher
02c25f334d uic: write out min/maximumSectionSize property before current size
Since faff43348b the min/maxSectionSize is
respected when setting the current/default section size programatically.
This is not honored when writing out the properties and therefore the
default section size is not correctly set when it's smaller then the
default minimum section size.
Therefore make sure to set min/maxSectionSize property before all other
properties.

Fixes: QTBUG-74352
Change-Id: I8f9ede3e90b7c9c65f8440953b00e1d9d6006d38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-03-14 16:50:57 +00:00
Ulf Hermann
a6154ca648 androiddeployqt: Also shellquote rootPath as part of importPaths
Fixes: QTBUG-74212
Change-Id: Ie0c9b5b230e93e50d6e636a6105c3bd717715374
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-03-14 16:46:44 +00:00
Thiago Macieira
9649c41ed9 qfloat16: suppress the tables if FP16 is supported by the CPU
If QtCore is being compiled to a system with FP16 support, then all
applications are too and, therefore, we don't need the tables. Saves 12k
of read-only data.

Change-Id: I46363e5b8944459e8c48fffd158bb53d906df297
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-03-14 14:59:28 +00:00
Christian Andersen
74aeacace4 Windows QPA: only calculate invisible margins when window has a frame
In commit ec97be5585 an invisible frame calculation was added for
Windows 10 that fixes QWidget::move(0,0) for main windows and dialogs.
But because e.g. Qt::ToolTip windows do not have a window frame, the
invisible margin calculation causes them to pop-up in the wrong
position (off by a few pixels).

[ChangeLog][Windows] Fixed QToolTip pop-ups and QComboBox animation
pop-ups being off by a few pixels on Windows 10.

Fixes: QTBUG-74062
Change-Id: I218e8409a250a8b81ecd1d409b597ebd01fb255f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-03-14 12:15:47 +00:00
Friedemann Kleint
15f88a7c01 Windows QPA: Output all adapters in diagnostics used by qtdiag
Split up the code detecting the GPUs into small helpers. Add a
QDirect3D9Handle class providing Direct3D9 functionality, add
GpuDescription::detectAll() and add a QVariantList "gpuList" property to the
native interface.

Task-number: QTBUG-50371
Task-number: QTBUG-65882
Change-Id: I8673542d327837babc2ad8f507da76e8ff5524ea
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-03-14 12:15:11 +00:00
Lukáš Turek
036fe49580 XCB: Fix clipboard breaking when timer wraps after 50 days
xcb_timestamp_t is a 32-bit unsigned value in miliseconds, so it
wraps after 49.7 days. When it happens, QXcbConnection::m_time stops
updating and copy & paste in an application would not work until the
application is restarted. This patch detects the timer wrap and
allows m_time to wrap too. The fix was verified in KDE desktop with
applications running for 51 days.

Fixes: QTBUG-65145
Change-Id: I328c4179c1b1f71914adda6f9a0ca3991a7e808e
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-03-14 12:14:30 +00:00
Yuhang Zhao
85250da09d Configure: simplify logic
Replace hard-coded win32-msvc20XX mkspec names with
a variable substitution expression.

Change-Id: I4911cb3e169cd7603453d7c8a67a2a291d15c796
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-03-14 12:13:58 +00:00
Yuhang Zhao
b9c4add832 Configure: add missing "clang.exe"
This amends commit 16b7afc.

Change-Id: I6c0e4b476035e4733e828724109b950d5b3a8dd6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-03-14 12:13:37 +00:00
Qt Forward Merge Bot
32084b0733 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/tools/qcollator_win.cpp

Change-Id: I6d806d7c58b2057ebde3ad915bb5551f34b700e5
2019-03-14 10:49:29 +01:00
Kevin Funk
41e7b71c41 More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.

Skipping src/3rdparty, examples/, tests/

Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-14 07:37:52 +00:00
Karim Pinter
68a2b3d46a QNX QPA: Add support for Qt Virtual Keyboard
If the QT_IM_MODULE environment variable is set, then it loads the
IM module accordingly, otherwise it is using the PPS one, if it is
available.

Task-number: QTBUG-54576
Change-Id: Icb8b474805053d8297029096365783c2cabc2cbc
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 8a7c373f8e)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-03-14 06:46:06 +00:00
Anton Kudryavtsev
b35eec360d QStringMatcher: add QStringView support
While touching the code, deduplicate some methods.

Change-Id: I28f469f0e9ae000a34466b0ecc604b5f3bd09e63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-14 04:48:06 +00:00
Thiago Macieira
c21e2d5706 Doc: "UTF" -> "UTF-8"
Change-Id: Ifbadc62ac2d04a9a8952fffd158a5a9ba87c30e0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-14 03:12:47 +00:00
Thiago Macieira
0181e0e527 Add a pair of functions to convert to and from Q/CborError
We've so far made our public API match the TinyCBOR error codes, so the
conversion is trivial. Having the two functions allows us to change
that, if it becomes necessary.

It also effectively concentrates the Coverity warning about mixed enums
in a single pair of functions.

>>> CID 190307:  Incorrect expression  (MIXED_ENUMS)
>>> Mixing enum types "CborError" and "QCborError::Code" for "err".

Change-Id: Ifbadc62ac2d04a9a8952fffd1589e739c7a5b745
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-03-14 03:12:42 +00:00
Liang Qi
29a70348d4 Add qstringview.cpp into bootstrap
After e89fbd8c, QString depends on QStringView.

Fixes: QTBUG-74340
Change-Id: I9cba49db73b74deca05b9a9ddfeec580f30b5e35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-13 22:32:09 +00:00
Kai Koehne
d5bb757987 Doc: Use nullptr in Signals & Slots
Change-Id: I9b377e00ce177ae33972479bde11dd03061224d7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-03-13 20:54:51 +00:00
Giuseppe D'Angelo
6620f93a74 QOpenGLContext: fix docs about sharing
FBOs cannot be shared. Streamline the remainder of the sentence.

Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-03-13 16:16:17 +00:00
Yuhang Zhao
16b7afc4de Fix win32-clang-g++ build
Change-Id: Ide803de12736d545807a4ae650ff8f8bce5dccd8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-03-13 16:12:34 +00:00
Robert Loehning
eb25acc05b Improve project files of libfuzzer tests
Change-Id: I7977beb1bbc142326a3cc48435b91ec7293e2cff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-13 11:18:40 +00:00
Christian Ehrlicher
fed9fa1714 Doc: replace 0 with \nullptr in documentation
Replace some more 0 with \nullptr.

Change-Id: I2af91bf3712eef5161b11da0c44614bc039ade03
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-03-13 10:57:25 +00:00
Christian Ehrlicher
b0f17780df Doc: Unify terminology for '\0'-terminated strings
The documentation for QByteArray and QString is using different
notations for '\0'-terminated strings. Unify them by using
'\0'-terminated everywhere.

Change-Id: Ia26ec5c50635bebba1b54b7fe227ff0bcca4f2ad
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2019-03-13 10:57:22 +00:00
Robert Szefner
2c6593b721 QPSQL: Use nullptr for pointers
Change-Id: I2b61cf0b81550c0878b0f06488a933c4b14e4728
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-03-13 10:57:19 +00:00
Robert Szefner
3fa5e637fb QPSQL: Fix code formatting
Only whitespace changes.

Change-Id: I474aa1b477be7081b58bd781417861878b207f4e
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-03-13 10:57:15 +00:00
Timur Pocheptsov
5e74505c33 QOcspResponse - fix broken documentation
After the 'other' parameter in the "defaulted" definitions was
removed to get rid of 'unused variable' error, docs were not
updated properly, still referring to non-existing 'other'
parameter.

Change-Id: I3acbebfa5f1cf915d46a5bbf1b4a1ea18374b565
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-03-12 08:56:30 +00:00
Lorn Potter
a9cd8ce296 wasm: fix error report when network request is cancelled
Fixes: QTBUG-73346
Change-Id: I8aaf8fe45f3014e2c9187c554ed86a4d29c03c0b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-03-11 23:05:10 +00:00
Timur Pocheptsov
8d4e8217fd Convert tst_QSslSocket to work with Docker
Change-Id: Ifb075763e3a0c6c08677dd2ae7febbbc8e4e48a9
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-11 15:38:58 +00:00
Oliver Wolff
2412cfac51 moc: Fix parsing of [[deprecated]] enum values
moc now successfully parses enum values, that have been deprecated with
[[deprecated]]. This is valid c++17 and should be handled correctly.
By adding that functionality it is possible to parse Windows headers
which use this deprecation mechanism.

To make sure, that moc works correctly even on compilers that do not
support deprecated enum values yet, the auto test explicitly uses
[[deprecated]] enum values during moc run.

Fixes: QTBUG-74126
Change-Id: I7b9d9a49af6093a97f8fdb800ffbc5af3d54d262
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-11 14:11:33 +00:00
Robert Szefner
52c0bb5994 QPSQL: Use qstrtod() function for string to double conversion
A change to qstrtod() will give us a small performance improvement.
Because the qstrtod() function does not correctly parse the NaN values,
an appropriate check condition for NaN has been added.
Also changed code structure so now the double conversion function
is called only in one place.

Task-number: QTBUG-65748
Change-Id: I49d40e5157e79cc5fce35db4c4272d1ccd270c6b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-03-11 13:18:38 +00:00
Eirik Aavitsland
0f5ed788f2 Doc: fix some typos and missing doc for QScopeGuard
Change-Id: Ifd492387abbffa551e08a6bcc01e248b8402254d
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-03-11 08:37:29 +00:00
Qt Forward Merge Bot
0a02de62d1 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iecdf00ca61d819bde532daa42f093860ec4a499e
2019-03-11 01:00:06 +01:00
Topi Reinio
c7f6761bc9 Doc: Remove background colors from simplified offline CSS
The simplified style needs to work for both light and dark themes
in Qt Creator's help system. Background and text colors are already
applied according to the active theme, this commit removes the rest
of the hardcoded element colors that do not look good with a dark
theme.

Task-number: QTBUG-49417
Task-number: QTBUG-69327
Change-Id: Ib5ebe2755e98ca120f0500ab82713a37ec7199bd
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-03-10 20:00:11 +00:00
Tony Sarajärvi
912bcf0f0d Expand blacklisting of tst_qsslkey to cover all versions of RHELs
Previous blacklisting 5c4e5032b5 only
covered RHEL 6.6 and RHEL 7.4. The problem however exists in all
6.x and 7.x distros as they have the same openssl.

This however leaves us the problem with future RHEL 8. This will
keep blacklisting these tests there as well. We need a way to blacklist
versions with a wildcard so that we could say RHEL-7.*

Task-number: QTBUG-46203
Change-Id: I2cc52ba2eac949214ecaa02e19d9e623d5befc49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-03-10 14:08:21 +00:00
Thiago Macieira
3cdf3ae1f0 Fix Coverity warning about mixing enums
Coverity says:
>>>     CID 190310:  Incorrect expression  (MIXED_ENUMS)
>>>     Mixing enum types "CborType" and "QCborStreamReader::Type" for "type_".

Change-Id: Ifbadc62ac2d04a9a8952fffd1589e6e304fc7703
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-09 17:16:06 +00:00
Volker Hilsheimer
75c6bd54d7 Avoid copying QByteArray created via fromRawData in toDouble
qt_asciiToDouble accepts a length parameter, so we can just pass
that through. No need for explicitly null-terminating, which is
where the copy of the data would be made.

Change-Id: I4e7921541f03295a2fae6171b35157084ff3ed8c
Fixes: QTBUG-65748
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-03-09 15:26:24 +00:00
Andy Shaw
6a86cc612d Fix a couple of small doc things in relation to QScopeGuard
Change-Id: I6e61a18697b95d9e3f534d1d71ebf32fdff4a04f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-03-09 10:57:28 +00:00