Commit Graph

44339 Commits

Author SHA1 Message Date
Tor Arne Vestbø
c3c5a58f65 macOS: Tag sub-layer images with color space on flush
Failing to tag the image results in costly CPU-based color-space
conversions.

Change-Id: Ib65547f4b99b83e10d3603c27388f50eb4d3840c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-11 23:22:10 +00:00
Alexandru Croitor
c53f8c038c Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia0f7f0f1511f9f593c6d4585c859d1bf1353540d
2020-02-11 20:23:12 +01:00
Hikaru Terazono (3c1u)
243f4b2a8c Fix sorting of fallback fonts based on writing systems
Now qt_sort_families_by_writing_system checks all writing systems for sc
ript. This makes Japanese text look properly on macOS.

Task-number: QTBUG-81924
Change-Id: Id2a149eb84c5992414505b079be4e707f7f8c6c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-02-12 02:36:25 +09:00
Simon Hausmann
f9802b2fb1 Prospective fix for build with -Werror
home/qt/work/qt/qt5/qtbase/src/platformsupport/linuxaccessibility/constant_mappings_p.h:110:8:
error: ‘<anonymous>.TestNamespace::RoleNames::m_spiRole’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I514417b33c6142e4d87b97b24dec76d68ec92ab8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2020-02-11 18:36:17 +01:00
Timur Pocheptsov
47189b3a67 Cleanup QSsl code a bit
to get rid of the remaining deprecated enumerators/related names
and documentation bits.

Fixes: QTBUG-76501
Change-Id: I72aa837daf64d8336c95a4708840e0dec3e82d2b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 18:36:17 +01:00
Volker Hilsheimer
4e796e0b0d Stabilize QFileSystemModel::dirsBeforeFiles test
Make the test operate in its own temporary directory, so that entries
left behind by other test functions don't impact this test.

Also, call QFileSystemModel::sort explicitly; it would otherwise only
be done once through a single-shot timer, and the test processes events
until the model is populated, which might not process that delayed
sorting. Since dirsBeforeFiles tests the sorting algorithm and not
the sorting logic, best to do this explicitly.

In case of sort failure, print diagnostics.

Change-Id: I44c2b82ef1330cc8787aed2b5cbf109ef3a67876
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: QTBUG-75452
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-02-11 17:27:41 +01:00
Ulf Hermann
673038ebd5 metatypes: Only load qt_build_paths if we need them
Otherwise this fails for user projects.

Fixes: QTBUG-82038
Change-Id: I01bae2aab28bcedf745d1c5ae6932659ed4a7ed5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 15:36:18 +01:00
Alexander Akulich
c08b0cec2f QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:59 +03:00
Alexander Akulich
1c573ba47c QLocalSocket: Rename private errorOccurred method to setErrorAndEmit()
The method named like a signal and can lead to confusion especially
if such a signal will be added.

The new name taken from QAbstractSocketPrivate::setErrorAndEmit(),
though in QLocalSocket the method is NOT the only place of the error
set and the signal emission.

Change-Id: I7cdc487a39ec290203cced7359527f888342a0ad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:50 +03:00
Alexander Akulich
c034f92fc2 Revert "QLocalSocket - deprecate ambiguous 'error' overloads"
This reverts commit 0de6c26ac1.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I67dbb5cada25da473bdd02e71b1e2d9bd03f039e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:33 +03:00
Vitaly Fanaskov
11dc7b35c8 QComboBox: deprecate currentIndexChanged(const QString&)
Task-number: QTBUG-81845
Change-Id: Ia0ff5321423a5d3d4853bd425dd7236926f16047
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-02-11 10:37:10 +01:00
Samuli Piippo
9bab556005 Fix typo for Mtdev pkgconfig target
Change-Id: Id6e7057e8010f67ba1c8ce948abc59bc7abf7b7b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-11 09:20:14 +00:00
Alexandru Croitor
c9e67a7926 CMake: Regenenerate projects where recent changes happened
Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 10:19:45 +01:00
Alexandru Croitor
f1ae5ae726 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-11 10:19:42 +01:00
BogDan Vatra
dd04fb639b Set also ndk.dir
It's needed when ANDROID_NDK_HOME is not set

Fixes: QTBUG-81978
Change-Id: Id6108083ae62757ca839d652793d98a89e6cb6b5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-11 11:16:42 +02:00
BogDan Vatra
59121d2980 Fix ANDROID_XXXX replace qmake function call
The second parameter of replace is a regex, therefore trying to replace strings like
"plugins/sensors/libplugins_sensors_qtsensors_android.so" will result to super strange
results.

Fixes: QTBUG-81974
Change-Id: I887e70f4fd8fa2af482a60f63af371f954b56ce1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-11 09:16:42 +00:00
Johan Klokkhammer Helsing
79da236e76 QOpenGLContext: Remove QGL helpers
They were all private, and used only by QGL* (which have been removed) so
should be safe to remove.

Task-number: QTBUG-74408
Change-Id: Ia7fdff8f0bb963449470dbd8296cbdd8652c50e2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-11 07:45:03 +00:00
Jan Arve Sæther
a0da15f2c9 Remove comments about destructors needing to be empty
Not important, but removes some ### Qt6 comments from my radar

Change-Id: Ifd1bf44c44ece8fa1314d3c7e0e95d1bd37ae0ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-02-11 07:34:20 +01:00
Eskil Abrahamsen Blomfeldt
15aade6c76 Fix compilation with -no-directwrite
The refactoring for adding the DirectWrite font database broke
disabling this feature, which in turn broke compilation with CMake,
since the configure test isn't added there yet.

Change-Id: I7727145112df7f1009a09f09bf3368645fb1b5da
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 23:03:51 +01:00
Cristian Adam
4d798801e0 CMake Support: Fix dependent libraries search for MinGW and CMake 3.17
Fixes: QTBUG-81903
Change-Id: Ie2847e38c196c1f9d664b1a35339cca5ebf424cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 22:36:32 +01:00
Andy Shaw
288d5d8a71 Android: Make sure that it can find qrc files created via the pro file
Since Android will place the created qrc files in their own architecture
then we need to make sure that we account for this when returning a list
of all the resources. This is so that when other files are created that
depend on this list, it is able to find them.

Fixes: QTBUG-81477
Change-Id: I4a083c1c5c3e0aec35649cf7f5419cf3c6a75eae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-10 21:04:03 +00:00
Lars Knoll
7b0422d467 Remove dead code
We don't support unsharable containers anymore.

Change-Id: Ifafa1c9b4eb43d16b3866be3dd74dda1c592f084
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-10 19:20:17 +01:00
Lars Knoll
e12577b563 don't limit QCryptographicHash to 2^31 bytes of input
Change-Id: Icd43d3b387af9ef9e9b8adb9a6388c741949c9e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-10 19:19:56 +01:00
Alexandru Croitor
3af9d49bb7 Merge remote-tracking branch 'origin/wip/cmake' into dev
Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
2020-02-10 18:35:07 +01:00
Vitaly Fanaskov
f216c801ea QTextBrowser: remove deprecated signal highlighted(const QString&)
Task-number: QTBUG-81845
Change-Id: Ibdb0fe40557b901596cc8ef37c9707f99b4df403
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:48 +01:00
Vitaly Fanaskov
e59094cb86 QSpinBox: remove deprecated signal valueChanged(const QString &)
Task-number: QTBUG-81845
Change-Id: I91148cac553f63b44968337ccc121e7376ee4465
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:47 +01:00
Vitaly Fanaskov
9cc8949cc6 QComboBox: remove deprecated signals
The following signals have been removed:
- void activated(const QString &);
- void highlighted(const QString &);

Task-number: QTBUG-81845
Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-02-10 18:28:45 +01:00
Vitaly Fanaskov
f19fbbdb2f QVector: implement methods for adding new elements constructed in place
Fixes: QTBUG-80293
Change-Id: I687dc05a9ad2bad7bab3dc2b1173edf75550d57e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-10 18:28:43 +01:00
Kai Koehne
e541a3f099 QTranslator: Expose language of translation file
This allows for instance to show the current UI language in the UI,
or to load additional translations that match the .qm file by other
means.

This is especially useful in the case of QTranslator::load(QLocale(),
...), in which case different language and country combinations might
be tried.

Another option is to inspect the file name via QTranslator::filePath();
however, this is more error-prone, and might also miss information
(if the .qm file name doesn't have a country suffix, or no suffix at
all).

Change-Id: I6f565d53d8f50e21241ccae6c4de264747ac8f81
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:14:55 +00:00
Kai Koehne
dce61f0450 QTranslator: Expose origin file of the translation
Task-number: QTBUG-36608
Change-Id: I8ef0968404370b8fc25dc8b4c1e2c9e4484ae55c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:14:48 +00:00
Leander Beernaert
c431e2d33c Refactor Metatypes dependency propagation
Every metatypes.json files is now added as an INTERFACE source file to a
target. This enables us later to correctly collect all the
metatypes.json files from dependent targets. This information is also
correctly exported via export()/install().

To avoid the metatypes.json appearing in every target's source list,
the file path is wrapped in a generator expression which will only be
evaluated when the consuming target has the property
QT_CONSUMES_METATYPES set to true. At the moment this is limited to
targets which need to interact with qmltyperegistrar.

Change-Id: I0ffebcd069a923383f7ed11cde2c94ecf2fb13f3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 15:07:34 +00:00
Joerg Bornemann
5b59b2ea15 Doc: Document the ltcg CONFIG value
Fixes: QTBUG-81035
Change-Id: I41bff3aef3ac0ce7c117ab2245491dceb6f2685b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-02-10 15:09:20 +01:00
Assam Boudjelthia
a84c895b17 Android: Fix native fileDialog not waiting for user selection
Add an event loop to wait for user file selection in native fileDialog

Task-number: QTBUG-77214
Change-Id: I3d97d6c3f46cf2a8ed0ee6f98e555e8d62e12cc3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-10 16:09:20 +02:00
Marc Mutz
b1089787d1 QMimeData: Extract Method QMimeDataPrivate::find()
Centralize the search for the QMimeDataStruct with a given format in
find() (overloaded on const and non-const, but implemented only once),
and use it in the three other functions that performed lookup before.

In setData(), optimize the case where data is overwritten.

Use a std::vector to not have to think about hidden detaches when
implementing the const find() in terms of the non-const one.

Change-Id: I874e5c6ef9c97d98b42f29faccbc3043e8c6a855
Reviewed-by: David Faure <david.faure@kdab.com>
2020-02-10 14:09:12 +00:00
Tor Arne Vestbø
4777c6d76b testlib: Improve error message when detecting line count mismatch
Change-Id: I0e19b4c0dd7aa77063e02e6aac7e345dd7c8a5f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:06:14 +01:00
Tor Arne Vestbø
93b8cdc974 testlib: Make testlogs enumerable and printable
Change-Id: Id0ac30fe0a63757ef722634e6dd90806015467aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-10 15:06:06 +01:00
Dmitriy Purgin
9557715016 std::chrono overload added to QStateMachine::postDelayedEvent()
Some Qt classes already accept std::chrono durations in their methods
(see, for example, QTimer). The proposed change adds an overload
with std::chrono::milliseconds to QStateMachine::postDelayedEvent().

Change-Id: I360fd2bb54fedc7415e9ec17e096095be3604d41
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2020-02-10 15:04:39 +01:00
Jan Arve Sæther
f415c5ad23 Remove unused variable
Change-Id: I774b1647eff5fcfa0de5bcc50ca2638644b03613
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-02-10 15:04:39 +01:00
Laszlo Agocs
71e9c2f036 rhi: vulkan: Fix descriptor update with more objects involved
Once the number of buffers or images exceeds the QVarLengthArray limit,
it moves over to heap-based allocation, and then reallocated to grow as
needed. Problem is, if we keep references to the elements, those may get
invalidated on every grow. This was not an issue until the element count
reached the preallocated (stack) count.

So instead, store indices and fill in the pointers in the VkWriteDescriptorSet
only before issuing vkUpdateDescriptorSets().

Change-Id: I99f26f5e14cb28107edb1db86a21afa135858589
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-02-10 10:40:02 +01:00
Ulf Hermann
71436d5499 Fix typos in the documentation for Q_REVISION
Change-Id: Ic55ab0dfca0f62e8d29a4e7d41384bed6fb1da62
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-10 10:20:20 +01:00
Thiago Macieira
23d42a6a30 QStorageInfo/Linux: resolve non-existent devices via /dev/block
On systems with very simple boot sequences, the kernel will create a
device called /dev/root and use that to mount the root filesystem.
However, that doesn't actually exist in /dev and could cause
confusion. So we try to resolve using /dev/block if the /dev entry does
not exist but udev is in use (udevd has the string "/dev/%s/%u:%u").

[ChangeLog][QtCore][QStorageInfo] Improved discovery of device nodes on
Linux if the /dev entry was renamed after the filesystem was mounted and
udev is in use.

Fixes: QTBUG-81464
Change-Id: If79a52e476594446baccfffd15eec573ae3deb0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-09 22:19:20 -08:00
Marc Mutz
6b9a1824a4 Extend tst_qstringapisymmetry for member compare()
There were a few surprises:

- QByteArray::compare() are missing noexcept (will add)
- ibid., called with non-ascii content and CaseInsensitive fails
  (this was discussed on the ML, with tentative agreement that
  it's a feature, not a bug; waiting for QUtf8String(View) for a
  fix, then).
- As was the case when we did this exercise with the relational
  operators, QString(Ref)/QChar is not noexcept (will fix)

These have been QEXPECT_FAIL'ed.

Not much of the cartesian product is implemented at all, yet.  These
have been #ifdef'ed with NOT_YET_IMPLEMENTED to see what's still
missing.

Change-Id: I7d9b21e292b98f980aacdc6248e88188f7472ba2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-09 17:43:20 +00:00
Lars Knoll
7caaf4eb7f Don't rely on iterators being stable while modifying the hash
The Mapping struct referred to where it got inserted into the
source_index mapping table by a const iterator to the table. That
is rather fragile, as changing the table invalidates the iterator.

It happened to work with QHash in Qt 5, but will break with the new
implementation in Qt 6.

Instead simply store the key in the Mapping struct so that it can
be quickly found in the hash.

Also fix one place, where we unconditionally call erase on an iterator
returned by constFind(). Turns out constFind() did sometimes not find
the item in question and returns end().

Change-Id: I0420a06d496f640a3150478e8c644d4cc669ceff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-09 17:41:52 +01:00
Tor Arne Vestbø
dfaa61482c Blacklist tst_QGuiApplication::quitOnLastWindowClosedMulti on macOS in CI
Change-Id: I55cb9a6b3aebac68fb1b20127ba7aa501b4a3f2b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-08 14:01:11 +01:00
Olivier Goffart
4933a5f892 Use C++17 for qmake and force the build of everything with C++17
We will want to use C++17 code in our headers soon.
(including the one in the bootstrap libraries)

This patch is quick and dirty, I guess it will be cleaner once we move to cmake

Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does
not support C++17 stdlib features

Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-08 09:49:07 +01:00
Timur Pocheptsov
1a54165756 QMacStyle: fix NSBox geometry for Aqua theme
Apparently vertical shift and increased height were not enough, more
adjustment needed horizontally also: the default NSBox draws itself
smaller in both dimensions and shifted from the origin we wanted.
Thus we trick it to think it's drawing a bigger thing. It will
draw a smaller one (again), but closer to what we need.

Fixes: QTBUG-72365
Change-Id: Ib3a4c0b3eafb9f2f9d3b24bcbdd8335e73053622
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-08 05:58:38 +01:00
Qt Forward Merge Bot
9634055543 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I5d80d84d1fd9f52e7c8e4895cc34d4d29043f400
2020-02-08 01:00:08 +01:00
Mårten Nordheim
3568ad58f5 Introduce a configure-time check for C++17 filesystem
Various compilers have various fun ways of failing to compile when it
is used so let's check if they will work properly during configure
rather than much later.

Change-Id: Ia93d4b91b3d269b4cab2a5f677c3c89e06b44ce3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-07 23:51:06 +01:00
Ulf Hermann
f64694647a moc: Extend revision markers to allow for major and minor version
As we want Qt's own revisions to follow the Qt versioning scheme, we
need to allow for the minor version to reset to 0 now. In order to
facilitate this, we interpret the argument passed the current Q_REVISION
macro as major version and allow for an optional minor version. Both are
encoded it into the resulting revision number.

Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-02-07 21:23:55 +01:00
Christian Ehrlicher
0eb922a4e9 QtSql: remove deprecated signal 'notification(QString)'
It was deprecated in Qt5 and the replacement signal with three arguments
can be used instead.

Change-Id: I6d0db8d9fa9bea2039c548e32bc39a8173403c3a
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-07 20:22:45 +01:00