Commit Graph

47783 Commits

Author SHA1 Message Date
Mårten Nordheim
b41a7afb00 QAuthenticator: Don't use Negotiate if unsupported
If we compiled without support for it then we shouldn't consider it an
option either.

Pick-to: 5.15
Change-Id: If6e0a6afa738f375e360bf3d439196b39e47bee8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 19:23:15 +02:00
Lars Knoll
287d2d7753 Get rid of qtconcurrentexception.h
It only contained two aliases that have been deprecated
since 2012.

Change-Id: I6f65aa5144aca2d8d99f8a6e586b805f685afad2
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-09-10 18:55:55 +02:00
Mårten Nordheim
8a3847aab9 QNAM: Enable HTTP/2 by default
It has been in Qt for some years now and 6.0 marks a good point to
enable it by default. The exception is connectToHostEncrypted where we
still require the users to enable it explicitly since there's no logical
way to disable it.

[ChangeLog][QtNetwork][QNetworkAccessManager] HTTP/2 is now enabled by
default.

Fixes: QTBUG-85902
Change-Id: Ia029a045727cc593d77df9eb3a5888522ad19199
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 18:28:43 +02:00
Paul Wicking
00d9a0ea8e Doc: Compile snippets only when running tests
Turn snippets projects into subdirs with libraries to avoid
messy dependencies.

Fixes: QTBUG-86497
Pick-to: 5.15
Change-Id: Idb2c43f97d56c9b8d9992617ef716bde40fff5b7
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-09-10 18:26:43 +02:00
Paul Wicking
e7c15a60ea Doc: Clean up widget snippets project
The main snippets project must be a subdirs project.
Move some files and update the affected documentation.

Task-number: QTBUG-86497
Pick-to: 5.15
Change-Id: I60073d1b8bd53aa09600eeccf06ba8457ac7c708
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-09-10 18:26:39 +02:00
Joerg Bornemann
8a2ca17b2d CMake: Fix generation of XXX_tracepoints.cpp
The include directive was incorrectly written.
This amends 5c092c2b40.

Change-Id: Ia72ca3a5d5e1486ade4d71a764550d36979640f6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-10 18:06:06 +02:00
Joerg Bornemann
4c8e231568 CMake: Fix race condition in -trace configured build
qt_create_tracepoints(Core) creates a dependency from Core to
Core_tracepoints_header, but the helper library Core_qobject also uses
qtcore_tracepoints_p.h and must therefore depend on
Core_tracepoints_header too.

This amends 5c092c2b40.

Change-Id: I0ed51f3ab9accea00f524c170cd319bb8af11df7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-10 18:06:00 +02:00
Joerg Bornemann
2a9ef0ecee CMake: Fix call to tracegen when cross-compiling tools
We need to use the imported host tracegen target to generate files, not
the one we're going to cross-build.

This amends 5c092c2b40.

Change-Id: Ib74dd2d87110383c31216872eb55bebf5d90df37
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2020-09-10 18:05:54 +02:00
Joerg Bornemann
b5234817f1 Introduce QProcess::startCommand(QString, OpenMode)
The removal of the QProcess::start(QString, OpenMode) leads to more
porting work than anticipated. A call like

    QProcess p;
    p.start(cmdline);

must be transformed in the following cumbersome way:

    QProcess p;
    QStringList args = QProcess::splitCommand(cmdline);
    QString program = args.takeFirst();
    p.start(program, args);

This patch revives QProcess::start(QString, OpenMode) and renames it to
QProcess::startCommand. This is still source-incompatible, but the
transformation is much simpler:

    QProcess p;
    p.startCommand(cmdline);

[ChangeLog][QtCore][QProcess] Added QProcess::startCommand(QString,
OpenMode) as replacement for the removed QProcess::start(QString,
OpenMode).

Change-Id: I5499bbb39a025e115042c43a4cc63affddae585c
Reviewed-by: hjk <hjk@qt.io>
2020-09-10 18:05:28 +02:00
Joerg Bornemann
d774930891 CMake: Re-generate configure.cmake files
Change-Id: I9c325db8031e14cf2a2cfb49e5080e3043a0811a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-10 18:05:22 +02:00
Joerg Bornemann
74c48f0864 configurejson2cmake: Handle expressions of the form "foo != 0"
Such expressions were translated to "foo NOT = 0" which is invalid code.

Change-Id: I8b485bfe1d1f553c08df3b5d59b0f39f2dcbd5c0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-10 18:05:16 +02:00
Joerg Bornemann
6b363bbde3 CMake: Document more configure argument mappings
Change-Id: I4f96fd59566d011088e426342db9cc6536d63a71
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-10 18:05:10 +02:00
Assam Boudjelthia
298413de77 Android: use bin for instead of QT6_HOST_INFO_BINDIR
${QT6_HOST_INFO_BINDIR} is returning an empty string making
the tools paths unusable, and android apps building fails.

Partially revert 09ac1bdfc5.

Task-number: QTBUG-86557
Change-Id: I1522b3a4b45fbcb41894ea3bd7c714f7a79eb954
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-10 15:42:25 +00:00
Lars Knoll
c4dbd1cddc Cleanup ProString::append/prepend
Don't use evil hacks that make assumptions
about QString internals.

Change-Id: I663602d197f0fcf62886dbfb9a87547097cdab04
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-10 17:36:10 +02:00
Michael Brüning
ac310d5b23 [macOS] Add native virtual key code to modifier keys
Not forwarding the native virtual key code when sending key events
in the flagsChanged handler caused a number of problems, e.g. the
inability to determine which of the Alt or Shift keys were pressed.

Use handleExtendedKeyEvent to include the native virtual key code.

Patch inspired by Nyan Pasu.

Fixes: QTBUG-69608
Change-Id: I15e9ff1069528d4b50ee4638ab2d8a6fd279db0b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:33:21 +02:00
Mitch Curtis
a4e4436e85 Doc: explain how to blacklist QML tests on certain platforms
Change-Id: Icd505175805820c64593d7eb8f580a51008e2e1a
Pick-to: 5.15 5.12
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2020-09-10 17:32:34 +02:00
Timur Pocheptsov
4f658d04da Fix a rather sloppy test case in tst_QSslKey
It's not guaranteed that all curves we want to use are supported
by a specific build of OpenSSL library we have to link with. Filter
out files that contain EC, which is not among the curves, reported
by QSslConfiguration::supportedEllipticCurves.

Fixes: QTBUG-46203
Pick-to: 5.15
Change-Id: I70d7e6fcacb3d81f8c771e4a8d6cca06295e7474
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 17:32:09 +02:00
Andrei Golubev
781ecbfc6f QString/QBA: change realloc*Data signatures to use qsizetype
Changed reallocData, reallocGrowData signatures to use qsizetype
instead of size_t

Change-Id: Iebe7def5430d3d3f4660e19cb6c12612543c5abc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-10 17:31:31 +02:00
Andrei Golubev
ec7e680c50 Remove '\0' space reservation logic in QString
Changed QString to use implicit element reserved by QArrayData

Task-number: QTBUG-84320
Change-Id: If517500b3f0e71bb8d2989c64815a634aa8dd554
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 17:31:23 +02:00
Andrei Golubev
04d78df344 Remove '\0' space reservation logic in QByteArray
Changed QByteArray to use implicit element reserved by QArrayData

Task-number: QTBUG-84320
Change-Id: I2a0091c814a47a5c052da7a83d10cb641834c7bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-10 17:31:19 +02:00
Allan Sandfeld Jensen
7249a87b06 Cleanup PageSize enum for Qt6
Fixes B5/B6 order and removes abandoned documentation for a removed duplicate.

Change-Id: I7647ee31a4ef4aa754058c8a6f68b4d4304e0043
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-10 17:30:33 +02:00
Volker Hilsheimer
43735342b5 QOpenGLTexture: Remove obsolete data upload overloads
Address ### Qt 6 comment

Change-Id: I2952175ec72c5c4c7b4e518754fb1bc6f88b21df
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-09-10 17:30:09 +02:00
Volker Hilsheimer
55dda687fd QOpenGLFramebufferObject: merge toImage overloads
Address ### Qt 6 comment

Change-Id: I60b1dba72dbf2490294c84e5d1a85ae7e7181fc3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-09-10 17:30:02 +02:00
Volker Hilsheimer
8186bd628f Remove obsolete APIs and comments from QAbstractPrintDialog
Merging QAbstractPrintDialog with QPrintDialog, as proposed in the
removed comment, seems to have little value, given that the platform
specific implementations rely on the current abstraction.

Adjust examples and tests; with the QAbstractPrintDialog test now
testing the QPrintDialog::options API, the corresponding test function
can be removed from the QPrinter test.

Change-Id: Ia8906627898332e8590ea9b27e3d71dfcc6e8d71
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:29:52 +02:00
Andreas Buhr
1b02cfd38d Adapt QDate unit tests to not take into account system locale
QDate was changed to consistently use the C local in
serialization and parsing in git commit
5ba66c5622.
This commit reflects this change in the unit tests.

Task-number: QTBUG-80441
Change-Id: Ib21a215ef0e36c9eaa2c161b92c6877a50ae6f06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-10 17:29:38 +02:00
Alexandru Croitor
8bc739fcc2 CMake: Register qtwaylandscanner dependency when cross-compiling
qt_record_extra_package_dependency is called by qtwayland to register a
dependency between the qtwaylandscanner tool and the waylandscanner
tool.

When cross-compiling the tools in a Yocto environment, the adjusted
target name was not taken into account.

Task-number: QTBUG-83968
Change-Id: Ibf7b94876bf29827cf0d9c9bb471f359ef6ff15f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-10 17:29:15 +02:00
Alexandru Croitor
abf7239541 CMake: Apply $ORIGIN style rpaths for non-prefix builds as well
This works around linking issues when doing yocto non-prefix Qt
builds, because CMake does not add -rpath-link flags even though it
probably should.

Task-number: QTBUG-86533
Change-Id: Iaaf246ac71ca05d9369ceb6eb9c4a1e206c42839
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-10 17:29:11 +02:00
Assam Boudjelthia
ff1a44be33 Android: don't use avx and avx2 when building for Android x86_64
The Android build for x86_64 fails with CMake. It should also fail with
qmake builds but the current multi-ABI build is testing the feature for
arm64-v8a only.

In [1], it's stated that AVX and AVX2 are not supported on x86_64 ABI.

[1] https://developer.android.com/ndk/guides/abis#86-64

Task-number: QTBUG-85982
Change-Id: I20c9366bdee2a13ca554ec67f5d0c041bd068b91
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-10 18:29:05 +03:00
Allan Sandfeld Jensen
54c37146b7 Clean-up of old VC6 work-around
Change-Id: Ic518f48b62055a4fa229751a80362f9426e0ac42
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-10 17:28:12 +02:00
Morten Johan Sørvig
7238123521 X11: set fallback logical DPI to 96
Returning physical DPI from logicalDpi() is problematic,
as explained in commit 77e04acb.

The most predictable implementation is to never return
physical DPI from QPlaformScreen::logicalDpi(). Other
platform plugins already does this, and this change
brings xcb in line with the rest of Qt.

We have the QPlatformScreen::physicalSize() API which
covers returning physical DPI (indirectly); Options
for selecting which one to use can be implemented on
top of these (see QT_USE_PHYSICAL_DPI).

Change-Id: Ifc41229fa63734a2eb06b3acefd97b2ed3e57c2d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:28:11 +02:00
Morten Johan Sørvig
b3c991ae8f Port from devicePixelRatioF() to devicePixelRatio()
This ports all of QtBase.

Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:28:11 +02:00
Topi Reinio
e1ce78d484 Doc: Fix documentation issues for event and input device classes
* Document the new base classes QPointerEvent and QSinglePointEvent,
  and move relevant documentation to be located under them.
* Replace linking to deprecated functions with their new counterparts.
* Remove non-existent function and parameter documentation.
* Document QEventPoint::State enum.
* Prefer \obsolete over \deprecated and fix the usage.
* Document the Capabilities enum in the correct location and
  add docs for the missing enum values.

Change-Id: Ic8f2732f2e90ecbf522cd744c601cedcc574825c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-10 17:28:11 +02:00
Edward Welbourne
2c63164012 Inline QMetaObject::cast(QObject *), as requested by ### Qt 6 comment
Task-number: QTBUG-85700
Change-Id: I29405df37b82d34a92537e39a3863b5f6c998556
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 14:21:48 +02:00
Edward Welbourne
4b9ec075f8 Remove spurious const from QVariant::convert()'s first parameter
As per ### Qt6 comment.

Task-number: QTBUG-85700
Change-Id: I24292d9f2b8f7781032aa8df2a7a0c58ad4fb6c9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 14:21:48 +02:00
Edward Welbourne
c0e51ee9df Remove some pre-Qt6 code
Task-number: QTBUG-85700
Change-Id: Id4856d035b697276f6a7090956359044bac7d817
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-09-10 14:21:48 +02:00
Andrei Golubev
7a15d71def Fix possible corner cases in qarraydataops.h
Updated moveNonPod function to behave correctly under
exceptions being thrown. This is the version that was implemented
at some point but then got changed prior to merge. Added tests for
moveInGrowthDirection (which uses moveNonPod in general case) to
verify that range movements are correctly done

Updated QCommonArrayOps access modifier from private to protected
to allow testing of internal stuff by subclassing

Task-number: QTBUG-84320
Change-Id: Idb994a72ee601762e32248670cdc7819aaca0088
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-10 14:21:47 +02:00
Shawn Rutledge
a81859a3c8 Move grabbing API from QEventPoint to QPointerEvent
We plan to move storage of the grabbers into QPointingDevice so that
QEventPoint will store only data that does not need to persist between
deliveries of individual events. These API changes prepare for that.

addPassiveGrabber/removePassiveGrabber is a better API than
setPassiveGrabbers(), because it will never require constructing a
temporary QList just to call the function. Eventually we need to emit
signals to notify about grab changes, so it's better to have incremental
changes to the list rather than needing to iterate and find differences.

Fix up the docs.

QEventPoint IDs are no longer written in hex in debug output.
That was done in Qt 5 because an ID was a composite of device ID
with the OS-provided touchpoint ID; but since the QPointingDevice
is always available, it's more readable if the IDs are in decimal.

Change-Id: I86b9016d9b28c331ca05c7c108d9788de93fb642
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 14:21:47 +02:00
Volker Hilsheimer
62f5ecca7d Clean up PageSizeId enum
Reorder, and remove ### Qt 6 comment

It would be nice to have a way to statically assert that the order
of StandardPageSizes (and their id) matches the order of the enum,
but it's not possible (or at least very cumbersome) to do so.

Change-Id: Id0d0a58958f1e17151725cbe8f8068db64f84939
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 11:24:20 +02:00
Volker Hilsheimer
78b66c7a69 Fix ### Qt 6 comment
The inLoop boolean is unused, so remove it. At the same time, there is
another boolean that might just as well become a bitflag, so that we
can add more members in the future, should the need arise after all.

Since we then need to explicitly initialize the member, add a standard
QObject constructor.

Change-Id: I51245829c1b1192fde62592fb972da6ea2a88e11
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-10 11:24:20 +02:00
Thiago Macieira
da77cfb4a6 Doc: clean up the QProcess::setChildProcessModifier example
- Use nullptr instead of 0
- Pass directory to chroot that is not in /etc
- Set umask to a sensible value (0 is insecure)

Change-Id: I1dba29bc0f454df09ca1fffd161801257f9ccb3c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-09-10 09:24:19 +00:00
Ulf Hermann
ace19063cb Moc: Require complete types consistently
If we require complete types when generating the list of metatypes, then
we also need to require them when generating each entry, and vice versa.

Change-Id: I68394f8628bb6cd89f77bb829b1d4b5ab35071a0
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2020-09-10 11:24:19 +02:00
Edward Welbourne
a8caae37ef Remove redundant non-const QMutex::isRecursive()
As directed by ### Qt 6 comment.

Task-number: QTBUG-85700
Change-Id: Iae4179b017840efe4902de2b1529cf7ec0606865
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 11:24:19 +02:00
Andrei Golubev
6e8985e357 Make Q*ArrayOps erase aligned with std::vector::erase
Scoped GrowsBackwards-optimized erase to only be applied
when erase starts at the beginning of the element range.
In other cases, old "left-shifting" erase is used to align
with std::vector::erase invalidation policy

Task-number: QTBUG-84320
Change-Id: I2e7f3b96b056bc371119eb2d36cc7c74af52c394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-10 11:24:19 +02:00
Allan Sandfeld Jensen
030962b01c Cleanup QAction::visible property
Gives it its own changed signal, and simplifies setting from group,
while fixing an inconsistency in propagation.

Change-Id: I22b243210260a8878144fa4b60204df46f847f37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-10 09:24:18 +00:00
Paul Wicking
95056d465e Doc: Move example file that was left behind
The qdoc-file that contains the example documentation was
left behind when the OpenGL code moved from QtGui
to QtOpenGL. This causes all the snippet commands to fail.

Task-number: QTBUG-74409
Change-Id: I86a753d4fc832965e76a085062882e6c720becd2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-09-10 11:24:18 +02:00
Alex Trotsenko
92640829ad Revert "Do not wait in QWindowsPipe{Reader|Writer}::stop()"
This reverts commit c7ec07d401.

Reason for revert: This causes a memory leak on program termination.

The initial commit was an attempt to fix a deadlock where the user
destroys object from a thread that does not own the object. This is
an unsupported case and should be treated as an invalid report.

Pick-to: 5.15
Change-Id: I4957784b86a0361adb65b9d023542f96480f00ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-09-10 09:17:20 +03:00
Mårten Nordheim
9440d602e5 QNAM: fix stall due to edge case when connected with no request queued
It really could only manifest itself if you started a request and then
immediately cancelled it and then started another one to the same
site. But only if in a certain race outcome - the connection that the
backend was establishing had to finish connecting after aborting but
before a new request had been queued!

Change-Id: I7cad2cf4ac1f64cc838498cefa076cd2c6d26701
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 03:18:02 +02:00
Friedemann Kleint
bbec7aaf3a Fix a number of MSVC integer conversion warnings
Mostly related to qstrlen().

Change-Id: I69e2052c83766e4fc466ed398d0d0eac011a77ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-09-10 03:16:34 +02:00
Lars Knoll
d49a7412f5 Derive some item delegates from QStyledItemDelegate
Address a ### Qt6 comment from change
283008e123, and start using
QStyledItemDelegate in more places, so those get proper
look and feel.

Change-Id: I39767ba99b7942faada1fba0ac241deb35563b63
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-09-10 03:15:49 +02:00
Shawn Rutledge
ae7442a4e9 Give QEventPoint a d-pointer after all
I still have doubts that QEventPoint can't be made small enough that
copying would be cheaper than reference-counting and all the indirections
in now-noninline accessors, but this gives us the usual freedom to
change the data members later on.

Change-Id: I792f7fc85ac3a9538589da9d7618b647edf0e70c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-10 03:15:49 +02:00