Commit Graph

41636 Commits

Author SHA1 Message Date
Lars Knoll
66b6e28c01 Use QMultiHash::insert() instead of insertMulti()
Change-Id: I5daeba708a9efcf60e92cfc9a04e80546e9ae6a2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-11-05 17:32:34 +01:00
Lars Knoll
2faccdf9a6 Don't insert multiple names for the same role
It doesn't make a lot of sense to have two names for the
same role. Use 'fileIcon' exclusively for the Qt::Decoration/
FileIconRole.

Change-Id: Icaa46ba4aa61efc56ba007a14bab5e59ea26cd35
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-11-05 16:32:28 +00:00
Lars Knoll
dbb54805f6 Deprecate reverse iteration on QHash
std::unordered_map only supports forward iteration for good
reasons. Align our API with this by deprecating reverse
iteration and the operator+/-() for iterators.

[ChangeLog][QtCore][QHash] Reverse iteration over QHash is now
deprecated.
[ChangeLog][Potentially Binary-Incompatible Changes] QHash's
iterator category was changed from bidirectional iterator to forward
iterator. This may cause trouble if a library uses the iterator category
to alter functionality through tag dispatching. This only applies when
compiling the library or application with
QT_DISABLE_DEPRECATED_BEFORE=0x050F00 and the other with a lower value.

Change-Id: I0fb6d017cabdef1bc508e62f76dc2fa73cd3652d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-11-05 17:32:22 +01:00
Qt Forward Merge Bot
6f8a97e480 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-11-05 01:01:07 +01:00
Qt Forward Merge Bot
92e888f27e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Icd98de8592828c60cfea3d69f9c7ae2711b9f059
2019-11-05 01:00:54 +01:00
Allan Sandfeld Jensen
a3361ac66d Remove old resizing inplace QImage converters
They are highly unlikely to avoid reallocating and moving data, and
working inplace is likely just slower.

Change-Id: I16eb1d54a660e52b145be1ed0b64a3fb636a0002
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-04 23:58:40 +01:00
Christian Ehrlicher
77455a9a8c QProcess: explicitly mark QProcess::error() as deprecated
The signal QProcess::error() was deprecated in Qt5.6 but not annotated
with QT_DEPRECATED_X.

Change-Id: I9dd11c9b8019a0554cb82d6acb6b7e0a01c78123
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-04 10:42:55 +01:00
Kai Koehne
accc40f323 Fix check for EGL on INTEGRITY
This fixes a regression introduced in c00487d588.

Fixes: QTBUG-79285
Change-Id: I95f073d019d6e909f8de132ea9f27002043d5d52
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@tqcs.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-04 09:44:51 +01:00
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
Christian Ehrlicher
c31cdb1b3f Widget examples: replace QItemDelegate with QStyledItemDelegate
The documentation was forgotten in
5d4b5dab7f

Change-Id: I4e0f8f507199601910a174a080936b9a619048a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-11-02 13:29:17 +01:00
Frederik Gladhorn
7ba1d611cf Fix qtHaveModule(widgets) condition
In qmake syntax there should be a colon or curly braces following a condition.

Change-Id: Ibd989662aef6320cec8093e7c6103bf8362b8255
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-11-02 08:55:27 +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
Sona Kurazyan
44a26a0a79 Move the private and internal APIs of QDom to new files
qdom.cpp is too big, move the private classes and internal classes
to new files to make the maintenance and reviews for the upcoming
changes easier.

Task-number: QTBUG-76178
Change-Id: Ibe83bf9104e000d405a07653f4278083e2da648e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-01 16:37:25 +01:00
Timur Pocheptsov
1a878e65c2 QSslSocket - remove old OpenSSL backend (< 1.1)
OpenSSL 1.0.2 will stop receiving all support at the end
of 2019. Qt 5.15 is our next LTS thus makes sense remove
OpenSSL 1.0.2 support there. This also allows us quite
a significant cleanup of an old heavily if-defed code
and all 'pre11' suffixed source files.

[ChangeLog][QtNetwork][SSL] Removed OpenSSL 1.0.x support, now 1.1.x is required

Change-Id: I70c70c56cbd8aeff793afe793335696d1b1b7408
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-11-01 14:52:09 +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
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
Qt Forward Merge Bot
7a13a09116 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic13ef00d76c81295076bb2432576db70ec84fe29
2019-11-01 01:00:45 +01:00
Ville Voutilainen
36e277e917 Add a transfer timeout at QNAM level as well
Task-number: QTBUG-3443
Change-Id: Idc4d3c9b1ace69bd8b6456506778116a3e8a5490
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-31 19:12:07 +02: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
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
Volker Hilsheimer
5b20f58c19 Unify QFSFileEngine implementations on Windows and Unix
The functions for standard file system operations simply delegate to
the static functions in QFileSystemEngine, which are then implemented
separately for each platform. There is no need for the wrappers in
QFSFileEngine to be separately implemented as well.

The only noticeable difference between Unix and Windows versions was
the clearing of the meta data in QFSFileEngine::remove, which was only
done on Unix. This is now also done on Windows.

As a fly-by fix, correct the (internal only) documentation about case
sensitivity.

Change-Id: I274b34d5407fdfff2e0a2157bb5220607740a92a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-31 08:59:52 +01:00
Edward Welbourne
c3eb521a0f Update UCD data to Unicode 12.1.0's Revision 24
Had to teach the update program to accept category Lm as for
Joining_Transparent, for the sake of a new ArabicShaping.txt entry.
Added three new Unicode versions, several new scripts and a new
word-break class.

Updated UCD's test data for tst_QTextBoundaryFinder.  This left 57
tests failing; I have commented out the data rows for those tests,
pending someone with more knowledge addressing this.

Task-number: QTBUG-79631
Task-number: QTBUG-79418
Change-Id: Ic33d3b3551195d47a84d98e84020f57a68f0b201
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-30 17:38:02 +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
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
Ulf Hermann
fc3c6cde83 qmake: Don't call QDir::count() over and over
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.

Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-30 09:23:24 +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
Qt Forward Merge Bot
a317bff298 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib4df563fc7b1f7c40f425e0e71180d9517a672be
2019-10-30 01:00:14 +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
b56e856d21 Cocoa: rename IsMouseOrKeyEvent -> isUserInputEvent
This matches the intended use of this function. Reformat
to modern Qt style.

Change-Id: I076d2bdb3ac14b346f0dc6934f7a47765badc6b0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-29 15:22:46 +01:00
Laszlo Agocs
58a67e4e0a rhi: Move to CBOR in QShader and expand the autotest
Binary JSON is said to become deprecated. Therefore, add support
for CBOR. Binary JSON is still supported for deserialization, so
all existing .qsb files will continue to work, as long as the
binaryjson feature is enabled in the Qt build.

Also makes QShaderDescription comparable. This is important for
tests in particular.

A nice side effect of using CBOR is that .qsb files become smaller.
For a typical Qt Quick material shader this can mean a reduction of
300 bytes or more.

Task-number: QTBUG-79576
Change-Id: I5547c0266e3e8128c9653e954e47487352267f71
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-29 15:22:46 +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
Qt Forward Merge Bot
f3fd887de1 Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-10-29 11:13:03 +01: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
Christian Ehrlicher
c87e2c37de tst_QDataWidgetMapper/QFileIconProvider/ItemEditorFactory: cleanup
Cleanup QDataWidgetMapper/QFileIconProvider/ItemEditorFactory autotests:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override

Change-Id: I1a36ea2da7de1cfa5d5d4e305ef508fda3a6c460
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-29 06:24:01 +01:00
Giuseppe D'Angelo
538d5bdf66 Add a getter for QObjectPrivate::threadData
Strictly a temporary measure to deal with cross-module merges.

Change-Id: I344bb3f20f68f04367041834e608669122ff70b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-28 21:05:52 +02:00
Ville Voutilainen
c33d8bfc99 Add a timeout for transfers
If a transfer timeout is set for QNetworkRequest, downloads
and uploads are aborted if the timeout expires and bytes
haven't been transmitted in either direction.

Task-number: QTBUG-3443
Change-Id: I702d223d673f0c6612343dc9d053815acfcb61b8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-28 21:15:43 +03:00
Christian Ehrlicher
5d4b5dab7f Widget examples: replace QItemDelegate with QStyledItemDelegate
Replace QItemDelegate with QStyledItemDelegate in the examples since
QItemDelegate is deprecated.
Also fix up some unused documentation snippet references.

Change-Id: I42b8780ad0c317b9a253cc722d0b471695ed253f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-28 19:36:32 +02: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
Qt Forward Merge Bot
c78560f19a Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-10-28 01:00:55 +01:00
Qt Forward Merge Bot
7920397f0c Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I7803400aa500363fbaa57b0661315064bd3239d9
2019-10-28 01:00:42 +01:00