Commit Graph

36779 Commits

Author SHA1 Message Date
Shawn Rutledge
5d0827cbe7 formatQEnum: deal with enum class types
The enum class doesn't get treated as an int automatically, the
way that a plain enum does; so there's a silly compile error which
this cast fixes.

Change-Id: I21b56337e4f724e4de1819e22bc93e9af23c51ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-24 16:25:13 +00:00
Joni Jantti
549abf9e6a Blacklist tst_Gestures::graphicsView on Ubuntu 18.04
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-69599
Change-Id: I575e6f52a539e03ab37ca62e580889854ddb9781
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:20 +00:00
Joni Jantti
05ddbacf6c Blacklist tst_QWidget_window::setWindowState
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-68864
Change-Id: I799defcec3a41d86a604bfcd4c2e1081ae4e0e53
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:13 +00:00
Joni Jantti
d2015b4d06 Blacklist tst_QWidget_window::tst_resize_count
This autotest fails on the new Ubuntu 18.04 platform.

Change-Id: I815e36f7a099ca4c83767c7a1adb0f87f5bff7b5
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:07 +00:00
Joni Jäntti
28cdd1b497 Revert "Blacklist tst_QWidget_window::setWindowState"
Wrong test was blacklisted for this commit.

This reverts commit 85607bd70d.

Change-Id: Ica5272799afec88c05e2cd137835bcdcb587836e
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:00 +00:00
hjk
37e91af083 QHash: Remove reference to Qt3's QDict implementation
While it is still formally correct, it does not add much
value anymore.

Change-Id: I32431e3e73f3ca662dc4beb754f53449692c56a9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-07-24 09:23:55 +00:00
Richard Weickelt
f8c15fe63c Fix wrong relative path to qdbus_symbols.cpp
Commit d743df975d broke tst_qdbusinterface
when not using dbus-linked config option.

Change-Id: Iae5725ac781151e3a3d70032d6530bf4363daafa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-24 04:24:31 +00:00
Oswald Buddenhagen
9b48b3514f qmake: add line-based mode for .depend_commands
Task-number: QTBUG-48919
Change-Id: I6988fb2f26fd62ab40eb7392ccb0e033ad291fe6
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-23 17:39:21 +00:00
Oswald Buddenhagen
9c71693de4 prune dead code
msvc2013 is not supported any more.

Change-Id: Idca32f77e1b97a219d8bb4571cfd41e7334ac84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-23 17:39:09 +00:00
Tor Arne Vestbø
f8774c69b2 QMacStyle: Normalize how we call drawNSViewInRect
Change-Id: I351635c7cc0bb8c852626dc3c0a3caf33b25a761
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-07-23 10:04:33 +00:00
Joerg Bornemann
781beb6eb9 Remove transitioning include from qdnd_p.h
Now all files that use QInternalMimeData include
qinternalmimedata_p.h, and we can remove the transitioning include
from qdnd_p.h

Change-Id: I6c86cb6a5bd73076e5dd3bafc01861b75ab83845
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-23 05:50:12 +00:00
Thiago Macieira
d6e9076891 moc: align and use newlines in the generated staticMetaObjects
Change-Id: Id59bdd8f1a804b809e22fffd154078f047078d70
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-23 03:44:44 +00:00
Christian Ehrlicher
16794e98bc QTabBar: fix mixed up left and right css pseudo classes
The pseudo classes left and right for QTabBar were mixed up. This
resulted in the fact that the east (=right) tab position was selected
with QTabBar::tab::right and the west with ::left

[ChangeLog][QTabBar][QTabBar] fixed mixed up css pseudo class for
left and right

Task-number: QTBUG-18146
Change-Id: I9f485f21c0a1c54bfac757a6f530aeeeef9b08bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-22 09:14:28 +00:00
Sérgio Martins
9229452e57 Introduce QScopeGuard
A RAII style class which calls a function at end of scope.

Example usage:
    auto cleanup = qScopeGuard([] { <my cleanup code> ; });

[ChangeLog][QtCore] Introduced QScopeGuard.

Task-number: QTBUG-62894
Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-21 17:47:35 +00:00
Giuseppe D'Angelo
89bca67499 Remove a deprecation warning coming from QRegularExpression
The flag is deprecated.

Change-Id: Ice6ffafac6a5fa79675fc7cd84a9fb746f17dfb5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-21 16:28:20 +00:00
Giuseppe D'Angelo
b42d305333 Remove a deprecation warning coming from QRegularExpression
The flag is deprecated.

Change-Id: Idfd7c31278032ee96b27f3f447a97ecfdd8051af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-21 16:28:12 +00:00
Friedemann Kleint
189e40e11e Add QTextStream operators for QStringView
Change-Id: I72d597fa21521a04b7f7c0e41bd45ee9dabb6222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-20 20:51:08 +00:00
Nils Jeisecke
0aea57dfc8 Fix QGuiApplication::queryKeyboardModifiers() on macOS
To quote the documentation:

 Queries and returns the state of the modifier keys on the keyboard.
 Unlike keyboardModifiers, this method returns the actual keys held
 on the input device at the time of calling the method.

So GetCurrentKeyModifiers seems to be the correct Carbon
function to use.

[ChangeLog][QtGui][QGuiApplication] Fix queryKeyboardModifiers() on
macOS to actually return the current modifier key state

Change-Id: I11f2ef1897a39aea13df4afbfebb8172ca803a30
Task-number: QTBUG-26413
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 13:48:38 +00:00
Andy Shaw
9c99a13d9e Windows: Cache the printer capability information the first time
As remote based printers can be slow to query, meaning that it will take
time to check all the capabilities, especially if the QPrinter is
recreated on need. Then the information should be cached and reused if
the printer is deemed to be the same.

Change-Id: If8f9626c0d44113c698b4f61bbd197157932ccbe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-20 07:49:40 +00:00
Joni Jäntti
588fcde580 Revert "Blacklist tst_QThread::create"
The "boot2qt" platform needs to be blacklisted,
not "ubuntu-18.04".

This reverts commit 0d49ac0ffc.

Change-Id: I768a66c56f5fc7e0771473152579ed1c01bbbdb9
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-07-20 07:00:29 +00:00
Tor Arne Vestbø
87d5d14d10 qmake: Write correct Xcode project directory name to xcscheme file
The Xcode project name may be affected by e.g. the -o argument to qmake,
so we can't assume it's based on the target.

Change-Id: Ibb9f4265017ffcfe26bd8734758dcb30237c704f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 06:40:12 +00:00
Tor Arne Vestbø
65463857a9 Inline deprecated QTest::qWaitForWindowShown
Change-Id: Ie8c3975643b9d7e60caf9de4dd3eaa13066a1028
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 06:40:11 +00:00
Tor Arne Vestbø
8aa14a84a9 macOS: Correctly scale CALayer contentsRect for child NSViews
When flushing parts of a QBackingStore onto child QWindows, and we're
in layer-backed mode, we need to set the contentsRect of the layer
so that the layer will only show the part of the top-level-owned
backingstore image that's relevant for the child window.

Since the contentsRect is in unit coordinate system, we need to apply
a transform, but this must be based on the top level view's size, not
the image size, as the latter will be twice as big on a retina screen,
giving the wrong unit rect.

Change-Id: I7d6f378ed46a98272efb13406a2878ec1efe734e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 06:40:07 +00:00
Tor Arne Vestbø
8316131dab macOS: Don't try to install lldb debug script unless the module provides one
Change-Id: Ib22d2fdca6a4819c1b4056e3207940ceebfbe365
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 06:40:05 +00:00
Tor Arne Vestbø
cc27a50ef8 QGLWidget: Gracefully handle failed makeCurrent during resize and paint event
The underlying QOpenGLContext may fail to be made current, e.g. if the
surface is not exposed, or the graphics hardware is not available.

Instead of trying to initialize and resize the GL viewport with a
non-current context, we return early and defer the init and resize
until later.

Change-Id: I278ca8f1ad4d3da2d5be18b44d775f8d6c8af726
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-20 06:40:04 +00:00
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