Commit Graph

41770 Commits

Author SHA1 Message Date
Kai Koehne
1d959c0de3 Qt XML: Fix module in comment
Change-Id: Ibb1c0b54c4add118328f9281e2dbbcf9c1c62312
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2019-11-04 09:00:38 +01:00
Andy Shaw
39ed657b63 Query the mouse buttons initially in case the middle button was used
Change-Id: I99a3ef598bdaaba1afb6bf6521d1ceafcc9b603c
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-11-03 11:44:08 +01:00
Friedemann Kleint
5436a6f3e0 QNetworkReply: Fix SSL configuration handling
Use QT_CONFIG consistently and enclose
sslConfigurationImplementation(), setSslConfigurationImplementation()
and ignoreSslErrorsImplementation() within QT_CONFIG as well.

This enables a build of Qt for Python with -no-feature-ssl.

Change-Id: Ia699293ab73a5dc86d8dcf95aa5f6369334d36a2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-11-01 20:13:54 +01:00
David Faure
0fb995492d QImageIOHandler: remove #if around virtual method name()
It makes -DQT_DISABLE_DEPRECATED_BEFORE=0x050d00 (in an application)
trigger a binary incompatible change and crash.

Change-Id: I9b9783d134821697180dc3fd8f2f69a51ddb7ac6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-11-01 17:13:20 +01:00
Leena Miettinen
fa0a79a2bb Doc: Add guidelines for writing Qt tests
Based on https://wiki.qt.io/Writing_Unit_Tests. Some of the
guidelines will be added to the documentation of a particular
class, function, or macro.

Task-number: QTBUG-18368
Task-number: QTBUG-63987
Change-Id: Ied267edc71e370a07f5124ba05432799f595dda6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-11-01 15:29:13 +01:00
Peter Varga
a54a48e5b8 AtSpiAdaptor: Fix QAccessible::TextUpdated notification
Change-Id: I47e445d085b130121fe44eb2d4afc830de3b884b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-11-01 14:40:27 +01:00
Leena Miettinen
4f45dc762d Doc: Add best-practice-info for using QVERIFY() and QCOMPARE()
From https://wiki.qt.io/Writing_Unit_Tests

Task-number: QTBUG-63987
Change-Id: I7229ac0712d1207c0c9ebdac868c33bb35dcb0f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-11-01 14:40:27 +01:00
Adam Sowa
efaa4aa2a1 QFile::decodeName(const char *): don't construct QByteArray but use the argument directly
Use QString::fromLocal8Bit(const QByteArray &str) instead of constructing QByteArray to avoid memory allocation and strcpy.

Change-Id: I32bbb47fbc45681c621adaebe8f8574d8f8ad6bf
Fixes: QTBUG-79644
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-01 07:53:07 +00:00
Kari Oikarinen
2d680b27f3 Clarify Q{Abstract,Local}Socket::waitForDisconnected() documentation
Make it clear that the functions will return false if the socket was already
disconnected.

Fix the QLocalSocket example snippet to handle that case correctly by checking
state() before attempting to wait.

Fixes: QTBUG-50711
Change-Id: I4ab4062446a0041a35a3a1d65a19202ffa103298
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-11-01 10:09:43 +03:00
Kavindra Palaraja
312ff6f83b Docs: Fix a typo in the documentation
Change-Id: Ice4d0842883e32f62abd27be826b1caf1c78d3b6
Fixes: QTBUG-55503
Reviewed-by: Frederik Schwarzer <schwarzer@kde.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-11-01 08:00:57 +01:00
Lorn Potter
26f9cb7ce5 wasm: take canvas offset into account
This fixes issue with dialogs when the canvas is not at 0,0 in the
browser window

Change-Id: I14f6754746e064921635d6b3af3353bf3620ac44
Fixes: QTBUG-79160
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-11-01 11:03:28 +10:00
Leena Miettinen
a62a6b9b17 Doc: Update info about QSKIP()
Add a section about using QEXPECT_FAIL() to skip known bugs.

Change-Id: Icf258b6e20add3b68d62e404fd9ac0db70420bf2
From: https://wiki.qt.io/Writing_Unit_Tests
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-31 18:28:42 +01:00
Friedemann Kleint
37b4c07c70 3rd-Party/Double conversion: Fix developer build with MSVC
Re-apply 72e3d3633e, which
was omitted in 425df43d7f.

Task-number: QTBUG-79418
Change-Id: I0afa9ff9ace5bdc6cea103cf2acba6dbf9a64a72
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-31 15:56:08 +01:00
Mårten Nordheim
0ae489053a Turn a local QHash into a QMultiHash
972a0402be was merged before one of its
parent patches which changed this QHash into a QMultiHash. So in 5.14
it would overwrite values instead of adding new entries. No idea if it
has caused or will cause any regressions. But it was an accident so
let's fix it.

Amends 972a0402be.

Change-Id: I6623b0b7924024df148d5c83bcbb612f3e595f56
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-10-31 14:55:44 +01:00
Allan Sandfeld Jensen
c0adcf0f22 Fix text-rendering regression on semi-transparent background on Linux
The short-cut for semi-transparent backgrounds has to take precedence
over the disabled gamma-correction short-cut. The order got inversed
in one function during 5.14 refactoring.

Change-Id: I0e54428839428068b602a13eddbf69897ed0797d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-31 13:43:54 +00:00
Laszlo Agocs
09ee9ef65d Avoid EGL_BAD_MATCH in tst_qrhi autotest
Call adjustedFormat() as advised by the docs: "Applications are advised
to set this format on their QWindow in order to avoid potential BAD_MATCH
failures."

Task-number: QTBUG-79659
Change-Id: Ibf415fb0ee64bdd3f01d4ba744244bce811c0d27
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-31 14:41:07 +01:00
Leena Miettinen
f54e97726f Doc: Add notes about Qt Style Sheets taking precedence
...over setting properties on individual widgets.

Task-number: QTBUG-28675
Change-Id: Ic7bfd723ed8970112a9892727170d3bacaa1903f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-31 12:56:19 +01:00
Topi Reinio
b20956531b Doc: Remove empty section title from QMilankovicCalendar
Change-Id: I01b311cbe67fbb89625beb5a3941a652c9e851ed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-31 11:10:31 +01:00
Tor Arne Vestbø
41226c4c48 macOS: Don't skip display link delivery via GCD during live resizing
We now avoid flushing GL if the exposed size does not match the window
size, so we don't need to halt update request delivery during resize.

Change-Id: Iaa89e67d50c987757a586b5958e08edf71a5dd0c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-30 15:46:40 +01:00
Leena Miettinen
faff69968b Doc: Add best-practices-info about creating benchmarks
From https://wiki.qt.io/Writing_Unit_Tests

Change-Id: Idc0bafb32690f443e1f49cd4f8efb653d3aa46a4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-30 14:51:09 +02:00
Leena Miettinen
949fc2860e Doc: Add best-practices-info about initialization and clean-up
From https://wiki.qt.io/Writing_Unit_Tests

Change-Id: I20027066640ca797a2330f6daa81468f03921a69
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-30 14:50:57 +02:00
Kavindra Palaraja
6132b77db9 Doc: Clarify the ownership of a state for addState()
Change-Id: Ibe498c5288faa478a4dba934bc3c403829b337db
Fixes: QTBUG-62445
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-30 09:23:27 +01:00
Liang Qi
58f5695084 Update bundled Freetype to 2.10.1
[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.10.1.

Fixes: QTBUG-77466
Change-Id: I1de8b8b03e0ffd0b17eeafff1017df7c638c9279
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-30 08:48:18 +01:00
Qt Forward Merge Bot
c51ca1d1b2 Merge remote-tracking branch 'origin/5.13.2' into 5.13
Change-Id: Ieb5afc87086758119bcfc8efbe355f5c0a93fc04
2019-10-30 06:52:03 +01:00
Albert Astals Cid
f121f319b9 examples: Fix -Wdeprecated-copy warnings
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::sendMessage()’:
examples/corelib/tools/customtypesending/window.cpp:79:71: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
   79 |     thisMessage = Message(editor->toPlainText(), thisMessage.headers());
      |                                                                       ^
In file included from examples/corelib/tools/customtypesending/window.h:55,
                 from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
   62 |     Message(const Message &other);
      |     ^~~~~~~
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::setMessage(const Message&)’:
examples/corelib/tools/customtypesending/window.cpp:87:19: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
   87 |     thisMessage = message;
      |                   ^~~~~~~
In file included from examples/corelib/tools/customtypesending/window.h:55,
                 from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
   62 |     Message(const Message &other);
      |     ^~~~~~~

Change-Id: I563d53f7dd1e0e0dc5fd4db06299b2d0a70c62ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-30 07:46:35 +02:00
Andy Shaw
be73bdc5d2 Only call ShowCaret if Windows 10 1709 or later is used
This amends cc873ec23a which worked around
a problem that was showing up on earlier versions of Windows. This
extends the workaround up to Windows 10 1703 as the problem was still
occurring up to that version.

Fixes: QTBUG-79143
Change-Id: Ib7eace17fb8e3817c556e2bcd462e37834b1cbcf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-10-29 18:34:08 +01:00
Edward Welbourne
d05ca484cf Make tst_QNumeric more systematic about checking float as well as double
Do this by templating the floating-point tests, which removes some
existing duplication as well as avoiding new duplication. Did some
renaming in the process. Added some tests of fuzzyCompare that come
closer to its boundary. Increased number of tests from 69 to 97. Use
std::numeric_limits to replace assorted hard-coded constants and old
C-library boundary-value macros.

It turns out MSVC's float conflates quiet and signaling NaN (although
MinGW's doesn't); and WebAssembly's old fastcomp compiler conflates
NaNs for both float and double; so XFAIL the test for distinct NaNs in
those cases.

Change-Id: I0a1c0d2f68f75d51b8cda9e3ddfe7fa9c190a3e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2019-10-29 16:46:54 +01:00
Alessandro Portale
d157292f16 Wasm: Fix the markup in wasm_shell.html
Img width and height are separate tags. Alternatively, they could
be defined in the style tag.

Change-Id: I0a4a93b63a99a7b644e9096bb9238739f408c0df
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-29 16:12:23 +01:00
Morten Johan Sørvig
dcbcda81b4 wasm: add local file access manual test
Testes file load and save, computes a sha256 hash
for verifying file content.

Change-Id: Id7f697c4dfd41e051442350f4050f04b493cfc18
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-29 14:02:43 +00:00
Tor Arne Vestbø
aa91b0083e qpa: Add note about QScreen taking care of primary screen during removal
Change-Id: I31b4ed6e6597e22172dcca7180750f1392b9ad68
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-29 11:07:50 +00:00
Paolo Angelelli
ba2ee2875a Fix computegles31 example crashing on Pi4
Due to work group size configured for desktop GL.

Change-Id: Id62cf297e280e04aecba748cf41b62c64ed9a0b2
Done-with: Andrey Yaromenok <ayaromenok@gmail.com>
Fixes: QTBUG-79374
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-29 10:48:35 +00:00
Qt Forward Merge Bot
f3fd887de1 Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-10-29 11:13:03 +01:00
Andy Shaw
ccd3bf0871 Ensure that child windows are visible again when showing their parent
When a window is closed, then it will cause the child windows to be
closed as well as a result. Therefore in order to ensure that they are
shown again as a result, we need to remove the WA_WState_ExplicitShowHide
attribute if the widget was not already hidden before. This enables us to
test for this attribute when calling showChildren(), so that if the
window has a windowHandle then we can make sure that this widget is shown
again.

Fixes: QTBUG-73021
Change-Id: I1186242b889899dfcd38d782a67567348e2055ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-29 10:45:19 +02:00
Alexandru Croitor
82ee87b7b8 CMake: Fix androiddeployqt support when using add_library MODULE
The recent change to support android with CMake assumes that the user
project will have add_library(foo SHARED), and sets the
CMAKE_SHARED_LIBRARY_SUFFIX_CXX variable to modify the final library
name to contain an ABI suffix.

This did not work when using add_library(foo MODULE), and
androiddeployqt failed saying it can't find the application binary.

Make sure to apply the ABI suffix to MODULE targets. Also cover
the suffix to be added regardless if the language used for compiling
the SO is C or C++.

Amends 52c799ed44

Change-Id: Ic44d67e33a123bd0104d98b368ceda0844474980
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-29 08:57:44 +01:00
Andy Shaw
11acbc2c99 sqlite: Update to v3.30.1
Since the patch applied previously is no longer required, we have
removed that too.

[ChangeLog][QtSQL][sqlite] Updated to v3.30.1

Fixes: QTBUG-79416
Change-Id: Ifc3fcc6e1768f80e97a5e0ab4b2aeabddf2ced9d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-29 09:17:41 +02:00
Mitch Curtis
d86192e5ba QFontDatabase: improve logging output
Log the style name, add more descriptions of what's being logged.

Before:

Adding font "Lucida Grande" 50 QFont::StyleNormal 0 aa true fixed false

After:

Adding font family "Lucida Grande" stylename "Regular" weight 50 style QFont::StyleNormal pixelSize 0 antialiased true fixed false

Change-Id: I138f1b9f41dc41c528c830d81f8018fc16561631
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-28 15:42:29 +01:00
Eskil Abrahamsen Blomfeldt
c62dbc0c02 no-thread: Add dummy implementations for stackSize functions in QThread
We recently added a call to setStackSize() in the QML thread, which
revealed that the dummy implementation for this function was missing
in no-thread builds.

Fixes: QTBUG-79571
Change-Id: Ibabb48d9cba73afda0842642045a2961e65523f9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-28 13:29:32 +01:00
Christian Ehrlicher
5b22dc71a3 QGraphicsItem: disable deprecated warnings during compilation
The previous commits which deprecated the function forgot to add
QT_WARNING_PUSH/QT_WARNING_POP around the affected code.

Change-Id: I042a2bcd40afe2e5fe517954be26a02fd048b563
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-28 13:09:40 +01:00
Morten Johan Sørvig
9cb823cd0f QTestLib: basic WebAssembly support
Disable the crash signal handler. This makes it possible
to run auto-tests in the browser.

Long-running tests may cause the browser to interrupt
or display the “a web page is slowing down your computer”
message, or not produce any console output while the
test is running.

Change-Id: Ifd53b744bd3652abfb466b78992ce2371eca2536
Task-number: QTBUG-68504
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-10-28 11:52:57 +00:00
Qt Forward Merge Bot
08f90adffd Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/serialization/qjson_p.h

Change-Id: I83cea141a4de8b3998478bfded84ca9029f7a2a9
2019-10-28 10:50:03 +01:00
Tor Arne Vestbø
4b346aedf8 macOS: Deliver update requests even when view or layer needs display
This was a workaround to prevent visual artefacts from flushing GL
during window resizing, but now that we skip the flush entirely in
this situation we don't need to limit the update request delivery.

Change-Id: I84bd48e4e2fc5a03e9d27d5f9b4b32b8098e56a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-28 11:48:40 +02:00
Tor Arne Vestbø
dcbe25bbbb macOS: Only skip screen reconfigure if primary screen changed
Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:19:01 +01:00
Tor Arne Vestbø
3ee634d520 macOS: Extend QCocoaScreen logging
Change-Id: I91f89ff336b3f48aea91e50860264bd8359805cb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:18:59 +01:00
Tor Arne Vestbø
5982451ac6 macOS: Class initialize QCocoaScreen members
Change-Id: I163858400da28668b8a85241e9e6b1d989227a3e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:18:56 +01:00
Tor Arne Vestbø
360a2e79c8 macOS: Don't leak CFUUIDRefs when resolving NSScreen for platform screen
Change-Id: I5609071346ef44dc9f16359db451ea9b29dd2b0d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:18:52 +01:00
Tor Arne Vestbø
22c3fd0508 macOS: Remove assert that primary display always matches CGMainDisplayID
Fixes: QTBUG-78707
Change-Id: Ia517f543728c76dcf19558e9e68ed97db7cfaaa4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-27 20:00:02 +02:00
Yulong Bai
a21d4395f4 Drag'n'Drop: fix attached Drag object deleted when DnD is progressing
The attached Drag object's owner, i.e. its parent, is also the dragged
item. So the attached Drag object will also be destroyed as the dragged
item is deleted.

Fixes: QTBUG-65701
Change-Id: I39b0a3180f205c427deed5c70cd1912524f9324e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-27 17:40:44 +02:00
Joerg Bornemann
73cb5cb01e Fix prefix for non-Windows cross-builds on Windows
When one specified a prefix "/usr/qt5" on Windows for a non-Windows
target (e.g. QNX) that prefix was translated to "C:/usr/qt5" and
passed on to the Makefiles, for example as
"-Wl,-rpath,C:/usr/qt5/lib".

The reason was that we called $$absolute_path on the user-specified
prefix. However, absolute_path operates according to the rules of the
host operating system.

When cross-building, the prefix is an on-device path. Therefore we
must not attempt to make it absolute to the build directory.

The check whether we're cross-compiling looks a bit arcane, but we
cannot use $$qtConfEvaluate(features.cross_compile) at this stage of
configure. Instead, we use XSPEC (set up by qtConfOutput_prepareSpec)
and $$[QMAKE_SPEC] which is the right host mkspec.

Fixes: QTBUG-79214
Change-Id: Id8664f8512cf1d9e178054a38e72323d7929547d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-10-25 18:15:36 +02:00
Edward Welbourne
48603baf94 Update public suffix list to latest version
[ChangeLog][Third-Party Code] Updated DNS public suffix list

Task-number: QTBUG-79418
Change-Id: I02dbe2b1f5b5f3e4a1ed4fde60ee71f5b0a50cb5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-25 18:06:23 +02:00
Edward Welbourne
265b25a5c3 Specify year in month name lookups for QCalendarWidget
The compiler didn't complain at a QLocale::FormatType values being
passed for the int year parameters of the month-name functions, which
all have a default for their final QLocale::FormatType parameters. So
we didn't notice that the year parameter was missing until the bug was
reported.

Removed some code duplication by giving QCalendarModel a monthName()
method. Reworked QCalendarMonthValidator::text() to avoid repeated
calendar calculations (and use fewer braces).

This commit amends commit 2dee006216

Fixes: QTBUG-79495
Change-Id: Iad48c3b648a0139ab43511e6fb4e6a8f63a0495f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-25 18:06:06 +02:00