Commit Graph

36754 Commits

Author SHA1 Message Date
Tor Arne Vestbø
8c91070606 macOS: Invalidate window shadow after flushing backingstore to CALayer
The macOS bug preventing us from doing this has now been fixed:

  http://openradar.appspot.com/radar?id=4976602949615616

Change-Id: I3bfa75d6bf982a051a9b274f530529f4ec4351a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-19 19:04:10 +00:00
Oswald Buddenhagen
99c3ef0789 prune cargo-culted and obsolete winsock deps from autotests
Change-Id: I9666598d34e965d7058aeb2b2e7fb3f59600675c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-19 13:31:08 +00:00
Samuel Gaist
82b4c79fb9 MySQL: handle my_bool for newer versions of MySQL
Since MySQL 8.0.1 the my_bool type has been removed because all the C
compilers supported by the project supports C99 which has bool through
<stdbool.h>. This patch makes the driver both forward and backward
compatible.

[ChangeLog][QtSQL][MySQL] Now supports MySQL versions >= 8.0.1.

Change-Id: Ib373992763643bd470d33e85ce5cec7e4ae5e895
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-19 13:00:16 +00:00
Jarek Kobus
ff18b02f21 uic: Revert the microoptimization patch introducing QStringLiteral
This reverts the following commits:
d12d2949d1
26c3bec09b
49b08f96e8

We can't easily predict all code paths for QDesigner
with such a microoptimization. We also don't want
to generate three different string constructions
depending on some sophisticated heuristics.

[ChangeLog][uic] The -no-stringliteral option is now deprecated and
UIC will not generate QStringLiteral anymore.

Task-number: QTBUG-65251
Task-number: QTBUG-51602
Change-Id: I34a5a1934a8df19c5c84ac2ba8e5168ce5665037
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-19 12:38:45 +00:00
Tor Arne Vestbø
519fcb38a2 macOS: Add categorized logging to QCocoaGLContext
Change-Id: I0fa37457f91d905ed6fb8a2aba20add311705ec7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-18 19:20:36 +00:00
Thiago Macieira
32591b660e Update the Qt version tagging to adapt to expected Qt 5.16
Change-Id: I61ecce6b1324410bbab4fffd153d5d362d4429bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-18 15:57:05 +00:00
Thiago Macieira
354842fbc1 Update TinyCBOR to 1b233087a6e6b6be297e69bfcce5ed36f338c91d
From the fork at https://github.com/thiagomacieira/tinycbor

Change-Id: I117816bf0f5e469b8d34fffd153dc88683051208
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-18 11:37:03 +00:00
Thorbjørn Lund Martsum
678b0cf6c3 Remove strange icon highlight for active menu item
Windows and macOS do not highlight the icon for an active menu item.
It requires quite a few kludges in styles and/or stylesheets
to make it behave and we simply should not highlight this icon.

[ChangeLog][QtWidgets][QMenu] Removed icon highlight when a
stylesheet was applied the application.

Task-number: QTBUG-69199
Change-Id: I35c5b255766254d11312d7f86c625b811d1dfd64
Reviewed-by: Morten Kristensen <msk@nullpointer.dk>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-07-18 10:16:48 +00:00
Oswald Buddenhagen
4f066d1071 include QTcpSocket to make the header self-contained again
amends 9e24b43cb.

Change-Id: I000261dcbfb50999c68b590afd91177362645562
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-18 09:49:48 +00:00
Edward Welbourne
a040369622 Restore qlistview testing on Linux
It might have been fixed in the three years since it was marked
insignificant, and we can't investigate the crash while it's not
tested.

Task-number: QTBUG-50747
Change-Id: I99cdeb55e207d10fe524cd5f4868f042c64eb7d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2018-07-18 09:25:30 +00:00
Mikhail Svetkin
0826aeddd2 qlibrary_unix: work around compile bug in gcc5.4
GCC5.4 generates incorrect code.

The QString object which is passed by value to f-lambda,
has been corrupted by the time this lambda returns.
Accessing this object causes memory corruption.
The same can be reproduced with std::list and std::string

Task-number: QTBUG-69394
Change-Id: I22522d2ddd1d5226de0aff378133d18391e370de
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-18 08:26:32 +00:00
Thiago Macieira
cc5d816800 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-07-17 18:20:12 +00:00
Edward Welbourne
a9dfe71cca Fix typo: s/Numering/Numbering/
Kept the intended word (rather than "number system" or "numeral
system" as might seem more natural) since CLDR's
common/supplemental/numberingSystems.xml uses numbering in its name
and in the XML tag-names in its contents.  Thanks to Kari Oikarinen
for noticing, in review.

Change-Id: I85077611f9de8c4e812e1b5324fa2e99868b7b95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-17 14:40:05 +00:00
Edward Welbourne
9d52eb9ed0 Made more tst_QLocale tests data-driven
This should improve reporting and ensure we know about each failing
case, not just the first, when one fails.

Change-Id: Ic00272201f69a2fd8508df23b1d746ea605aa539
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-07-17 14:39:55 +00:00
Edward Welbourne
3c0f33e4a0 Assume Win >= Win7 in code that used to test it
Cleaned up some related #if-ery in the process.

Change-Id: I70f3152f2096ec34f36782fa1c3329f51c9b34f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-17 14:39:44 +00:00
Timur Pocheptsov
f8a5902800 SecureTransport - enable ALPN on macOS
Initially macOS SDK 10.13 had a missing symbol (only a function declaration
in a header), while iOS, tvOS and watchOS SDKs all had the required symbol. Now
it appears more recent SDK for macOS also has the function we need and thus we enable
ALPN on macOS (as a result 'h2' protocol can now be negotiated as required by
RFC 7540).

[ChangeLog][QtNetwork][QSslSocket] Enable ALPN (and thus HTTP/2 negotiation) in SecureTransport backend (macOS).

Change-Id: I65bd8262a9571a5495d11f7f5a29d150334cd09c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-17 13:32:16 +00:00
Qt Forward Merge Bot
1783fca897 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbintegration.cpp

 Conflicts git missed:
	src/plugins/platforms/qnx/qqnxglcontext.cpp

Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
2018-07-17 10:19:22 +02:00
Frederik Gladhorn
2b33e0c272 Remove left-over comment
This is private API and the protected does hardly matter.

Change-Id: I8e5c99db16d521d47eb9a5fb57a6519301d63a9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-16 18:48:29 +00:00
Frederik Gladhorn
647eca0a26 Minor test cleanup: nullptr, unused variable
Change-Id: I8d70ee1b34f4227cc22634658437507be9d1193c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-16 18:48:22 +00:00
Frederik Gladhorn
3b1340fdc1 Fix typo as->has
Change-Id: I4f9033660c06686d7b499ec6d28be2c3b64353e2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-16 18:48:17 +00:00
Edward Welbourne
b82648bd59 Update CLDR to version 33.1 (2018/June/20)
Routine update in preparation for 5.12
* omitting Chakma because QLocale can't represent the zero digit,
* de_DE no longer uses vorm./nachm. but AM/PM

[ChangeLog][Third-party code] Updated CLDR to version 33.1

Task-number: QTBUG-67654
Change-Id: If20c47bb030abc3700b4f5a592152e617e2767c2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-16 15:47:28 +00:00
Oswald Buddenhagen
05d49415ea configure: group tests' includes properly
this puts the actually relevant includes into the correct field, which
potentially allows early header resolution, and is generally just
cleaner.

Change-Id: I9db870442d22a329441eafe53098d18cdc91ce16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:46:00 +00:00
Oswald Buddenhagen
6b4f2f7556 qmake: get rid of (some) makefile expansions in dependency paths
the variables are quoted correctly for commands, which is incompatible
with quoting for dependencies under mingw. so insert the paths as
literals, where we can control quoting.

this fixes building in directories with spaces, which i broke in
7c34e0a7b by using different quoting styles for deps and commands in the
first place.

this breaks the hypothetical use case where somebody wants to override
TARGET or DESTDIR (or DESTDIR_TARGET under windows) on the *make*
command line. not sure why anyone would do that - just do it at the
*qmake* level.

we did not get rid of OBJECTS, because that would cause significant
duplication in the makefile (not that it would matter too much, given
the dependency lists ...). this isn't a problem, because these are
short relative paths which are not expected to contain "funny"
characters.

an alternative would have been to change the variables' quoting and
eliminate them from the commands instead, but that would be
backwards-incompatible, because commands are "user-servicable".
for the same reason, we cannot get rid of the variables entirely.

Change-Id: Ic7592c7fc67d8b7d2b64de80808365cd1c3f79d0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:44 +00:00
Oswald Buddenhagen
7a33f49e15 qmake: fix lookup of .prl files for libs specified by full filename
under windows, libraries can have a numeric suffix derived from VERSION,
and (under MinGW) a unix-like "lib" prefix - neither of which .prl files
have. therefore, we had to make the back-mapping from the library to the
.prl file reverse-engineer the original TARGET's name. we verify whether
we actually got the right file by comparing the target specified inside
the .prl file with what we started from.

this fixes linking of transitive deps of static deps.

the alternative of changing the .prl naming pattern to avoid the
back-mapping was discarded, as a) it would be backwards incompatible and
b) it would break project-internal -lfoo references to versioned libs.

Change-Id: Ia9b899fe6a5700fee528bd1dacf130caf083cdd6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-16 15:44:37 +00:00
Oswald Buddenhagen
dcb3a13fa0 qmake: fix processPrlFile() being mislead by dots in pathnames
if the file name contained no dot, but the path did, we'd chop up the
path in a final (doomed) attempt at locating a .prl file.

Change-Id: Iad72428d8523f2ea7e543faa58225fba4ffa358b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:31 +00:00
Oswald Buddenhagen
93362e2607 qmake: slightly optimize processPrlFile() calls
add a parameter that indicates whether the passed filename can be only
the basename of a prl file. if so, we can skip the other attempts at
interpreting the file name. that's not only faster, but also clearer.

Change-Id: I6f6da3f4485216021282a08acaefb53e60e7242a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:27 +00:00
Oswald Buddenhagen
caaceb30e6 qmake: refactor QMakeMetaInfo::findLib() interface
move the logic for trying different extensions to
MakefileGenerator::processPrlFile(), which is the only user of that
functionality. that makes findLib() rather trivial and a bit of a
misnomer, so rename it to checkLib().

Change-Id: If9738cc17367452853ab8d3866fa36b5d4b57213
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:23 +00:00
Oswald Buddenhagen
eb9da60f0c qmake: purge infra for supporting multiple formats from QMakeMetaInfo
only .prl is actually supported (and we expect this to remain the case),
so just simplify the code.

Change-Id: Ia23f9f257bf89ca214c3deabd8a7744b155c7aa9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:18 +00:00
Oswald Buddenhagen
e2b90768ae qmake: prune dysfunct libtool reader from QMakeMetaInfo
in principle, it would be good to be able to read libtool .la files as
an alternative to our "proprietary" .prl files. however, this code was
disabled 15 years ago, three months after being written and never
released, and apparently no-one was missing it.

Change-Id: Ib8b4b4017b6a611f78af4e357ebce4006567e6ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:14 +00:00
Oswald Buddenhagen
317b5d9553 qmake: prune pkg-config reader stub from QMakeMetaInfo
this code operates way below the level integrating with a package
manager makes sense. consequently, remove the "TODO item".
support at a higher level is actually implemented anyway.

Change-Id: I8e1e43911dd40aa7585e49c1ad1e37b999779308
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-16 15:44:10 +00:00
Tor Arne Vestbø
88867e39bc testlib: Move qtestsystem helpers to their respective modules
Having the helpers in each respective module lets us implement the
helpers using private APIs without forcing the test to add private
dependencies.

It also makes it easier to test Qt using a third party testing
framework (for running the test suite), while still using the helpers
for ensuring tests behave expectedly.

Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-16 15:30:30 +00:00
Frederik Gladhorn
ff78e6fe35 Fix build without 'library'
Without QT_CONFIG(library) qdbus_resolve_conditionally would be declared
but not defined.

Change-Id: Id90f6c736080e4c1609568b3fab1f464c0e46aa3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-16 15:23:27 +00:00
Edward Welbourne
9a58ba4793 Split up many long lines in tst_QLocale
Rewrote some of them away, in the process, using string arithmetic.

Change-Id: Ie1a29abefab001889a22a8bc66c7eee608496786
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2018-07-16 15:23:11 +00:00
Edward Welbourne
cbd6a864e4 Adjust some indentation and spacing in tst_QLocale
This is preparation (the WS-only parts) for splitting up some
over-long lines, in the course of which I also fix some indentation.

Change-Id: I800490e328b5e16d40685dff04c09cd145d5eacf
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2018-07-16 15:23:04 +00:00
Edward Welbourne
042d41e23e Rework CLDR parser to filter out unsupportable number systems
In the process, also have it only scan number systems once, caching
the result, rather than scanning all of them for each locale.  This
means we only see the new warning messages once, too.

Task-number: QTBUG-69324
Change-Id: Ia0695a0ba6159b50748a61e9949ad5bd07e4c4c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-16 15:22:56 +00:00
Edward Welbourne
e000c60ab3 QDateTime: fix some misnamed variables, s/local/zone/
When I wrote zoneMSecsToEpochMSecs I seem to have copied names from
localMSecsToEpochMSecs, that need a s/local/zone/ change to their
names to make sense in this context.  Flipped an if/else for clarity
in the process.

Change-Id: If2b288532b16d999f6ff0b9241e2dbcbc016b010
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-16 15:22:45 +00:00
Jesus Fernandez
435d1d53bd Use nullptr instead of 0
Change-Id: I37e776b84193d705b48d5d75ad620fd41b271d9e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-16 13:58:23 +00:00
Eirik Aavitsland
9a3359b57b Fix: png handler returning Mono QImage with color table < 2 items
A bit depth 1 png image may contain a single color table item. The png
handler would in such cases reduce the size of the QImage color table
to 1, which could easily lead to crashes later on.

Task-number: QTBUG-69256
Change-Id: I01d78977c121bacc44b823231d8f32ca63d8a98c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-16 13:49:56 +00:00
Eirik Aavitsland
b0797cfed6 QCalendarWidget: update the year label correctly on locale change
The year label in the header would show an unlocalized year
number. Fix by setting it equal to the year editor's correctly
localized string.

Task-number: QTBUG-69038
Change-Id: I87148c607b8fb498c57bcf59bc175154c9e445d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-16 13:49:20 +00:00
Alexander Volkov
6f81dbe674 QLineEdit: Fix behavior of DeleteStartOfWord key
DeleteStartOfWord key behaves like Delete key when the cursor
is at the beginning of the line. Do nothing instead.

Task-number: QTBUG-65855
Change-Id: I56402961b44ec6fe3a382df68a76db36891c4522
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-16 10:11:49 +00:00
Frederik Gladhorn
40a98ea750 Use context when connecting to functors in docs
This is the introduction text to signals and slots and should rather
show best practices. Using context is generally advisable to have
life-time of connections under control.

Change-Id: I213b13d978a38e13834cdbccf1bea06d53ba8320
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-16 07:57:55 +00:00
Gabriel de Dietrich
582d221b29 QCocoaTheme: Fix system palettes in macOS 10.14
Some colors, like selectedMenuItemColor, won't return
the right value anymore. Other can be updated to new
system UI element colors for more accuracy.

Task-number: QTBUG-68891
Change-Id: I781ef47791648f332208eb780361c60ffb6fcb96
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-14 18:49:05 +00:00
Andre Hartmann
dc133765ec Doc: harmonize toDouble() and toFloat() for QString and QByteArray
Change-Id: Ic81461899c73c8a68bc3b8bdc1de4be4dd6bdf27
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-07-14 09:55:40 +00:00
Thiago Macieira
b773a02318 ELF parser: fix off-by-one error
I don't know why Arvid subtracted 1 when he wrote this code. But it was
wrong. Fortunately, the section size was not used afterwards, but the next
commit will.

Change-Id: I117816bf0f5e469b8d34fffd153dc8383b00b94a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-14 04:37:48 +00:00
Thiago Macieira
1f27c1161b QPluginLoader: limit the amount of memory used when scanning plugins
When using actual memory allocation, limit to 64 MB, not the full file
size. On most systems, the memory map technique will work, so this won't
even be tried. In any case, we don't need the fix for the OOM situation
that was applied in commit e211ab76d7.

As for the memory mapping technique, this commit limits the allocation
to reasonable values given the virtual memory addressing space. Half a
gigabyte is probably acceptable on 32-bit systems, where there should be
a contiguous space for the OS to allocate the file in. This commit also
fixes an overflow when converting from qint64 of the file size to ulong
(32-bit on 32-bit platforms and on Windows).

For 64-bit systems, we currently limit to 1 TB.

Change-Id: I117816bf0f5e469b8d34fffd153dc1705a8eedc4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-14 04:37:46 +00:00
Thiago Macieira
e92e46348a QCborArray: add const_iterator overloads for insert/erase/extract
They return regular iterators, since the container has been modified.

Change-Id: Id59bdd8f1a804b809e22fffd153f92d4460f9b76
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-14 04:20:47 +00:00
Thiago Macieira
f4950cb6e1 QCborMap: make take() & remove() efficient if the item isn't there
By using constFind(), we won't detach if the item isn't there. Both
extract() and erase() can take const_iterators.

Change-Id: Id59bdd8f1a804b809e22fffd153f92989ef84644
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-14 04:20:41 +00:00
Thiago Macieira
1016c0af74 CBOR: Use "noexcept" directly
All supported compilers support it.

Doing this just for the new API. We should do it throughout Qt, but only
if it won't interfere with the header review.

Change-Id: Id59bdd8f1a804b809e22fffd153f9254688e5152
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-14 04:20:38 +00:00
Thiago Macieira
503646a331 QCborValue: Silence Coverity warning about null-pointer dereference
It's a false positive, since we've checked that the item HasByteData.
But it's cheap to rewrite so the warning is silenced.

>>>     CID 190741:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "this->byteData(idx)".

Change-Id: If48c5c2e920c433298f1fffd153f7534be42a30b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-14 04:20:32 +00:00
Thiago Macieira
6fd98af332 QCborValue/QDebug: restore decimal state after hex
Found by Coverity:
>>>     CID 190746:  API usage errors  (STREAM_FORMAT_STATE)
>>>     Changing format state of stream "dbg" for category basefield without later restoring it.

Change-Id: If48c5c2e920c433298f1fffd153f74f9bbe7ef29
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-14 04:20:28 +00:00