Commit Graph

10560 Commits

Author SHA1 Message Date
Michal Klocek
a3ff42ade6 Relax rules about not having dbus session
Some desktops do not run dbus session and still want to build qt.

Change-Id: I898a3c25c9b47c1a953e426873280ab9e160c669
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-27 13:09:40 +00:00
Leander Beernaert
48c82e90af Post Merge Fixes
Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:29:18 +00:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Qt Forward Merge Bot
35a461d026 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I68702c9f9680772d332b5bb777ddd2663168abd5
2020-01-19 01:00:10 +01:00
Mårten Nordheim
cd5ce46dc5 QUdpSocket: Blacklist writeDatagramToNonExistingPeer for msvc2019
Same as other versions of MSVC

Fixes: QTBUG-80328
Change-Id: I05c5ffe6d36e0cdfb781080a736c90b6a6d4b2ba
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-17 22:16:23 +01:00
Qt Forward Merge Bot
c70208c2d0 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-01-17 08:52:14 +01:00
Vitaly Fanaskov
63b0b857f3 QPalette: fix function swap and move operator
Additional data should also be taken into account when using move
operator and function swap. This is already implemented for move
constructor.

Task-number: QTBUG-78544
Change-Id: I24ba34b0957a8fba7e15a934f2d08222dc95650f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-17 02:22:22 +01:00
Olivier Goffart
983432effd Introduce Q_MOC_INCLUDE
A new macro that can be added in the header file parsed by moc to tell moc
to include that file in the generated file

Change-Id: I03ad702c3fcd8380371015f226ee4b7456daf132
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-17 02:22:22 +01:00
Qt Forward Merge Bot
0a4e5bb265 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/kernel/qshortcut.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
2020-01-16 11:20:42 +01:00
Leander Beernaert
7c6f763d85 Regenerate Tests
Change-Id: I78f1efbec809610bcf6a8224392fa0dc8dbf3b3b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-16 08:16:17 +00:00
Thiago Macieira
bd828bacb9 QResource: Add API to get the decompressed content
[ChangeLog][QtCore][QResource] Added uncompressedSize() and
uncompressedData(), which will perform any required decompression on the
data, prior to returning (unlike data() and size()).

Change-Id: Ief874765cd7b43798de3fffd15aa053bc505dcb1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-15 12:36:59 -08:00
Johan Klokkhammer Helsing
4772a2da15 Move QOpenGLWindow from QtGui to QtOpenGL
Task-number: QTBUG-74409
Change-Id: If7d27cdfa2c6cd5b167887ad77b9cfe413cb106a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-01-15 15:38:59 +01:00
Qt Forward Merge Bot
d14fd32d40 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
2020-01-15 10:14:05 +01:00
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +01:00
Leander Beernaert
3854b5892b Add QT_TEST_RUNNING_IN_CTEST environment variable for test
When running tests with CMake's CTest, set the environment
QT_TEST_RUNNING_IN_CTEST to 1. This can be useful to deal with tests
that do not properly work when running from CTest.

For instance, the qmake test in this patch has one test that only works
when not run from CTest.

Change-Id: I01eea9131de69c18118a9ed9f96e9296d5ea20f1
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 13:24:55 +00:00
Friedemann Kleint
21a14767b3 uic/Python: Fix missing QCursor import
Fixes: PYSIDE-1182
Change-Id: I1ccc524a152ea75508166f3d2c0c60f8d829cd8f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-14 14:17:52 +01:00
Leander Beernaert
ba96b0cbd9 Disable qaccessibilitylinux test
The qaccessibilitylinux does not work properly and is also disabled in
qmake.

Change-Id: I8d047c86c792751f28f296b00421babeb42db778
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 13:16:57 +00:00
Laszlo Agocs
052f3db7e6 qshader autotest: Avoid variable shadowing
Nicer this way.

Change-Id: Ia132b8e394f1080623abe4b1452a41c5ca31272c
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2020-01-14 11:37:10 +01:00
Edward Welbourne
e0be3ab28e Combine negativeYear() and printNegativeYear()
They overlapped and the latter had duplicated code, so make them into
a single data-driven test. At the same time, replace the '-' at the
start of the expected string with QLocale::negativeSign(), since the
test fails otherwise when LC_NUMERIC=nb_NO on Linux (Debian/testing).

Change-Id: I051c75abff16b2e6f8278fcb152b6bde14c71f9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-14 10:47:19 +01:00
Cristián Maureira-Fredes
3f6275960c uic: add customwidget imports support for python
Fixes: QTBUG-81073
Change-Id: I29659481b14927ffcb8f2cb1829b577a67e4b937
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-14 08:11:53 +01:00
Tor Arne Vestbø
d8897e0b08 Clarify blacklisting of tst_QWidget::childEvents on macOS
The test expects a very explicit list of events during show, but on
macOS we also get an InputMethodQuery event as a result of the window
becoming active. The test needs to be written significantly to support
these kind of platform differences.

Change-Id: I395c1e9e4e9baf7d9f88f0d067586fc15afb9a16
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:04 +01:00
Tor Arne Vestbø
0617afb2d3 Extend blacklisting of tst_QWidget::showMinimizedKeepsFocus to all macOS versions
For some reason the firstChild gets the focus when clearing the focus.
This seems to be timing dependent, as removing the 30ms qWait 'fixes'
the issue. So does a processEvent call before minimzing. Both of these
require further investigation.

Change-Id: I62833a5541712f97dc24bc63384fa4c051096537
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:03 +01:00
Tor Arne Vestbø
6ae9cc7cb9 Blacklist tests on macOS that rely on moving the cursor
Task-number: QTBUG-76312
Change-Id: Ibb29231141017ed608beaa12255cdd083317433c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:01 +01:00
Tor Arne Vestbø
e1dbb73701 Blacklist tst_QTableView::mouseWheel on macOS
There's a timing issue that affects the position of the vertical
scrollbar when scrolling by pixels.

Change-Id: I29d73574785be539a5870b498a902b1aba887e9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:00 +01:00
Tor Arne Vestbø
3be91a89af Blacklist tst_QStyleSheetStyle::widgetStylePropagation on macOS
It's not clear why this is failing, but we need to blacklist it so that
we can move over to testing macOS 10.14 and 10.15 in the CI.

Task-number: QTBUG-75786
Change-Id: I208d5af92406c5da8d0210e0188568466b78b2a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:49:58 +01:00
Tor Arne Vestbø
b7a56ea3ee Skip tst_QMenu::pushButtonPopulateOnAboutToShow on macOS
The combobox popup can overlap a little with the button, and that's the
expected behavior.

Change-Id: I245bfce85cb5ee661ceb51dbe0d844492878a2bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:15:16 +01:00
Tor Arne Vestbø
eb2a7738a4 Skip instead of fail tests when test server is not available
We were being inconsistent in how we handled this, some tests skipping
while others using QVERIFY. It makes more sense to skip the tests, since
the problem is a missing pre-condition of the test, not the test itself
being bad or exposing real failures in the implementation.

Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-14 00:15:16 +01:00
David Faure
123cf74dd0 Update instructions for downloading the shared-mime-info release
s-m-i moved to gitlab.freedesktop.org

Change-Id: Ifc41eecfe27c4fba0132d54234b481ed301a66dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-13 17:44:49 +01:00
Christian Ehrlicher
ac95c8b686 QStandardItem/QStandardItemModel tests: cleanup
Cleanup QStandardItem/QStandardItemModel tests:
 - use nullptr
 - remove unused functions
 - use new signal/slot syntax
 - style

Change-Id: I2feb8550e7f740f9df4b9c1b803c2f250c1ec729
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-13 17:01:00 +01:00
Tor Arne Vestbø
0a93db4d82 Unify application palette handling between QGuiApplication and QApplication
The logic is now mostly handled in QGuiApplication, with QApplication
only dealing with the widget-specific palettes and interaction between
the style and the palette.

The application now picks up changes to the platform theme and will
re-resolve the current application palette appropriately. This also
works even if an explicit application palette has been set, in which
case any missing roles are filled in by the theme.

The palette can now also be reset back to the default application
palette that's fully based on the theme, by passing in the default
constructed palette (or any palette that doesn't have any roles set).
This is also correctly reflected in the Qt::AA_SetPalette attribute.

Conceptually this means QGuiApplication and QApplication follow the
same behavior as QWidget, where the palette falls back to a base or
inherited palette for roles that are not set, in this case the theme.

Behavior-wise this means that the default application palette of the
application does not have any roles set, but clients should not have
relied on this, nor does QWidget rely on that internally.

It also means that setting a palette on the application and then
getting it back again will not produce the same palette as set,
since the palette was resolved against the theme in the meantime.
This is the same behavior as for QWidget, and although it's a
behavior change it's one towards a more sane behavior, so we
accept it.

[ChangeLog] Application palettes are now resolved against the platform's
theme palette, the same way widget palettes are resolved against their
parents, and the application palette. This means the application palette
reflected through QGuiApplication::palette() may not be exactly the same
palette as set via QGuiApplication::setPalette().

Change-Id: I76b99fcd27285e564899548349aa2a5713e5965d
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-13 16:53:05 +01:00
Laszlo Agocs
7e2cef0f15 Move away from CBOR in QShaderDescription serialization
...but keep support for deserializing for all older versions in order to play
nice with existing .qsb files.

The usage of binary JSON and then CBOR is a historical artifact: relying
on the QJsonDocument (which we generate for purposes unrelated to binary
serialization) was a convenient shortcut. However, writing to and
reading from a QDataStream instead (which QShader already does) is trivial.
In order not to be limited by potential CBOR requirements in the future,
take it all into our own hands.

Extend the qshader autotest accordingly.

Task-number: QTBUG-81298
Change-Id: If0047b659bd6601ca47b5bbbce1b719630cde01e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-01-13 16:21:26 +01:00
Laszlo Agocs
1f267b7e6d rhi: Add render-to-cubemap manual test
What's more, demonstrate two types of rendering to a cubemap:
one by one to each face, and by attaching all faces as color
attachments in one go.

Both are used by Qt Quick 3D in connection with shadows, so this
proves that the same is possible to implement with QRhi.

Task-number: QTBUG-81261
Change-Id: I5c7077224d7cae0dd6ea02ac30a9e6f9f1f0c229
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-13 15:52:58 +01:00
Laszlo Agocs
fe97af0c9a rhi: Add manual test for RGBA16F and compute
Uses the two compute shaders from Qt Quick 3D. Demonstrates
and tests both RGBA16F textures and using them (and doing
load/store with mip levels individually) in combination with
compute.

Task-number: QTBUG-81213
Change-Id: I3f0f250d5997a26c857b7c45517684c63b44e58e
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2020-01-13 15:52:46 +01:00
Timur Pocheptsov
ccb2cb84f5 QNetworkReply: deprecate the 'error' getter
To disambiguate &QNetworkReply::error expression.

[ChangeLog][Deprecation Notice] QNetworkReply::error() (the getter) was deprecated; superseded by networkError().

Task-number: QTBUG-80369
Change-Id: I545f963788bce0800c9e0f0c94d5f1029946effe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-13 15:50:47 +01:00
Qt Forward Merge Bot
cccc9d0b95 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
2020-01-13 10:13:01 +01:00
Rainer Keller
76fbe75abe Remove empty block at beginning of imported markdown
An empty QTextDocument already contains a block; so when the formatting
is fully determined, if the document is still empty, then instead of
inserting a new block, we can set formatting on the cursor, which
affects the pre-existing block, before inserting text.  This avoids
leaving a blank line (the default block) above the inserted content.

Fixes: QTBUG-81060
Change-Id: I14e45e300a602493aa59680417d74d4c2b25862d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-01-13 09:25:39 +01:00
Qt Forward Merge Bot
8d0715f106 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I50f70a789ab1438b40d4408be72c090fa00b801f
2020-01-13 01:00:45 +01:00
Giuseppe D'Angelo
577d698b8e QString::isLower/isUpper: redo the implementation
Use QStringIterator rather than indexed loops. This fixes handling of
non-BMP code points (which may be lower or uppercase, see the test).

Change also the semantics of the functions, adopting Unicode §3.13
definitions: a string is lowercase/uppercase if it's equal to its
own toLower/toUpper folding.

As a side effect, empty strings are now correctly reported to be
lowercase AND uppercase.

[ChangeLog][Important Behavior Changes] The semantics of
QString::isLower() and QString::isUpper() have been changed to match the
Unicode specification. Now lowercase (resp. uppercase) strings are
allowed to contain any character; a string is considered lowercase
(resp. uppercase) if it's equal to its own toLower() (resp. toUpper())
folding.  Previously, a non-letter character would make the string not
lowercase nor uppercase, and the mere presence of an uppercase (resp.
lowercase) letter would make isLower() (resp. isUpper()) return false,
even if the letter wouldn't change under case folding.  As a
consequence, now empty strings are lowercase and uppercase.

[ChangeLog][QtCore][QString] Fixed a number of bugs of
QString::isLower() and QString::isUpper(). Empty strings are now
correctly reported to be lowercase (resp. uppercase), and strings
containing code points outside the BMP are now correctly handled.
Note that the behavior of these functions has also been changed.

Change-Id: Iba1398279a072399a9f21295fe75f6e414f3f813
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-11 19:28:50 +01:00
Leander Beernaert
a8929ac1fe Fix qclipboard test
Change-Id: I24ef0a8f73faa83d98d791a30f5777aef9d554cf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-10 14:59:54 +00:00
Leander Beernaert
5e44dc8864 Fix qnetworksession test
Change-Id: I8d549b571dea8c0b275a6c220dd58f1644ebc443
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-10 14:59:50 +00:00
Leander Beernaert
26600a069a Fix tst_qdbusmarshall
Change-Id: Ia7bb50a8c69a0083d0b8acdad0cb8eb6a71ca24e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-10 13:01:21 +00:00
Timur Pocheptsov
76c4c5d558 QSslSocket: deprecate sslErrors() getter
To disambiguate &QSslSocket::sslErrors() expression. Add a new
getter - sslHandshakeErrors().

[ChangeLog][Deprecation Notice] QSslSocket::sslErrors() (the getter) was deprecated and superseded by sslHandshakeErrors()

Task-number: QTBUG-80369
Change-Id: I9dcca3c8499800c122db230753dc19b07654f8a2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-10 13:41:59 +01:00
Timur Pocheptsov
0de6c26ac1 QLocalSocket - deprecate ambiguous 'error' overloads
QLocalSocket::error is overloaded as a signal and an accessor (for the
error reported by the signal). This means connecting to the signal using
a pointer to member function would require ambiguity resolution. We
deprecate the old accessor (to be removed in Qt 6) and introduce a new one -
'socketError'.

[ChangeLog][Deprecation Notice] QLocalSocket::error() (the getter) is deprecated; superseded by socketError().

Task-number: QTBUG-80369
Change-Id: Iab346f7b4cd1024dee9e5ef71b4b7e09f6d95b12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-10 12:54:53 +01:00
Timur Pocheptsov
94b3dd77f2 QAbstractSocket: deprecate 'error' member-function
The one that is a getter for the last error found. This is to disambiguate
the expression '&QAbstractSocket::error'. Introduce a new member-function
socketError as a replacement.

[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError().

Task-number: QTBUG-80369
Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-10 12:54:53 +01:00
Leander Beernaert
f4a630588f Fix tst_qlogging
Pass in the QT_CMAKE_BUILD define to change the expected executable name
in the tests.

Add special cases for missing compile flags that cause the collection of
backtraces to fail otherwise.

Change-Id: I53c44f7e4c6d597f941e4dd8173b3a39a615339c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-10 10:20:31 +00:00
Christian Ehrlicher
efff8ff57a QFileSystemWatcher/win: watch also for attribute changes of directories
The windows filesystemwatcher did not watch for attribute changes for
directories (e.g. hidden flag) so it was not in sync with other
backends. Fix it by adding FILE_NOTIFY_CHANGE_ATTRIBUTES to the watch
flags when watching a directory.

[ChangeLog][QtCore][QFileSystemWatcher] Fixed a bug that caused QFSW not
to watch for attribute changes on Windows. Now it will correctly report
when files and directories become hidden or unhidden, for example.

Fixes: QTBUG-80545
Change-Id: I31767a0da899963e3940b4f5b36d1d581e6aa57c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-10 06:24:14 +01:00
Qt Forward Merge Bot
0dc5562fa4 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I784e23d7913294225686879c9bd77dafe3580bac
2020-01-10 01:01:15 +01:00
Liang Qi
a59c768489 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I4780b25665672692b086ee92092e506c814642f2
2020-01-09 20:30:39 +01:00
Morten Johan Sørvig
5507d0f1b0 Make setReadOnly track ReadOnlyChange events only
The test was previously tracking all Change events,
which made it fragile.

Change-Id: I17872341237009a9a0a2ad2fd5482f917991d7b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-09 13:52:25 +01:00
Edward Welbourne
70d484b5df Fix encoding expected by tst_qmessagehandler::qMessagePattern()
The actual logging code, qt_message_print(), uses toLocal8Bit(), so
testing by comaring with toUtf8() isn't robust.

Change-Id: I7d6614e4af8c679674dbbf4ff47a88b2b75fc2dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-09 10:58:25 +01:00