Commit Graph

42747 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
7cec37572a Add test for conversion of "large" images
This exercises the multi-threaded codepath and also tests precision
a bit higher.

To avoid quadratic blowup, only a short set of formats are tested in
the larger conversion tests.

Task-number: QTBUG-82818
Change-Id: I411deb97aea61a69fbdb24cbaf6559dd9436b703
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-11 18:45:46 +00:00
Allan Sandfeld Jensen
198d8eb5d0 Fix multi-threaded shrinking conversion
The conversion takes place in separate blocks, but may need to be
compressed after converting.

Fixes: QTBUG-82818
Change-Id: I71431af3d41e1bfe1f9b3d8cd7c1e0a2020846cd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-11 15:34:33 +00:00
Edward Welbourne
296bbbfa50 Fix minor errors in QDeadlineTimer docs
Change-Id: I0f33094da29300ca8a609cfffd700c2a82d86ad1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-11 12:27:40 +01:00
Qt Forward Merge Bot
12f903b155 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-03-11 12:27:40 +01:00
Allan Sandfeld Jensen
ee259ff60b Replace initialization of sparse table of converts with setters
This is similar to how the similar table in qblendfunctions.cpp is now
set, and is easier to read and maintain.

Change-Id: I43a885fae7b1a92110bb33f0b22a5b02fddc0115
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-03-11 12:27:40 +01:00
Qt Forward Merge Bot
116d68f105 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/plugin/qlibrary.cpp
	src/corelib/plugin/qlibrary_unix.cpp
	src/corelib/plugin/qpluginloader.cpp

Change-Id: I866feaaa2a4936ee5389679724c8471a5b4b583d
2020-03-11 11:27:49 +01:00
Allan Sandfeld Jensen
bd3c82f8db Fix non-trivial soft-hyphen line breaks
The effect of the soft-hyphen needs to be updated once the final the
break point has been found.

This change cleans the logic by using two variables keeping track of
soft-hyphen at current evaluated position and at last confirmed break
point. Also adds tests for supression of soft-hyphens in the tight
WrapAnywhere case.

Fixes: QTBUG-35940
Fixes: QTBUG-44257
Change-Id: I7a89a8ef991b87691879bb7ce40cec4a3605fdd5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-03-10 21:58:21 +01:00
Topi Reinio
52de905d0e Doc: Fix documentation for class qfloat16
This class has documented member functions, but only the related
\headerfile was documented. The class documentation itself was
omitted with the \dontdocument command.

Replace the \headerfile with a \class command, and move the global
functions to be related to the class itself. Keep the title as a
\keyword to avoid breaking any external links. The new class page
will inherit the .html file name of the header page, so we're safe
in that regard as well.

Fixes: QTBUG-82800
Change-Id: Id51539b45e0642d91b304a37f95461ca3d6c9841
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-10 17:51:56 +00:00
Laszlo Agocs
67edae9a08 QVulkanWindow: Fix setQueueCreateInfoModifier signature
...per API review.

Change-Id: I4a5a1cc895eac32f21f8a830507b841318509992
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-03-10 17:06:07 +01:00
Cristian Adam
d4207cb1a9 Mimetypes: Build fix for Android builds on Windows
Due to Android's multi-abi the build will fail due to concurrent
access:

cmd /c C:\Projects\Qt\repo\qtbase\src\corelib\mimetypes\mime\generate.bat C:\Projects\Qt\repo\qtbase\src\corelib\mimetypes\mime\packages\freedesktop.org.xml > .rcc\qmimeprovider_database.cpp
The process cannot access the file because it is being used by another process.

Change-Id: I647e0a6d8aa03cf116b08a1dce6e61e8882661f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-10 17:05:37 +01:00
Laszlo Agocs
3dd13d4075 rhi: d3d11: Honor resource/sampler slot limits
Show a warning but allow applications to survive by not attempting
to call VS/PS/CSSetWhatever() with an invalid number of resources.

Relevant for samplers in particular, where the limit is 16. Qt Quick 3D
exhibits problems with this when using custom materials combined with
shadow mapping, and while this is not a solution to the problem there,
at least the problem is now clearly indicated instead of crashing.

Task-number: QTBUG-82719
Change-Id: I83914b7648001fa421ed1cf07a7b7444e0ef8fc0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-03-10 09:38:03 +01:00
Mårten Nordheim
19a76200ea QDataStream: keep brace delimiters inside #if-scopes
Because it looks odd.

Change-Id: Ic272ae7b1b5a3e0a70884caa683ccbdd3a61ff6a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-03-10 09:29:12 +01:00
Mårten Nordheim
d340cc1512 Schannel: Fix readBufferMaxSize impl with incomplete data optimization
Following the incomplete data guesstimation optimization the
tst_QSslSocket::readBufferMaxSize test would fail due to it waiting for
16K, but the readBufferMaxSize was 10 bytes.

Amends 559b563d71

Change-Id: I5d17fac24e73c1305161aff744710b4c5b0b457a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-10 09:28:56 +01:00
Mårten Nordheim
d52a553754 Bearer management deprecation cleanup
For QNAM:
Deprecate the to-be-unused enum and mark the property deprecated in docs

For bearermanagement:
Add a warning on the bearermanagement documentation page that it is
deprecated.

Change-Id: I2cbe12ddec444d9f704601f07f3a7c9b70dc4f3c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-10 09:07:18 +01: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
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
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