Commit Graph

43974 Commits

Author SHA1 Message Date
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
Paul Wicking
9c172af7d5 Doc: Update text that refers to deprecated member function width()
* Add see also links from the deprecated function to the replacement.
* Change introduction text to reflect new function name rather than the
  old and deprecated width().
* Change see also and inline references to width(), so that they now
  refer to horizontalAdvance().

Task-number: QTBUG-65141
Change-Id: Iadfbc517e5df96e32058516f8795bd210cc4c5e4
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 14:19:03 +01:00
Paul Wicking
fd31e4ce43 Doc: Display correct include for QWindowsWindowFunctions
Fixes: QTBUG-55412
Change-Id: I3a38fa26911b1c151af9f0b47f1be602058aa4af
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 14:19:00 +01:00
Nico Vertriest
28f95d4688 Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 12:56:08 +00:00
Volker Hilsheimer
89312b2eab Remove unused parameters from default-synthesized members
Fixes build error with gcc when compiled with -Werror=unused-parameters.

Change-Id: I12c3ecb30f489986b112f9736caec40aa50c7283
Fixes: QTBUG-81465
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-01-17 11:31:55 +01:00
Ulf Hermann
1e65445015 qml_plugin.prf: Use and prefer QML_IMPORT_VERSION over IMPORT_VERSION
qmltypes.prf does the same and the name is nicer.

Change-Id: I3364f7a244a941a4c6178cf87c65e289dc64ca22
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-01-17 11:16:44 +01:00
Giuseppe D'Angelo
a3b2eac380 QColor: add casts to ushort
Silence lossy conversion warnings on MSVC.

Task-number: QTBUG-80997
Change-Id: I0e5778b9f20b599de6fc8894c4b98fbc1b1510b9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-01-17 11:16:17 +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
Topi Reinio
5dc16d1324 Doc: Fix ButtonRole enum docs for QMessageBox and QDialogButtonBox
Multiple topic commands (in this case, \enum) do not work across
different classes.

Reuse the documentation comment via an \include statement instead.

Fixes: QTBUG-78910
Change-Id: Ife83bdc9bbad650835fafc072180d10037648d0a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-17 01:11:21 +00:00
Giuseppe D'Angelo
800dda19a6 Do not anchor an already-anchored regexp
wildcardToRegularExpression() returns an anchored regexp, so it is
pointless to anchor it again.

Change-Id: If470179d63ae7ca2e7f137c0f403ec5bb5be8aaf
Task-number: QTBUG-81396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-01-17 01:53:12 +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
Edward Welbourne
c0ea88a677 Fix MS-Win system locale code to return QString for numeric tokens
QSystemLocale::query() is specified to return a QString (wrapped in a
QVariant) for the various tokens used in formatting numbers (zero
digit, signs, separators) but the MS-Win back-end was returning QChar
(wrapped as QVariant) instead, using the first UCS-2 code-point of the
string (even if this was the first of a surrogate pair). The same
error shall be perpetrated by its caller, but we can at least DTRT in
the back-end, ready for the coming fix (in Qt 6) to its caller.

In the process, eliminate some local variables that shadowed a member
variable and adapt number-conversion to cope with surrogate-pair
digits. Optimised the latter for the case where zero is "0".

Change-Id: Idfb416c301add4c961dde613b3dc28b2e31fd0af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-16 10:28:08 +01:00
Topi Reinio
e05511a364 Pad Navigator example: Remove duplicated property animations
The example created two QPropertyAnimation instances that controlled
the same property; this caused a clash for some transitions.

Remove the smoothFlipXRotation and smoothFlipYRotation animations;
they are not needed as equivalent animations are already set as
defaults for the state machine.

Fixes: QTBUG-28081
Change-Id: Ifa7a09d48cd4905df720e3327914320ed74ebae6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-16 10:24:06 +01:00
Leander Beernaert
b29cb7889a Run make format
Change-Id: If1107aefbfd374d6b664a94b21b9bbb5ed4cc178
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-16 08:41:08 +00:00
Leander Beernaert
99a824bbb7 Do not set OUTPUT_DIRECTORY if it is already set
This can happen in unit tests where a test has TARGET set to "../name",
which requires the target to placed in the parent binary directory.

It is possible to run into a second assignment for OUTPUT_DIRECTORY via
the DESTDIR property (e.g: qdbushmarshall test) which can then result in
two OUTPUT_DIRECTORY values.

However, the first one needs to take precedence or the tests won't
execute properly.

Change-Id: Ib263843fa86c3dd68d92a0989b95f2890335c92d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-16 08:36:43 +00:00
Mårten Nordheim
6faaef5a66 QNetworkAccessManager: Avoid unnecessary calls to sender()
As it searches through all connections, of which we have multiple for
each network reply.

Fixes: QTBUG-81336
Change-Id: Iba28278edae5f254bf884f427e0944d348b47d03
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-16 08:30:41 +00: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
Giuseppe D'Angelo
9f1948f59b QRegularExpression: fixup docs of wildcardToRegularExpression
Fix a couple of typos, and add a paragraph explaining
that there is no need of anchor the pattern again; a wildcard
is always anchored.

Fixes: QTBUG-81396
Change-Id: Ia67dc7477a05a450bdcc3def1ebbacce2006da4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-15 22:59:00 +01: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
Mårten Nordheim
c4b71844f7 QHostInfo: Remove useless code
This code has not been doing anything interesting since symbian times

Change-Id: If652c75b85e20f631edc4f946aacdee479a19212
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-01-15 12:48:54 +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
Nico Vertriest
7a59d6f138 Doc: Correct non-link related qdoc compilation errors
Task-number: QTBUG-79824
Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-14 16:38:48 +00:00
Olivier Goffart
2cbc5f6f7a Fix -Wdeprecated-copy warning
QDBusReply has an user-specified operator= but no copy constructor.

Change-Id: If7fcec3193af375f1bf2dd913d82548d6e035b48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-14 16:52:34 +01:00
Tor Arne Vestbø
8298118c52 macOS: Move palette setup into platform theme
The theme was the only client, so there's no point in keeping it separate
from its only call site.

Change-Id: I4783c5db6975ad2daaede704ab5855c57f190344
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-01-14 15:41:00 +01:00
Leander Beernaert
89d4f2f13e Remove invalid conversion and make it clearer for the future
Change-Id: I62fc075a4ebec7783a1e5fa35e113951aab9e674
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 14:24:43 +00:00
Friedemann Kleint
4e93e3b574 Add documentation for the widget gallery
Task-number: PYSIDE-1112
Change-Id: I35fe85d8ac9c2dab9f1260d3736c7f65e8e45d8e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-14 14:52:09 +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
Leander Beernaert
ee5d7facc1 Adjust OUTPUT_DIRECTORY for tests when targets starts with ../
Automatically insert OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../
for each tests that has a target name which starts with ../. To do so we
added the TARGET_ORIGINAL property which does not remove the ../ from
the target name.

Change-Id: I55ba1385aa160610a0ff80ed56ff37a80c3590fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 13:16:45 +00:00
Leander Beernaert
0761715f79 Regenerate src/
Change-Id: Icef5e834a6acc1cc4488bbed7749e81e1f2388b3
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-14 12:37:25 +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
Johan Klokkhammer Helsing
96dea48c15 Make the opengl module optionally depend on widgets
Previously, it was a hard dependency, so the opengl module wouldn't get built
when configured with -no-feature-widgets even though the widget dependency is
only needed for QOpenGLWidget.

Task-number: QTBUG-74409
Change-Id: Icc6e7599d0c9c31e9448456eef1e5ecc4605234a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-14 11:31:29 +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
Edward Welbourne
7b3d0abfa2 Do fewer calendrical calculations in QDateTimeParser::setDigit()
It was calling a QDate's year(), month() and day() methods, each of
which repeats most of the same calendrical calculations; and the same
results can be obtained from the calendar's partsFromDate() all in one
go. This also reduces the number of local variables needed.

Change-Id: I8f84e66a5f677f55cb2113c56ebbdf7c2517e828
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-14 10:47:05 +01:00
Timur Pocheptsov
0f568d0a67 Uncomment erroneously commented 'error'
It was meant to be deprecated in 5.15, not deleted (yet).

Change-Id: I6e3772d6c1d12dc060c1f540e55e756566db22e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-14 10:32:51 +01:00
Friedemann Kleint
01d24eea09 Windows QPA: Fix co-existence of several Qt versions in an application
Change qtbase/ef54abae43db79792b40dfdca30ac0fa1b582354 added a
new dummy message window for power notification. This causes the
static class name conflict check to assume there is no conflict
since it does not exist in previous Qt versions.
Change it to perform the for each class name.

Fixes: QTBUG-81347
Change-Id: I290806d021ac7de130a41e996d03b8fb4eb2c437
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-14 09:54:19 +01:00
Friedemann Kleint
2f366a63b2 Windows QPA: Fix message box and other system sounds
Re-add the code hooking into
QWindowsUiaAccessibility::notifyAccessibilityUpdate()
which was removed by
0cf6297c15.

Fixes: QTBUG-81342
Change-Id: Ie97d7cca5b774196d53b675c92d84f4ce208f987
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-14 09:54:04 +01:00
Mårten Nordheim
f494e8b58d Build the securesocketclient example for other SSL backends
Change-Id: I06b8361c116d2ae2aa2a64f63ac90b6ff1982008
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2020-01-14 09:44:28 +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
Joerg Bornemann
6d545dedad Fix mkdir warning for object_parallel_to_source projects
Source files that are right next to the project file result in an
empty "object subdirectory" if object_parallel_to_source is set.
We must not attempt to create empty directories.

Fixes: QTBUG-81271
Change-Id: I431f9fbe46f50fbbaa5d6a59966bfb059418036c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-14 07:58:03 +01:00
Samuel Gaist
44fd33e05c doc: improve SUBDIRS documentation for dependency handling
The use of the 'ordered' CONFIG option is known to not be efficient for
multi-core builds. This patch updates the documentation with an example
using the .depends modifier as well a discourage the use of 'ordered'.

Change-Id: I3575243a7c4138f0671d171441c932c3ad89a411
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2020-01-14 06:55:48 +01:00
Paul Wicking
99b3966319 Doc: Add note about mac-specific behavior for setWindowIcon
Fixes: QTBUG-74985
Change-Id: I7379865ab9564301c1e636ba1fda40cbb9e04c61
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-14 06:52:29 +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