Commit Graph

42990 Commits

Author SHA1 Message Date
Kari Oikarinen
d6d902a990 Merge 5.14 into 5.14.2
Change-Id: Ib4b26bad47a850cde6253fb3422aae34b2cf622b
2020-03-10 09:43:16 +02:00
Friedemann Kleint
9aa2932701 Polish the Mandelbrot Example
Fix warnings about float constants and comparison.
Use member or constructor initialization.
Introduce some const for clarity.
Use Qt_CONFIG.

Task-number: QTBUG-81254
Change-Id: I71a6ebfba397c0f8e1dd2e61167233c8e5c137af
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-10 08:15:15 +01:00
Topi Reinio
a8ae9718b0 Doc: Mention .qrc compression attributes in resource compiler docs
Fixes: QTBUG-76321
Change-Id: Idf7b4157b46d98392314ccddf6b714f9e620b5f8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-03-10 06:47:45 +01:00
Allan Sandfeld Jensen
332816779c Multithread some QImage routines
Use QThreadPool to process QImage smooth-scaling, format conversions,
and colorspace transforms multithreaded.

Change-Id: Ic142b1fa899f56e7e5099d36ca713701a47b681b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-09 23:22:43 +01:00
Tor Arne Vestbø
cc59f0de55 macOS: Support printing when no printers are installed
Even if there are no printers installed, we can still show the print
dialog, which gives the user feedback about no printers being installed,
allows them to install one, or allows them to print to PDF as a
fallback.

The code for printing to PDF has been re-enabled, and the conditions
of QTBUG-38820 have been removed as the problem is no longer present.
The code also takes into account the possibility that the user chose
to print to PostScript, which we don't yet support, but warn about.

We now also support opening the printed document in Preview. This
requires a minor assumption about the print operation being done
synchronously after the print dialog is accepted, but this is
something we can improve in the future with internal APIs if it
turns out to be a problem.

Printing workflows such as sending the printed document via mail
or messenger are not not supported, and will give a warning.

Fixes: QTBUG-36112
Change-Id: I8ba9e2c5ce31a5a06542c4a7126d005e4b27f2be
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-09 14:53:50 +01:00
Kai Koehne
2097932dc5 Document how to use CMake for Qt Network
Add documentation on how to use a module from CMake, alongside
the existing documentation about qmake.

While at it, also remove the mentioning of the central include;
It is not something we should actively advocate anymore. Instead,
the documentation of every class gives the correct include to use.

Task-number: QTBUG-73058
Change-Id: I71ed5a62f4f0a6d868dd1f84ea39e5ac385a2fb8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-03-09 14:53:50 +01:00
Andy Shaw
20167a7fe9 WinRT: Use the fallbacks for getting the save file name
To bring it in line with the other platforms, then it needs to check if
the initially selected files are set and use the first one. Otherwise it
can fall back to the initial directory if that happens to include a
filename.

Change-Id: If34ae0e7e10b6a3c25e9422d9b4f2c21e6bfc8d1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-03-09 14:53:50 +01:00
Ulf Hermann
37a66236d2 qmake: Document qmltypes and metatypes
Task-number: QTBUG-81615
Fixes: QTBUG-82305
Change-Id: I0a411ff2ebc2dbf5462fa110b1eb70a1876b6ae5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-03-09 09:25:06 +01:00
Christian Ehrlicher
3702a4c37e QSortFilterProxyModel doc: do not mention deprecated function reset()
QSFPM::reset() is deprecated and begin/endResetModel() should be used.
Therefore adjust the documentation to reflect this.

Fixes: QTBUG-82470
Change-Id: I786b3f25e5674d97d0ef6a0c91342973d5e952e9
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-09 06:29:25 +01:00
David Faure
4bc9e3b847 QDataStream: fix compilation with QT_DISABLE_DEPRECATED_BEFORE=0x0050F00
Fixes: QTBUG-81023
Change-Id: I0d56785d1fed2c4c8e0e87ccefb0b72b0ed3644a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-03-08 15:38:04 +01:00
Christian Ehrlicher
114394702b QtSql/ODBC: allow table names with unicode chars
The ODBC driver did not properly decode table names with unicode chars.
Fix it by explicitly passing the unicode flag to qGetStringData().

Fixes: QTBUG-82401
Change-Id: Id6eb44cc85ce196ea97d0d6aef1cd573fa033970
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-07 12:02:22 +01:00
Jarek Kobus
50d2acdc93 Add default arguments to QPainterPath methods using transform
Fixes: QTBUG-82602
Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-06 21:09:48 +01:00
Marc Mutz
c1bb628572 Port from deprecated std::is_pod to is_trivial + is_standard_layout
The std::is_pod trait is deprecated in C++20; is_trivial
and is_standard_layout exist since C++11.

Change-Id: I4b901d8edf1a55001764445aee9c338d3dc23b21
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-06 18:06:43 +01:00
Laszlo Agocs
ccee938b51 rhi: vulkan: Silence useless desc.set validation warnings
This is deemed more appropriate than having some time consuming tracking
of descriptor types in pools, just to avoid the rare case of attempting
a failing vkAllocateDescriptorSets(), which is then always followed by
another, successful attempt.

Change-Id: I7a3a1d80afe400dc96605a3d6c834e8b2c71143a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-03-06 18:06:01 +01:00
Tor Arne Vestbø
94fc977b2b macOS: Disable system provided tabbing by default
macOS 10.12 introduced automatic window tabbing, where the OS provides
tab handling on behalf of the application. The feature defaulted to
being on, and the release notes asked applications that had their own
tab handling to disable the automatic tab handling explicitly.

Qt has its own tab handling, and should therefore disable the automatic
handling. We do this on a per NSWindow basis, using the tabbingMode
property of the window, instead of the global allowsAutomaticWindowTabbing
property on NSWindow, so that individual windows can still opt in to
the automatic tab handling. Doing it via the tabbingMode property
also ensures that we're not affecting the host application's
behavior in a plug-in setting.

Ideally Qt's tab handling should read the userTabbingPreference
property of NSWindow to pick up the system preference choice of
whether to open new windows as standalone windows or tabs, but
this is left for a later change. An alternative would also be to
use the automatic window tabbing instead of our own implementation.

Fixes: QTBUG-61707
Change-Id: Icf2078b63ec16202ff7fd83ea264a48dc61978e1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-06 18:06:01 +01:00
Friedemann Kleint
7fcc4e0a57 Windows QPA: Do not play sound for QMessageBox::NoIcon
Amends 2f366a63b2.

Task-number: QTBUG-82682
Task-number: QTBUG-81342
Change-Id: I30f465bf432e27828db460f6dbbb59eee0cca8f2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2020-03-06 13:29:56 +01:00
Allan Sandfeld Jensen
08b9e66347 Fix QDeviceDiscoveryUDev on FreeBSD
Include input.h from the right path.

Change-Id: I016027ab5d6372a8584e04043444a355e7e2d539
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-06 10:57:13 +01:00
Joerg Bornemann
2de3bfced3 Fix UB in QProcess deprecation warning fixes
The commits e1e08629 and 66e905b1 introduced undefined behavior. Fix
this by assigning the result of takeFirst to a temporary.

Change-Id: I9e29412cf632d4836b95d47e12d8c07ab0645fbb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-06 10:00:01 +01:00
Sona Kurazyan
249a2e3271 Disable warnings for the deprecated QLinkedList
QLinkedList has been deprecated, but we still need to test it. Suppress
the warnings for QLinkedList used in tests. Note, that I had to move
some of the test code, to avoid repeating
QT_WARNING_PUSH/QT_WARNING_POP everywhere.

Change-Id: I4203b3ef50045c4f45475a08638dbdc60f68761d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-06 09:50:35 +01:00
Kai Koehne
1a9c29289a Doc: Mark QColorSpace enum as introduced in Qt 5.15
Change-Id: Ibf2da1ebb4eb9520a2a507ed6afb89f7176391bb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-03-06 08:42:00 +01:00
Kai Koehne
b80503b377 Doc: Fix \sa link for QResource::uncompressedData()
No point in linking to itself.

Change-Id: Id0bf3fa6878417e541ec0997d34758b0c59e99b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-03-06 08:41:32 +01:00
Paul Wicking
a2446c0eed Doc: Let SQL Drill Down example show correct use of qgraphicsitem_cast
For qgraphicsitem_cast to work correctly with custom items, one must
reimplement the type() function for each custom QGraphicsItem subclass.
Do that in the example code.

Fixes: QTBUG-7357
Change-Id: Ibf221817908355f0347cddfc46747b6955958f5f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-06 08:12:52 +01:00
Laszlo Agocs
c3ae30085e rhi: Add support for arrays of combined image samplers
Introduces a new QRhiShaderResourceBinding function that takes an array
of texture-sampler pairs. The existing function is also available and is
equivalent to calling the array-based version with array size 1.

It is important to note that for Metal one needs MSL 2.0 for array of
textures, so qsb needs --msl 20 instead of --msl 12 for such shaders.

Comes with an autotest, and also updates all .qsb files for said test
with the latest shadertools.

Task-number: QTBUG-82624
Change-Id: Ibc1973aae826836f16d842c41d6c8403fd7ff876
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-03-05 19:40:41 +01:00
Joerg Bornemann
e1e0862990 Fix deprecation warning in QGenericUnixServices
Do not use the deprecated method QProcess::start(QString) anymore.

Change-Id: I09eae2c8a1dbb53fd2de004e5030da9bb3c07b14
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 15:20:07 +01:00
Joerg Bornemann
66e905b1c3 Fix deprecation warning in QProcess::execute(QString)
Implement this method in terms of splitCommand and
QProcess::execute(QString, QStringList).

Change-Id: I1fe78fb53d8b6b34a8796f9fbda380a98a840c99
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 15:20:02 +01:00
Tor Arne Vestbø
a539e53eb0 Add 'pass' test to testlib selftests
Change-Id: I858cd5e6ef7ad1064166efb7325c62065d46eb27
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2020-03-05 15:18:04 +01:00
Oliver Wolff
7c7bd44669 examples: Fix build for configurations that do not have printsupport
printsupport features are only available if the module is available for
the configuration. Every printer feature check has to be coupled with a
check for the module itself.

Change-Id: Id2ca84e71d5d74463d0ff35e8b18b252a779a883
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-05 15:11:36 +01:00
Marc Mutz
16f927a4f1 QLoggingRegistry: use QStringView/QLatin1String more
- QLoggingRule::parse() and the ctor take pattern as QStringView

- parseNextLine takes lines as QStringView and produces the pattern as
  QStringView for QLoggingRule

- (setContent has to wait for QStringTokenizer)

- QLoggingRule::pass()'s first argument is always QLatin1String, so
  take it as one

Use chopped() more, add a std::move().

Change-Id: Ic95ea77464a9922fef452846bc6d5053bd5de56e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 13:03:13 +02:00
Marc Mutz
c58249c327 tst_qstringapisymmetry: start testing char16_t, too
No surprises, as char16_t is transparently handled by QChar overloads.

Ok, one surprise: we seem to have QChar <> QByteArray relational
operators, but they don't work for char16_t. Probably members of
QChar, so LHS implicit conversions are disabled. Didn't investigate,
because it needs to be fixed at some point anyway, but that point is
not now.

Change-Id: I74e1c9bdd168e6480e18d7d86c1f13412e718a32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 10:51:39 +03:00
Marc Mutz
50f865e33f tst_qstringapisymmetry: fix indexOf/contains/lastIndexOf tests
... to not fold QChar tests into QString ones.

This is needed for adding char16_t tests.

Change-Id: I2507d7d68a39ff96cf033eadde10e383dc976dda
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-05 07:50:33 +00:00
Marc Mutz
b2f79cceb1 QLatin1String/QStringView: add (missing) member compare()
[ChangeLog][QtCore][QLatin1String] Added compare().

[ChangeLog][QtCore][QStringView] Added compare() overloads
taking QLatin1String, QChar.

Change-Id: Ie2aa400299cb63495e65ce29b2a32133066de826
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-03-05 07:50:02 +00:00
Marc Mutz
728cc964f3 QString/QByteArray: make all symmetry-checked member-compare() combinations noexcept
In QByteArray, they were just not marked as such.

In QString and QStringRef, the implicit conversion from QChar to
QString would destroy it. Add a QChar overload, delegating to
QStringView.

Added docs for the new overloads, copying from the nearest neighbor so
as to not look out of place. All string classes use different wording
for these functions. A cleanup of this state of affairs is out of the
scope of this patch.

Change-Id: I0b7b1d037aa229bcaf29b793841a18caf977d66b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-05 07:49:40 +00:00
Timur Pocheptsov
9e46dd7719 Document TlsV1SslV3 as deprecated
Change-Id: Id127b6d985d0085982e47b4f80886e3831ce07c7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-04 19:24:58 +01:00
BogDan Vatra
519ea72108 Android: Bump gradle (plugin) versions
Move min & target sdk from AndroidManifest.xml to build.gradle

Fixes: QTBUG-70817
Change-Id: Id9bb9825a3232587e0255b2d3d6f0273c5f9b66a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 18:02:35 +00:00
Mårten Nordheim
8131116896 QSslCertificate: Turn enum into enum class and expand abbreviation
From API review

Change-Id: Id174ff1a0a123585e41723ef1c1876b2f3bd39c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-04 18:36:04 +01:00
Andy Shaw
2c1b4e37b9 Fix CVE-2020-9327 in SQLite
This was taken from abc473fb8fb99900 in SQLite, ref:
https://www.sqlite.org/cgi/src/info/abc473fb8fb99900

Fixes: QTBUG-82533
Change-Id: I9840e29f19a0b861229987f5b59d8585ba2e55dc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-04 13:37:33 +01:00
Kirill Burtsev
2f52afda8e QLibraryInfo: avoid unneeded conversion for path prefix
Ammends 4ac872639e. Change return type for getPrefix to eliminate
toLatin1/fromLocal8bit conversion of initial value for relocatable
prefix to preserve not-latin1 characters and return valid prefix path.

Fixes: QTBUG-81462
Change-Id: I15cfa49e9e440e257b04dd31803cd1478f3b07f5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 12:37:27 +00:00
Andre de la Rocha
566def740e Windows QPA: Add support to UiaRaiseNotificationEvent()
This change adds support to UiaRaiseNotificationEvent() in the
UI Automation-based accessibility code, and uses it to notify changes
in string-typed values, allowing Narrator, NVDA and other screen readers
to notice changes in the application state that were previously missed.

Fixes: QTBUG-75003
Change-Id: I646ca3a851ab7b69817d900b002eb91a3bf607a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-04 13:09:48 +01:00
Volker Hilsheimer
d678827f11 Un-blacklist QElapsedTimer::elapsed test
The test was fixed and metrics show no flaky failures anymore.

Task-number: QTBUG-58713
Change-Id: I50c0844db099f45bb5b7ca51a510bf0318554c44
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-04 10:04:54 +01:00
Volker Hilsheimer
295a16b0d3 Don't use deprecated QPixmapCache::find overload
Silence compile time warning and show correct usage in example
snippet.

Change-Id: I1936f006e4b5f3ca71bbc0100ed039beeb459271
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-04 09:15:27 +01:00
Tor Arne Vestbø
048f0a00fa macOS: Don't create QMacCGContext when printing
We adopt the context of the print session, so the code is not needed,
and would just produce a warning since QMacCGContext didn't know what
to do about the printer paint device.

Change-Id: I9ac079f5cb5d98022045632592d0e375710eecc3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-04 01:30:11 +01:00
Tor Arne Vestbø
5d9d3ff326 macOS: Reduce save dialog extension filters to their last component
NSSavePanel does not deal well with multi-part extensions, to the point
where it will fail to open if that's the only acceptable extension.

We follow Chromium's lead here and reduce the extension to its last
component, which enables selecting and saving files such as 'foo.tar.gz'.

To improve the user experience we always show file extensions when we
detect a multi-part extension. This makes it clearer what the final
extension will be, and avoids confusing macOS about the intention of
the user when choosing a file that without the final extension also
matches another known extension.

Fixes: QTBUG-38303
Fixes: QTBUG-44227
Change-Id: Id0cee84f758c2cd59fcf1b339caa30f7da07dd1e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-04 00:29:54 +00:00
Thiago Macieira
ae6f73e856 QLibrary: introduce a mutex to protect non-atomic internals
And make pHnd atomic.

The majority of the variables is updated in QLibraryPrivate::load_sys
and updatePluginState(), which get the mutex protection.
QLibraryPrivate::unload_sys() doesn't need a mutex protection because we
have the refcounting.

[ChangeLog][QtCore][QLibrary & QPluginLoader] Fixed a number of race
conditions caused by having two QLibrary objects pointing to the same
library being operated in different threads.

Fixes: QTBUG-39642
Change-Id: I46bf1f65e8db46afbde5fffd15e1a5b3f5e74ea4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-03 14:36:32 -08:00
Thiago Macieira
ef92ac5636 QLibrary: stop setting errorString after resolve()
resolve() is technically thread-safe if the library has been loadaed. We
don't promise that, but it's there. More importantly, because
QLibraryPrivate is shared among QPluginLoader and QLibrary that point to
the same file, we can't thread-safely set the error string.

[ChangeLog][Important Behavior Changes] QLibrary::resolve() will no
longer set or clear the error string based on the success of finding the
symbol. The error string will reflect the result of loading the library.

Change-Id: I46bf1f65e8db46afbde5fffd15e1a4f4c2713c17
Reviewed-by: David Faure <david.faure@kdab.com>
2020-03-03 14:36:30 -08:00
Thiago Macieira
f6c1cebe42 QPluginLoader: rework the loading and the caching of instance
There was a race condition in accessing the cached instance factory
member, so rework loadPlugin() to return the cached or newly discovered
instance, with proper, atomic caching. Because I had to change that, I
took the opportunity to fix the QFactoryLoader code that calls
loadPlugin().

Note that QLibraryPrivate::loadPlugin() returns non-nullptr now if the
instance is known, which means the last return in QPluginLoader::load()
will convert to true, not false, if the instance got cached between the
earlier check and the call to loadPlugin(). That's probably what was
intended.

Task-number: QTBUG-39642
Change-Id: I46bf1f65e8db46afbde5fffd15e1a42d2b6cbf2c
Reviewed-by: David Faure <david.faure@kdab.com>
2020-03-03 14:36:28 -08:00
Shawn Rutledge
d9ca61bf0f Add the include for QPointer to avoid MSVC compilation error
It has been reported that 7447e2b337
needs amending to build on MSVC 2019, although it was OK in CI.

Change-Id: Id22c2a3608529abebd66c0e8f401bc6f26f45e18
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-03 22:30:11 +01:00
Christian Ehrlicher
8c883c8da3 QDom: use correct precision when converting float/double values
d7cb21ac08 change the way a double is
converted which resulted in less precision.
Fix it by explictily setting the precision in QString::setNum()

Task-number: QTBUG-80068
Change-Id: I1fd9d00837155ceb707e84bfeb9deff03b5ab57e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-03 22:08:18 +01:00
JiDe Zhang
4f370d36ec xcb: Fix logic for minimized state
When _NET_WM_STATE_HIDDEN is not contains in the _NET_WM_STATE
window property, the window should not be considered to be minimized

According to
https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html
_NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate
that a window would not be visible on the screen if its desktop/viewport
were active and its coordinates were within the screen bounds. The
canonical example is that minimized windows should be in the
_NET_WM_STATE_HIDDEN state. Pagers and similar applications should use
_NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether to display a
window in miniature representations of the windows on a desktop.

For mutter/GNOME Shell, without _NET_WM_STATE_HIDDEN, window manager
will not reply XCB_ICCCM_WM_STATE_ICONIC settings in WM_CHANGE_STATE
client message.

Task-number: QTBUG-76147
Task-number: QTBUG-76354
Task-number: QTBUG-68864
Done-With: Liang Qi <liang.qi@qt.io>
Change-Id: Ic9d26d963979b7f0ef4d1cf322c54ef8c40fa004
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-03-03 22:08:18 +01:00
Thiago Macieira
1edf586ed7 QMimeXMLProvider: fix another issue with -no-mimetype-database
The compiler must emit the destructor for the members of a class in an
inline constructor, in case the constructor throws. This won't work in
Qt 5.15 due to QList requiring knowing whether QMimeMagicRuleMatcher is
trivial or not. Another solution would be to use QVector.

Fixes: QTBUG-82547
Change-Id: Ia8b65350cd5d49debca9fffd15f79db872ed7c0c
Reviewed-by: David Faure <david.faure@kdab.com>
2020-03-03 11:44:27 -08:00
Ivan Čukić
14420b359b Add operator-> to the key-value iterator for QHash and QMap
This patch adds the arrow operator to the stl-like key-value
iterator (QKeyValueIterator) for QMap and QHash.

This allows using normal member access syntax it->first and it->second
instead of having to use (*it).first and (*it).second.

[ChangeLog][QtCore][Containers] Added operator-> to the key-value
iterator for QHash/QMap.

Change-Id: I9cfa6480784ebce147fcfbf37fec5ad0080e2899
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2020-03-03 20:25:19 +01:00