Commit Graph

49956 Commits

Author SHA1 Message Date
Christophe Giboudeaux
2d4a40f93f CMake: Fix build with GCC and ltcg
The porting script could not handle this special case.
To achieve the same thing, we'll use an intermediate 'OBJECT' library
which will get the '-fno-lto' build flag if the conditions are met.

Fixes: QTBUG-89426
Pick-to: 6.0
Change-Id: Ied62502ce9c7f7fd6b89fab166f7bccfcd6e7433
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-13 18:04:16 +01:00
Christophe Giboudeaux
9563be2870 CMake: Use -ffat-lto-objects for static libraries with ltcg and GCC
CMake <= 3.19 adds the '-fno-fat-lto-objects' compiler flag
unconditionally when CMAKE_INTERPROCEDURAL_OPTIMIZATION is enabled.

This is fine for shared libraries but static ones need the opposite
compiler flag.

Task-number: QTBUG-89426
Pick-to: 6.0
Change-Id: Ie5f48178803a270f6d94408f7a8e85d379eb123c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-13 17:03:12 +00:00
Alexey Edelev
7582f7b03d Fix warning in generated test wrappers
Since test command variable may contain quotes, there is a warning
in generated test wrappers related to 'message(FATAL_ERROR', that
should display full command in log in case of error. To avoid any
complicated quoting of command to only display it, join command into
single string in wrapper script and pass resulting variable to
'message(FATAL_ERROR'.

Pick-to: 6.0
Change-Id: Ie990fc0b0bf2c19b119c7c4e2aeec092e5200103
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-13 18:00:06 +01:00
Christian Ehrlicher
b3b28faf26 QComboBox: fix select all columns in the view
When the QComboBox gets a custom view with multiple columns, only the
first one is selected even the selection mode of the view is SelectRows.
The selection changes afterwards properly honor the mode though.
Therefore check for the selection mode and call setCurrentIndex() with
the appropriate flags.

Fixes: QTBUG-86776
Pick-to: 6.0
Pick-to: 5.15
Change-Id: Ieba7b9e009358e7b6e802b7847640161ec776c64
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-13 16:44:26 +00:00
Eirik Aavitsland
2054f451b1 Fix read-only pseudo-state in QTextEdit/Browser stylesheet
Was implemented for QLineEdit but not QTextEdit.

Fixes: QTBUG-83056
Pick-to: 6.0 5.15
Change-Id: I1e67ad0f1c230a062a1e12e8bc0b209c5289dc32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-13 17:22:34 +01:00
Volker Hilsheimer
ee409a536e macOS: Add more padding to width of non-editable comboboxes
The width of the combobox took the space for the checkmark and the contents
into account, but didn't provide any padding on the right side, resulting
in the text hitting the right side of the combobox popup.

Add another 12 pixels padding to the sizeFromContents implementation,
which results in a symmetrical padding on both sides of the text.

Fixes: QTBUG-88715
Pick-to: 6.0 5.15
Change-Id: I811da73d11ce935c1fb83efabbe799f9a882e1d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-01-13 16:16:50 +01:00
Christian Kandeler
b88f692d7d QTestLib: Show the values of unregistered enums
... on a failed QCOMPARE.

Change-Id: I653894927e49fad92c21409d03ed70880ca510f6
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2021-01-13 16:15:06 +01:00
Friedemann Kleint
29b2387587 Windows font engine: Silence warnings about not being able to enumate font families
Turn the warning into a qCDebug() statement and add explanatory comment.

Fixes: QTBUG-85683
Pick-to: 5.15 6.0
Change-Id: I2a6a7a089a660294f3e9c3096299c75635b3b215
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-01-13 11:59:18 +00:00
Laszlo Agocs
c262a69851 rhi: gl: Add some enablers for supporting GL_TEXTURE_EXTERNAL_OES
From QRhi's perspective this consists of two things:

- A shader with samplerExternalOES in it cannot go through the standard
  pipeline. Rather, a QShader with suitable GLSL code in it has to be
  constructed manually. As this is something useful as an autotest
  anyway, add a test case to the qshader autotest that demonstrates
  this.

- When it comes to correctly calling glBindTexture, add a QRhiTexture
  flag. The expectation is that an OpenGL-only client sets this in
  combination with QRhiTexture::createFrom(), thus wrapping an existing
  texture that then gets bound to the GL_TEXTURE_EXTERNAL_OES target
  instead of our usual GL_TEXTURE_2D.

For completeness we also add a SamplerExternalOES variable type to
QShaderDescription, but the sampler type is not actually used by the
QRhi OpenGL backend, as it is the QRhiTexture that defines the
texture target.

Change-Id: I36b52325deb3703b59186ee3d726d0c3015bfc4b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-13 10:08:23 +01:00
Laszlo Agocs
042cd97884 rhi: Expose device name, type, and IDs
...to the extent it is sensible. We have to make compromises still,
meaning some fields will only be applicable with certain APIs.

Most of this is already shown upon QRhi::create() as info debug
prints, when enabled. Now expose it all through the QRhi API as
well.

This is useful for printing in qtdiag, and, while it should be
avoided as much as possible, to make decisions about disabling
3D rendering features depending on the driver and GPU in use.

Change-Id: Iebe1e192965c928b82a094d1c7c50ddf4b38b9a2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-13 10:08:23 +01:00
Joerg Bornemann
04f11f9935 Remove .prev_CMakeLists.txt files
Those serve no purpose anymore, now that the .pro files are gone.

Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-12 20:59:13 +01:00
Andy Shaw
bb00b63dee Set the PlaceholderText color in the palette from the stylesheet as well
The color should be used across the board, so the PlaceholderText color
should also be respecting the one passed for Text and so on.

Fixes: QTBUG-89815
Pick-to: 6.0 5.15
Change-Id: I2accb3db35488f95a1c8ebacf2316a08ee416fac
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-12 20:24:28 +01:00
Paul Wicking
8c395a20ed Doc: Add details to QFont::toString
Add details that explain the return value.

Pick-to: 6.0 5.15
Fixes: QTBUG-81467
Change-Id: Ifad407a27259711fc9abe1bacc7ba9db105bdcc0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-01-12 13:50:26 +01:00
Tor Arne Vestbø
163d9c7cc4 macOS: Don't try to close already-closed/closing file dialog
Doing so results in a warning about "modalSession has been exited
prematurely - check for a reentrant call to endModalSession:", and
on Big Sur will also result in the file failing to save because the
return code from runModal will no longer be NSModalResponseOK.

This would happen when the completion handler for beginSheetModalForWindow
would call QNSOpenSavePanelDelegate_panelClosed, resulting in calls to
QDialog::done(), which in turn tries to hide the dialog, via
QCocoaFileDialogHelper::hideCocoaFilePanel().

Pick-to: 6.0 5.15
Fixes: QTBUG-89959
Change-Id: I048afe3dcc7fe62e0d0273f12b4b2c0237abb052
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-01-12 12:44:35 +00:00
Alexander Volkov
376e3bd8ec Introduce QUrlResourceProvider to load resources for HTML
QTextDocument and the text editor classes suggest to override
their loadResource() methods to provide data associated with
a text document. This approach has the following drawbacks:
- it requires subclassing
- there is no way to set a global resource provider
- QLabel is missing virtual loadResource() method and
  it can't be added without breaking ABI

QUrlResourceProvider is designed to solve these issues.
One should create a derived class that implements
QUrlResourceProvider::resource(). The objects of the derived
class then can be set for any text document.
The default resource provider can be set with
QUrlResourceProvider::setDefaultProvider().
This change also adds QLabel::setResourceProvider(),
which doesn't break ABI.

[ChangeLog][QtGui][Text] Introduced QUrlResourceProvider that allows to
load resources for HTML. It is intended to replace the use of
QTextDocument::loadResource().

Change-Id: Iaf19b229f522a73508f20715257450fe58f68daf
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-12 15:33:10 +03:00
David Skoland
9e09677c1d Remove QtDBus includes
Per the discussion of QTBUG-88831, we determined that module-wide
imports are unfortunate, especially for compile times. Following this,
all QtDBus includes have been replaced with the headers for the classes
actually used in each file. Additionally, some cleanup of header file
order and format has been performed in the changed files.

Pick-to: 6.0
Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-12 09:19:27 +01:00
Eskil Abrahamsen Blomfeldt
6a3f8cbc3a Use design metrics when adding text to QPainterPath
When we add text to QPainterPath, we will add the design metrics
(unhinted glyphs) and scale these down to match the target font size.
But the glyph positions we pass in are based on the hinted metrics,
samples at the target font size. Thus, on fonts/systems with hinting,
these do not match the scaled design metrics outlines.

To fix this issue, we make sure the text layout uses design metrics
when determining the glyph positions.

[ChangeLog][QtGui][Text] Fixed an issue where QPainterPath::addText()
would get inconsistent kerning for smaller font sizes when hinting is
enabled.

Fixes: QTBUG-20900
Pick-to: 5.15
Pick-to: 6.0
Change-Id: I651997d1a6a86e6271557438afa2cdad078a83ca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-12 09:10:35 +01:00
Friedemann Kleint
7b7dda654a Windows QPA: Fix crashes when using screen reader with Q(Plain)TextEdit
Make sure the search start with valid values.

Pick-to: 6.0 5.15
Task-number: QTBUG-89354
Change-Id: I5b5100db89c62f23748b5c88e9188cfe3811e6e8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-01-12 07:55:04 +01:00
Christian Ehrlicher
f8f629cc13 QSql/QSqlite: return extended error codes by default
SQlite allows to return fine-granulated error codes but this behavior is
not enabled by default (due to backwards compatibility concerns).
Enable them for the SQLite driver by default but provide an option to
disable them when needed.

[ChangeLog][QtSql][QSQLITE] The plugin now returns the extended error
codes by default.

Change-Id: I59cec9aea46eb03f1e7ca02903d769c003a1ae30
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-01-11 19:55:43 +01:00
Robert Loehning
ce90248882 QSslCertificate: Guard against accessing empty QByteArray
Fixes oss-fuzz issue 29276.

Pick-to: 5.12 5.15 6.0
Change-Id: I57b0c26e5377bd6b82d9f044ae1d1d13acec996a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-01-11 19:14:21 +01:00
Volker Hilsheimer
d7d6f8765f Make sure QMimeData is fully declared
The test deletes instances of QMimeData in the dropMimeData function.
The compiler warns about deleting objects of incomplete type if QMimeDate
is only forward declared.

Change-Id: I3423a7ea334180ff0b68efbecb3d3feeb0632239
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-11 16:57:41 +01:00
Andreas Buhr
a75bdfda3d Clarify variable names in QPropertyObserverPointer::notify
In QPropertyObserverPointer::notify and its calling sites,
variable names "alreadyKnownToHaveChanged",
"knownIfPropertyChanged", "propertyChanged", and at its calling site
"knownIfChanged" are used. This is confusing. This patch
changes those four to "knownToHaveChanged". For the logic
implemented it is not necessary to track whether we
have knowledge about having changed and whether it has
actually changed (if we have knowledge) separately.

Change-Id: I90b86b276ab67b2ed70dba4e456cd90220588870
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-01-11 16:14:23 +01:00
Fabian Kosmale
240505457b QBindable: Improve read-only support
If we create a QBindable from a const property, we should obtain a
read-only interface. Besides implementing this feature, this patch adds
a isReadOnly method to Q(Untyped)Bindable which can be used to check
whether one can modify the property via the bindable interface.

Task-number: QTBUG-89505
Task-number: QTBUG-89469
Change-Id: Ic36949a5b84c5119e0060ed0a1cf4ac94a66f341
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-11 15:57:26 +01:00
Morten Johan Sørvig
9f894788dd Revert "Windows QPA: Call QWSI::flushWindowSystemEvents() from WM_PAINT for full update only"
This reverts commit a81dfb32d6.

Paint immediately on WM_PAINT in all cases in order to
avoid flicker on resize.

The cases mentioned in commit a81dfb should no longer
apply:
  - QTBUG-38327: QGLWidget is not supported in Qt 6.
  - QTBUG-39842: Fixed by using ExcludeUserInputEvents.

Fixes: QTBUG-89688
Change-Id: If82cf7703d6663982769048e86a7060223730ce7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-01-11 14:42:50 +00:00
Marianne Yrjänä
2481d92c6e Prepare QNX env for cmake build
QTQAINFRA-3768

Change-Id: I5993acd282843095deba3d34006b7aa3e23db448
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2021-01-11 15:02:09 +02:00
Ivan Solovev
9b1d769fd0 UndoFramework example: make the background visible
Existing background image was not displayed correctly due to scaling
(see the description in related Jira task).
This commit increases the thickness of the lines, so that the grid
is displayed correctly

Task-number: QTBUG-89896
Pick-to: 6.0 5.15
Change-Id: Iaa8218a5e9852adbc40715e86862ac3b34e1fbec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-01-11 12:59:07 +00:00
Paul Wicking
9a12f7e083 Bump version
CMake edition.
Also update default compiled version.

Task-number: QTQAINFRA-4126
Change-Id: Ia6f535f553e73bd6b00e2e20752f4961af21ede5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-11 13:58:55 +01:00
Paul Wicking
149ad1e615 Doc: Explain how boundingRect handles null QRectF
Fixes: QTBUG-87107
Pick-to: 6.0 5.15
Change-Id: Ib7f9bd58b0f3454167dc61f95e0d8e6dec52a5ed
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-01-11 13:28:17 +01:00
Assam Boudjelthia
b036ca3347 Android: exclude tst_QFile::moveToTrash on Android
The Android tests were marked insignificant for some days, due to an
emulator issue, these tests slipped during that time. Exclude them now
to bring Android tests back.

Task-number: QTBUG-89398
Pick-to: 6.0
Change-Id: Ia65a0ae8d7474fd2554dda299a60371dbbc9dddb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-11 12:15:12 +00:00
Assam Boudjelthia
a0ee011865 Android: exclude failing tests for tst_QPlainTextEdit on Android
The Android tests were marked insignificant for some days, due to an
emulator issue, these tests slipped during that time. Exclude them now
to bring Android tests.

Task-number: QTBUG-89402
Pick-to: 6.0
Change-Id: I96d0f87b36975b7e2c83956b04b6569a03a781a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2021-01-11 12:14:35 +00:00
Kai Köhne
1f53189c29 Doc: Generalize timer docs
The snippets do not talk about Qt Widgets specifically.

Pick-to: 6.0 5.15
Change-Id: Icc4f243c93189f08124074e4918d535aa37e6560
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-11 09:52:56 +01:00
Paul Wicking
713829b718 Doc: Link to correct location
Reflow text to fit style while at it, to satisfy git clang-format.

Pick-to: 6.0 5.15
Fixes: QTBUG-89709
Change-Id: Iab2bf09399adf2cb0f0219ab40978bb238825ae8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-01-11 07:35:21 +01:00
Craig Scott
0be2ecee37 Doc: Add partial documentation for CMake API (tech preview)
There are still other parts of the CMake API that are not yet
documented. This change only addresses qt_add_executable() and the
Android-related commands it uses.

Fixes: QTBUG-88839
Task-number: QTBUG-84482
Pick-to: 6.0
Change-Id: I761b5ce908d1f62284baabe2d414cd37a0efe83d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-01-11 16:58:28 +11:00
Giuseppe D'Angelo
c34c6af374 Replace some more erase/remove patterns with removeIf
Change-Id: I6c6f33450fbfd798e5ef71a8ba18f590581dc3a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-10 15:02:47 +01:00
Christian Ehrlicher
b211148e4b Sql ODBC driver: add direct support for float and short datatype
This patch adds native support for SQL_REAL (float) and SQL_SMALLINT
(short). Previously those datatypes were mapped to double and integer.

[ChangeLog][QtSql] The ODBC driver now properly maps QMetaType::Float to
real sql datatype and QMetaType::Short to smallint

Fixes: QTBUG-8963
Fixes: QTBUG-57279
Change-Id: Ifec4c609734dbe6165c1ebdadb461c2aae47ba78
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-01-10 13:02:14 +01:00
Alex Trotsenko
161e8f4d5d QProcess/Win: clean up death notifier teardown
To avoid the mostly hypothetical possibility of failure, delete the
processFinishedNotifier before closing the handle on which it operates.
Previously, because of this, we explicitly disabled the notifier in the
processFinished() function, which made the code unclear. Now, we can
remove that safely, because cleanup() works correctly, and doing it
before calling findExitCode() was not necessary to start with.

Change-Id: Ia7095ded2c7eba8f4d738c6b87c7be41aa3cbbc8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-09 20:56:11 +00:00
Alex Trotsenko
4ff41e6ff8 Remove useless call in QProcessPrivate::waitForFinished() on Windows
if pid == nullptr, the child process has already exited and the pipe
readers have been stopped. So the call to drainOutputPipes() is
unnecessary here.

Change-Id: I0bed90d08ac879bb0ae178a1cdc37afb9d825314
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-09 15:16:42 +02:00
Alex Trotsenko
db5c901594 QProcess/Unix: do not activate read notifiers until process has started
Otherwise, the user may receive the readyRead() signal just before
started().

Change-Id: I8d6fd18fdfcef0580a3e609100198b03b18b1175
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-09 15:16:34 +02:00
Alex Trotsenko
6a6d12ea4b Split QProcessPrivate::_q_processDied()
The completion of the child process can take place asynchronously or in
one of the waitFor...() functions. In both cases, we used the same
handler (_q_processDied()), which caused several problems:

  a. technically, waitForReadyRead() should have taken into account the
     result of the calls to _q_canRead...() slots inside the
     _q_processDied() function:

       - the user calls waitForReadyRead();
       - forkfd descriptor becomes signaled, while a grandchild
         process is still alive;
       - as readyRead() signal has not been emitted, _q_processDied()
         is called;
       - the grandchild process writes to stdout pipe;
       - now data arrives, and _q_processDied() will collect it, but
         won't report it.

  b. we had a bug with recursions on Unix:

       - death notification comes asynchronously;
       - waitForDeadChild() closes forkfd;
       - _q_canRead...() emits readyRead();
       - a slot connected to readyRead() calls waitForFinished();
       - waitForFinished() hangs (forkfd == -1).

   c. for blocking functions, drainOutputPipes() was called twice on
      Windows.

By introducing a new processFinished() function, we leave the read
operations in the _q_processDied() slot, while the process completion
code is guaranteed to run only once.

Change-Id: I5f9d09bc68a058169de4d9e490b48fc0b35e94cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-09 13:15:54 +00:00
Christian Ehrlicher
05706bd2b0 QPdfWriter: fix embedding fonts in pdf files
The container size change from int32_t to int64_t created a subtle error
during font serialization. The size of a QByteArray was serialized
without a proper cast and therefore now 8 bytes instead 4 bytes were
written to the stream.

Fixes: QTBUG-89727
Pick-to: 6.0
Change-Id: If9255a5a3124038356bc5053810f98c7c88f8a01
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-01-09 09:04:29 +00:00
Andreas Buhr
d26da5fc09 Remove outdated comment and unnecessary initialization call
In construction of QPropertyBindingPrivate was an initialization
of inlineDependencyObservers with a comment that this is necessary
because of a union. But inlineDependencyObservers is not inside a
union. The comment is outdated and the explicit initialization
superfluous. This patch removes it.

Change-Id: I06544a816533c41af8fc5da3ef44ddd7c18ca86e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-09 10:03:21 +01:00
Timur Pocheptsov
3d5f86e77d tst_QSslSocket::setSslConfiguration - skip if SecureTransport is in use
SecureTransport does not allow deprecated digest algorithms, and
(depending on ST version) it may or may not accept our server's
certificate.
Funnily enough, they 'fluctuate' between versions again and again.

Fixes: QTBUG-89922
Change-Id: Ie5fbfca316806bd5000ce2d128b81b718bb36624
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-08 20:33:24 +00:00
Li Xinwei
0c7042defa CMake: improve FindMySQL.cmake
On Windows, Qt should libmysql.lib instead of mysqlclient.lib.

Add support for mariadb.

Re-indent FindMySQL.cmake.

Fixes: QTBUG-88661
Fixes: QTBUG-89775
Pick-to: 6.0
Change-Id: I6bdf195b8976c59230a12af335a838af55df0caf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-09 00:16:34 +08:00
Ahmad Samir
138fa9f2f4 QDir/QFileInfo: add doc notes about paths starting with ':'
This is an addendum to commit 0da5726a43b; making the note about paths
starting with ':' being treated as absolute paths by the underlying
QFileSystemEngine, more visible, so that users of the class don't hit
that pitfall.

Add similar docs to QFileInfo.

Pick-to: 5.15 6.0
Change-Id: Ib34d066d31bb673d340ec41422ed4daf911765b8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-01-08 18:13:42 +02:00
Allan Sandfeld Jensen
d5a980df97 Send Qt::Key_MediaTogglePlayPause for VK_MEDIA_PLAY_PAUSE
Speculative fix to get the right keys in WebEngine

Pick-to: 6.0 5.15
Fixes: QTBUG-89915
Change-Id: I79519b715a1415dccfc4601aae5025b3222a79ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-01-08 16:56:27 +01:00
Alexey Edelev
4d34314679 Remove redundant .qch from installed docs
Use upper-level document build directory for generated .qch files. This
avoids copying of .qch with html documents and duplicating them in
the installation directory.

Pick-to: 6.0
Change-Id: I63b2de0047005419d352ea259dec6f17a826a477
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-08 16:51:26 +01:00
Volker Hilsheimer
9963aaacdb Remove irrelevant test row, fix compiler warning
With the introduction of QKeyCombination, the result of |'ing together
a set of modifiers and a key goes always through the same QKeySequence
constructor, no matter the order.

The implicit conversion through int when the wrong order is used
causes a compiler warning as that conversion is deprecated. So remove
that test case.

Pick-to: 6.0
Change-Id: I04e27bcd51723ee0efc77e52e45ca3eb8bac5fc7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-01-08 16:37:22 +01:00
Friedemann Kleint
867b11596b Windows QPA: Fix missing QScreen change updates
Remove the logic compressing WM_DISPLAYCHANGE signals by the
WParam/LParam since it also triggers when the geometry is changed
by rearranging screens.

Fixes: QTBUG-79442
Change-Id: I00042c9e687bdb67fc17d6c507818b79a7aee0a2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-01-08 13:43:47 +01:00
Alex Trotsenko
423e6c3635 QProcess/Unix: consolidate process state tracking socket notifiers
There is no reason to have the startup notifier and the death notifier
be active at the same time, as the former will detect death as well.

Previously, these notifiers were racing, but _q_processDied() ordered
signals by calling _q_startupNotification() manually. Thus, the
started()/finished() sequence was always emitted if the child process
was killed anywhere. Now this ordering is simply not necessary anymore.

This makes it possible to reuse the startup notifier for death
notification.

Change-Id: I5ebed9b5f28b19fe56c80498977a3b21be9288fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-08 14:29:43 +02:00
Edward Welbourne
7fea8a079f Assert that wchar_t's size matches one of the unicode character types
This is assumed in various places, so best checked explicitly.

Change-Id: I475dcf5cbb60c0272dec560acd2893cff73872ce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-08 12:41:28 +01:00