Commit Graph

39871 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
b29505bb37 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I60bb714ef11bced075d94addb74d23c3a3975519
2019-08-24 01:00:08 +02:00
Marc Mutz
96ff6e8ebe QGuiApplication: drop mutex before emitting fontChanged()
Emitting a signal executes an unknowable amount of code. We shouldn't
hold a mutex while doing so. E.g., if the signal emission causes
another call to QGuiApplication::setFont(), the old code would
deadlock, since applicationFontMutex is not recursive.

Fix by taking a copy of the application font under mutex protection,
then dropping the lock for the emission of the signal.

Change-Id: Ib2569b3a08af6ef5f38459a19f74cb0db27b7772
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-23 10:39:43 +02:00
Lorn Potter
536cab1a93 wasm: add network object checking
This should help when things are moving fast, and downloads and
network object are destroyed before the callbacks finishes.

Change-Id: I1f65965bd61efc2e641d03eb071f23e684dd5c44
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-23 01:56:59 +00:00
André Klitzing
b1db1dd655 Fix build with -no-feature-printer on macOS
Fixes: QTBUG-62675
Change-Id: I3bfcd6d78c3124769ff8662941472333c795fdbe
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-22 21:27:23 +02:00
Laszlo Agocs
c47f436175 Avoid double QCache lookup in QOpenGLProgramBinaryCache
Change-Id: I4384a15f0b89e1f6d7f59bff1816fc2e6fc6adfe
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-22 09:40:52 +00:00
Tor Arne Vestbø
e688e28ee5 macOS: Invalidate backingstore and trigger expose on color space changes
Fixes: QTBUG-77749
Change-Id: I677a71152e4a218c08d8863d4f886d158a79e809
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-22 02:15:38 +02:00
Tor Arne Vestbø
ee82f86615 macOS: Don't ask for a NSWindow background unless we need one
This allow halfway transparent windows, even with a border, which is
a bit of a weird use-case, but matches what we do on other platforms.

We don't need the explicit call to NSDrawWindowBackground in the
QNSWindowBackingStore implementation, as the NSThemeFrame will draw
this background on our behalf.

Fixes: QTBUG-77637
Change-Id: I012d845fa957c40aa713adaecbb1601a848e3534
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-22 02:15:35 +02:00
Qt Forward Merge Bot
4fc3fa4c8b Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-22 01:00:48 +02:00
Qt Forward Merge Bot
0c9f8ff2a8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia4bcd81eff948e56a5eda9519cdbee59b7da54d9
2019-08-22 01:00:35 +02:00
Lorn Potter
987cca7bca wasm: allow setting total memory for non thread builds
Using WASM_OBJECT_FILES does not allow memory growth, so we need to just
explicitly check for QMAKE_WASM_TOTAL_MEMORY

Change-Id: I447113972dfc3df4ee4073e8cc25481646d1507b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-08-22 04:41:04 +10:00
Volker Hilsheimer
c4aa90cb56 Point out that dynamically modified meta objects are not threadsafe
Given that this is an exception, it doesn't invalidate the general
thread-safety of static meta objects, and putting a locking mechanism
into Qt for this would be complete over- (and performance-)kill.

Task-number: QTBUG-70915
Change-Id: I4a538b977f5c2e8173cb236023e5d9ca34add5b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-21 11:27:10 +02:00
Paul Olav Tvete
d5c684c3c3 Merge "Merge remote-tracking branch 'qt/5.12' into 5.13" 2019-08-20 16:40:40 +00:00
Tor Arne Vestbø
626340d458 iOS: Fix NSUInteger vs NSInteger comparison warning
Change-Id: I700132084c208f4ce63e0fc0516ebc3df7881ab0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-20 16:29:57 +02:00
Paul Olav Tvete
2f52e1da0d Merge remote-tracking branch 'qt/5.12' into 5.13
Conflicts:
	src/gui/configure.json
	src/gui/util/qtexturefilereader.cpp
	src/gui/util/util.pri
	tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp

Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
2019-08-20 10:41:56 +00:00
Allan Sandfeld Jensen
7595a02b57 Fix building with -no-feature-codecs
Change-Id: Ifce31a5ef07101f5ef8aabbc81b42eee47153961
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-20 11:54:49 +02:00
Tor Arne Vestbø
fe2aaf1b90 qmake: Quote path to project file in Xcode project Makefile rule
Change-Id: I40aba757486548ef9f319d3176e89eb7129a007e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-20 11:31:37 +02:00
Thiago Macieira
a847f5cd85 Fix qErrnoWarning() printing no error in some conditions
Because it allocates memory, it may call system functions that set errno
or Win32's GetLastError().

[ChangeLog][QtCore] Fixed a bug that made qErrnoWarning() say there was
no error when generating the error message.

Fixes: QTBUG-77322
Change-Id: Ife213d861bb14c1787e1fffd15b811a4f83cf3e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-19 12:12:22 -07:00
Allan Sandfeld Jensen
1f3ade1d9b Fix disabling bearermanagement
The source code is still only using the old negative define check.

Change-Id: I7e2775d6d4664cb5b802b0a40fb3f1711c8f6915
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-19 20:13:14 +02:00
Timur Pocheptsov
fc04905281 macOS: Bail out early in case a popup is closed by a mouseDown
It can happen that AppKit calls -mouseDown: on a popup's view, but
we consider the click to be outside of popup's area (happens on the
1-pixel edge of a 'geometry', QRect::contains() returns false).
If we send close event to essentially 'self', m_platformWindow
is becoming nullptr. So we bail out early, no further processing
is needed.

Fixes: QTBUG-77348
Change-Id: I224943e6bcf4ae052412ef7dc7b23a94f999aa19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-19 15:07:47 +00:00
Allan Sandfeld Jensen
fa7d7ae658 Fix -no-feature-mimetype build
Change-Id: I282f630d6e8a0b2b10fd1286d7a185a068abc9f1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-19 15:59:40 +02:00
Eirik Aavitsland
70e7445dbe Simplify QBezier::addPolygon() implementation
Makes the code a little cleaner, avoiding an issue caused
by UB and/or optimization bug in msvc2019.

Fixes: QTBUG-77119
Fixes: QTBUG-77230
Change-Id: I9bc8f427a90e6fe32b3c26301bbb703a3c4ad846
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-08-19 07:19:28 +00:00
Alexandru Croitor
5d7e9c9667 CMake: Fix prl and library names on macOS for debug configurations
The paths to the libraries and prl files should have the "_debug"
suffix for the debug configuration. This prefix is added to the TARGET
when by qt_module.prf when doing a debug build, but not during a
debug_and_release build.
Make sure to strip the _debug suffix if it's there, and re-add it later
always, to be consistent in both debug_and_release builds and in
debug builds.

Amends a12b6e7bf6.

Task-number: QTBUG-38913
Task-number: QTBUG-75520
Task-number: QTBUG-77092
Change-Id: I29e88f2b991e2be06b23652d64edc768fa35a5ae
(cherry picked from qt/78d67d17a6c108a419816b8bd47f78864ddbb07f)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-18 21:06:11 +02:00
Laszlo Agocs
257bd49c1f Guard with a mutex in QOpenGLProgramBinaryCache where needed
While there is likely no example of it in Qt itself, applications can
use QOpenGLShaderProgram instances on different threads. These instances
have nothing to do with each other but they do share a global cache object.
This becomes problematic without proper synchronization.

Change-Id: I80faf73f34af7e67349eee916bb3f216e22c07fd
Fixes: QTBUG-77469
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-08-17 16:26:44 +02:00
Mårten Nordheim
6d3a454693 DBus: fix deadlock when destroying QDBusServer
Observed infrequently in the QDBus tests, it would deadlock when
destroying QDBusServer at the same time as qDBusNewConnection was being
executed as they were locking the same locks, but in opposite order.

QDBusServer locks d->lock, then QDBusConnectionManager::instance()->mutex.
While qDBusNewConnection locks QDBusConnectionManager::instance()->mutex,
then serverConnection->lock (and serverConnection here
is QDBusServer's d-pointer).

QOrderedMutexLocker cannot be used in this situation because it
operates on QMutex*, which d->lock (QReadWriteLock) is not.

Change the code to lock QDBusConnectionManager's mutex before d->lock
and then unlock the QMutexLocker where it would previously destruct.
If QDBusConnectionManager has already been destroyed then we pass a
nullptr to the QMutexLocker which is fine and will not do anything.

Fixes: QTBUG-74635
Change-Id: I7f02d7759da67377996ef042c81b0969ccb8aadb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-16 20:47:33 +00:00
Mårten Nordheim
c7b1cbdea9 Schannel: ALPN: Don't include empty, too long or truncated names
As is said in RFC7301 in section 3.1 [1]:

Protocols are named by IANA-registered, opaque, non-empty byte strings
[...]. Empty strings MUST NOT be included and byte strings MUST NOT be
truncated.

[1]: https://tools.ietf.org/html/rfc7301#section-3.1

Change-Id: I38168ac570a433807e16121d5dec46d4ac73c4bf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-16 22:47:06 +02:00
Joerg Bornemann
0d81667f87 Describe the -egl option in configure's help output
Change-Id: Ibb47cfc2dd0b85c33a062d03aa4d43374f71ebb1
Fixes: QTBUG-54811
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-08-16 20:20:56 +02:00
André Klitzing
88d1909871 Fix macOS build with -no-feature-accessibility
Change-Id: Id16b102feb7b57efcf1a36385a009774cb023f41
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-16 16:37:39 +00:00
Mårten Nordheim
ec940f898b SSL: ALPN: Don't include empty, too long or truncated names
As is said in RFC7301 in section 3.1 [1]:

Protocols are named by IANA-registered, opaque, non-empty byte strings
[...]. Empty strings MUST NOT be included and byte strings MUST NOT be
truncated.

[1]: https://tools.ietf.org/html/rfc7301#section-3.1

Change-Id: I2c41fa99984a53cc58803e5a264d06edac964cc6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-16 15:49:43 +00:00
James McDonnell
12d37e70a7 Make the inputRejected test compatible with -no-feature-clipboard
Qt for QNX is, by default, built without the clipboard feature.

Change-Id: Ie8a36ceb0c0f0a695ae7d0fcf6f0bd70d2a43e0c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
2019-08-15 15:00:25 -04:00
Edward Welbourne
5dc318d5e8 Fix typo in description of feature datestring
Change-Id: I858512af94b5160a0008789ca972cd57307cc9e2
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-08-15 10:12:54 +02:00
Laszlo Agocs
80e7120feb eglfs/kms: Re-enable drm/gbm format overrides in the config file
Follow up to 091a386eaf

Defaulting to querying from the egl config is fine, but dropping support
for the "format" key in the output list in the json config file is not
ideal.

Task-number: QTBUG-76748
Change-Id: I25dc99369d118c300cdef25b464426f6be85453b
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-08-15 10:12:22 +02:00
Eirik Aavitsland
a547404c12 QTextureFileReader: backport ASTC support
Add support for astc format files as an experimental feature.
To enable, configure with "-feature-texture_format_astc_experimental"

(Backported from commit 5a4db421bd94acd12a4ac1f77031996b95f85dbf)

Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-15 09:26:11 +02:00
Joerg Bornemann
31e0d171d6 Fix qinstall on Windows for directories containing read-only files
Initial patch by: Vlad Lipskiy <eswcvlad@yahoo.com>

Fixes: QTBUG-77299
Change-Id: I803b809d1f23d844252b701cb070f6e4ba34eca1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-15 09:24:14 +02:00
Qt Forward Merge Bot
66a1975200 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-15 01:00:43 +02:00
Qt Forward Merge Bot
c5c9380555 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
2019-08-15 01:00:30 +02:00
Thiago Macieira
0d024bd0a6 QSysInfo: Use the Apple IOKit API to get the machine's UUID
Turns out that kern.uuid is not as unique as we thought. Googling for
mine finds other instances of the same being used.

Fixes: QTBUG-75371
Change-Id: I95ecabe2f50e450c991afffd159850cc975ec0da
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-14 09:29:27 -07:00
Friedemann Kleint
052ea993ad Add the detection of MSVC 2019 for QLibraryInfo
Change-Id: Ie3ea1cdae60bf0d7dd89a0ab84146c8370559a29
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-14 17:06:38 +02:00
Joerg Bornemann
08192d6097 Add tst_qmake::qinstall
...with a failing test case for QTBUG-77299.

Task-number: QTBUG-77299
Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-14 16:36:48 +02:00
Laszlo Agocs
1be4f6c32c Avoid querying unknown RESET_NOTIFICATION_STRATEGY value on GL < 4.0
Fixes: QTBUG-55759
Change-Id: Ie2758859a6862a214691a5011761bf549a31a93e
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-08-14 15:40:27 +02:00
Laszlo Agocs
3d56572fe7 Include buildAbi() in the shader cache directory name
Task-number: QTBUG-64697
Change-Id: I8b81bce94c50464105a9a43086b06b841e4b8551
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-14 15:03:14 +02:00
Laszlo Agocs
4bab72368f glx: Do not flood with warnings when reducing during config lookup
With things like sample count reducing a format (16 -> 8 -> 4 -> ...)
and trying again is perfectly fine. There is no need to show warnings
in this case. Even some of our own examples in qtdeclarative do a
setSamples(16) which is rarely supported. These all show warnings since
8ec98fc2dc. Avoid this.

Change-Id: Ice83d5720b02e92f77cfd63918c98ad222513b6a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-08-14 14:45:00 +02:00
Allan Sandfeld Jensen
8bd48a1c33 Fix crash in optimized solid fills on RGBA64PM
Was expecting destStore64 to be non-null.

Change-Id: I4fc827256630a35e0669d405c04f9b5b7e71580e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-08-14 10:57:13 +02:00
Eirik Aavitsland
5322998a0b Limit curve stroking threshold to reasonable range
Avoid unreasonable threshold values for extremely wide pens, since
that can lead to a very high processing cost.

The rare usecases where this would make a noticeable difference will
necessarily also be using scaling, and so is anyway depending on
setting a suitable curve threshold manually.

Fixes: QTBUG-77241
Change-Id: I27cea7d566d144389bb430739fde4f6033c4a28c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-14 10:23:32 +02:00
Milla Pohjanheimo
b5677bc6da Add binary compatibility files for Qt5.13.0 for QtBase
Binary compatibility files added.

Change-Id: If013647f17ade6a51e9f8678252b373d8f51d010
Reviewed-by: David Faure <david.faure@kdab.com>
2019-08-14 10:29:38 +03:00
Lorn Potter
7a67a78d05 wasm: remove clamp mode for WASM_OBJECT_FILES builds
Change-Id: I2ddda7423c6546ab287111485da9c145ce7d31ea
Fixes: QTBUG-76771
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-08-14 14:38:26 +10:00
Timur Pocheptsov
63abcfcade Make our connection-level window half of a possible maximum
Some servers seem to be unable to properly calculate our window size
from a delta we send via WINDOW_UPDATE frame immediately after our
client preface and the SETTINGS frame. The remote replies with a
GOAWAY frame blaming flow control error. Guessing what's this
magic number they use seems to be not feasible, we now use a
half of what we had before.

Fixes: QTBUG-77308
Change-Id: I41dacfd25a395a27003f330d01b6d8d60b8f407c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-14 00:01:22 +02:00
Christian Ehrlicher
de26ea6a7f QTree/TableView: allow to reset the sort order to natural sorting
QTreeView allowed to set the sort column to -1 which shows the data in
it's natural order (when the model supports it). This functionality was
removed during the porting away from the deprecated sortByColumn(int)
functionality done in d0f909f8db
Readd the functionality and also allow it for QTableView.

Fixes: QTBUG-77419
Change-Id: I96b0c09ab9da36ca0a9de58fe0f37e2c56b1d51b
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: David Faure <david.faure@kdab.com>
2019-08-13 18:22:14 +02:00
Albert Astals Cid
fdffa035ba Unix: Disable complex page ranges widget when printing to pdf
It doesn't work since it relies on cups to do the heavy lifting and cups
is not used when printing to PDF

Task-number: QTBUG-77351
Change-Id: I1bdda58b50112b9bb3d7991f3cfd860d6b4f4fc4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-13 15:34:37 +02:00
Edward Welbourne
0b984e141b Bound the scope of QTRY_LOOP_IMPL()'s local variable
QTRY_IMPL() exercises QTRY_LOOP_IMPL() twice, once directly, the
second time via QTRY_TIMEOUT_DEBUG_IMPL(); and QTRY_LOOP_IMPL()
deliberately doesn't bound its scope (e.g. with the canonical
do{...}while(0) trick) so that the latter can access its local
variable. Unfortunately, this means the local's declaration in the
second use of QTRY_LOOP_IMPL() shadows the first. So enclose the first
in braces to bound the scope.

Fixes: QTBUG-77297
Change-Id: I849bfe0b8abfb517ed3e783abf86c602163db137
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-13 11:51:10 +02:00
Volker Krause
3d29f2198f Add Q_ENUM for QCompleter enums
This is necessary in order to use the properties of QCompleter that use
these enums.

Change-Id: I9f7edfc1137f200810b6bc98d27709695f37de5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-13 08:44:40 +02:00