Commit Graph

37152 Commits

Author SHA1 Message Date
Shawn Rutledge
f2862b4d5d VNC plugin: explicitly cast int to uint16_t before calling htons
Otherwise there is a -Werror=narrowing error on big-endian
architectures (where htons does nothing).

Task-number: QTBUG-68390
Change-Id: Idb204a81aaedb9f4fde1d5fae406da36c7a1953e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from b206d1c808)
2018-08-14 14:59:58 +00:00
Erik Verbruggen
30e26d258b macOS: Handle missing key in QKeySequencePrivate::decodeString()
On macOS we pull out all the modifiers up front, which in the case
of incomplete key sequences such as "Meta+Shift+" will result in
an empty string as a result. The cross-platform code does not
handle that case, so we need to exit early.

This fixes an assert in tst_QKeySequence::parseString().

An assert has been added to QKeySequencePrivate::decodeString()
to make the assumption about the 'accel' argument explicit.

Change-Id: I135e62f9051a8b899202e5fb224b5d3c77bf2062
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-14 13:35:16 +00:00
Alexander Volkov
43f5377fad Make QMessageBox window with the detailed text closable
QMessageBox window ignores QCloseEvent if it was created
with Ok button and the detailed text was set. But it can
be closed if it contains only one button.

Make it closable if there are two buttons and one of them
is the "Show Details..." button.

[ChangeLog][QtWidgets][QMessageBox] A message box with two
buttons, one of which is the "Show Details..." button,
can be closed by clicking the X button on the window's
title bar.

Task-number: QTBUG-69526
Change-Id: Iba09e38561eb3898dc2aecfd38d8519d512a71c1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-14 04:39:05 +00:00
Johan Klokkhammer Helsing
edbac71691 Skip all qfocusevent test on platforms that don't support window activation
Task-number: QTBUG-66846
Change-Id: Ia8b69ede9154822f78ca28e0a2470b8bfb2abef0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-14 04:38:35 +00:00
Gatis Paeglis
833b9997fd xcb: make sure we have a valid m_qimage in backing store
This patch amends a62f1d0356.

If the initial backing store resize request is called with QSize(0, 0),
we end up with QXcbBackingStoreImage holding a default contructed QImage / m_qimage.
This happens because of the logic in QXcbBackingStoreImage::create(), where
if we detect that the requested segmentSize == 0, we do not allocate
any memory, and thus don't create a valid image in m_qimage. On subsequent
call to QXcbBackingStore::resize() we would only check if QXcbBackingStoreImage
object has been created, but not if it is in a valid state. This obviously
would cause problems.

This patch re-factors the logic to handle better resize to QSize(0, 0). And
make the code cleaner by:

- merging ::create and ::resize as semantically it is always resize().
- dropping unnecessary argument passing.

Task-number: QTBUG-69581
Change-Id: Ied337beb449dea8259fcf6b7d29f0a5bd553019d
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-13 22:14:26 +00:00
Edward Welbourne
44b6757fe5 Add support for numbered territories in CLDR
The CLDR data contains eight locales with numeric territory codes, 001
for World, 150 for Europe and 419 for Latin America.  The last was
already known in our enumdata.py, but as "Latin America and The
Caribbean", which is not supported by the CLDR, so I've amended it
while adding the other two.  This gives us support for Esperanto and
Yiddish (among others).

[ChangeLog][QtCore][QLocale] Added support for World and Europe as
(numeric) "country" codes ("territory" in CLDR terms), thereby
enabling support for Yiddish and Esperanto, among other locales using
such codes.

Task-number: QTBUG-57802
Change-Id: Ibb1180fb720743a3a0589527649d10f3c9cd123d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 16:17:53 +00:00
Edward Welbourne
fd38c97a6c Fix time-zone tests on macOS >= 10.13, which now knows what CET is
These tests kludge round Apple's use of GMT+1 and GMT+2 as names for
CET and CEST on Darwin; but 10.13 actually gets the names right, so
side-step out of the kludge when on this version or later.

Change-Id: Icb8a2f3ac30f0f621a19042dc03e0d281782dd41
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-08-13 16:17:09 +00:00
Allan Sandfeld Jensen
6256729a6d Fix possible heap corruption in QXmlStream
The value of 'tos' at the check might already be on the last element,
so triggering stack expansion on the second last element is too late.

Change-Id: Ib3ab2662d4d27a71effe9e988b9e172923af2908
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 15:10:11 +00:00
Edward Welbourne
b7613fb10f Ignore a smaller type in the posix form of QCollator
It ignores its CollatorType, so we can use bool for it and save a few
bytes in QCollatorPrivate. The member using CollatorType follows three
existing bool members: a boolean will fit there, while an int requires
1-byte padding and its 4-byte payload.

Pointed out by Thiago Macieira.

Change-Id: I10c8ea6f1b735b1b872c509f18fd6a93e24c9b86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 14:15:59 +00:00
Edward Welbourne
6694065148 Use suitable abstraction for the null value of CollatorType
QCollatorPrivate defines a back-end-specific CollatorType and sets a
member of this type to 0; but ICU's version really wants a nullptr not
0.  So provide a named constant of the type, that's the NoCollator
value for use there.

Change-Id: Iad4d2f803ff4807ea568755efe00b9a92f1a8eeb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 14:15:51 +00:00
Edward Welbourne
d283d81c1c Supply locale to QCollatorPrivate via its constructor
Both places that new'd it were then setting its locale themselves;
they might as well do it tidily by passing it to the constructor.
There's also no need to cleanup() in the constructor; every back-end
is a no-op when collator has its initial value.

Tidied up the class declaration in the process:
 * moved {con,de}structor to be first methods
 * comment on the two methods back-ends provide

Change-Id: I041669637935e68141e002156552af8b475ba36e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 14:15:44 +00:00
Edward Welbourne
c39d2ab482 QCollatorPrivate: initialize in declarations rather than constructor
Change-Id: If5f240418e6a538ef44af973929b5c84e63b70d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 14:15:37 +00:00
Edward Welbourne
a7f2c32657 Don't duplicate things the constructor has done
QCollator::detach() created a new QCollatorPrivate, then set some of
its fields to the values its constructor sets them to.  Don't waste
time doing that.

Change-Id: I048a1553753ae2cf03d3f61d45490f2723ee658b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 14:15:29 +00:00
Edward Welbourne
baf0933415 Set dirty in QCollator::detach() rather than calling init()
Each of its callers set dirty after calling detach() in any case, so
the call to init() was going to be duplicated (if the instance ever
got used again for something that benefits from it), and the d-ptr is
freshly created in any case, so can't be carrying any stray gunk from
earlier use, that init() might purge.

Change-Id: Id2485889c8ae4ee531c88562ff63f1a8ac0f4a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 14:15:22 +00:00
Sune Vuorela
6854fa75f7 Glib dispatcher: use default priority for timers
For some reason, the GLib event dispatcher was lowering the priority for
timers compared to other events like for example socket events.

the IDLE priority is for "Do this later when you are not busy", and that
is wrong for generic timer events.

See also https://bugs.kde.org/show_bug.cgi?id=230184

Task-number: QTBUG-48344
Change-Id: Id337a8f0c7fad3ebd5e5fa49d7831a0001ea9010
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-08-13 13:51:15 +00:00
Allan Sandfeld Jensen
10a88b8149 Add debug output for single enum flags
They have a separate type that we can't recognize directly, but we
can check if we can recognize the QFlags<T> form, though we have to
add a lot of template-conditions to avoid triggering QFlags static
asserts.

Change-Id: I00853682c5376dd3cc411ff151f47bce2389e277
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-11 20:09:55 +00:00
Allan Sandfeld Jensen
9c9f98f2ff Implement support for 16bpc image formats
Adds support for 16bit per color image formats in QImage. This makes it
possible to read and write 16bpc PNGs, and take full advantage of the
16bpc paint engine.

[ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with
16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL
formats.

Task-number: QTBUG-45858
Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-08-11 14:12:48 +00:00
Allan Sandfeld Jensen
1c623bc6d1 Fix QMetaObject naming of class enum flag
Adds an enumName to QMetaEnum to carry the name of the enum since for
flags that doesn't match the name of the Qt type, but is needed if the
flag is scoped.

Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-11 07:59:15 +00:00
Timur Pocheptsov
8f58e1319c tst_qdtls: add 'invalidConfiguration' test
Test that we don't silently replace an invalid TLS configuration with
the default one (for now, the only thing that is considered to be
non-valid - is having non-DTLS protocol set).

Change-Id: I6f714b009cf1345a085a3f26d638fc31330f1a94
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-10 12:18:41 +00:00
Joni Jantti
468c3717eb Blacklist tst_Gestures::explicitGraphicsObjectTarget
This autotest fails on Ubuntu 18.04.

Task-number: QTBUG-69892
Change-Id: I3673d06f06fcd8db307fc53c27724b227978f20d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-08-10 12:18:34 +00:00
Takao Fujiwara
e9a8facc96 IBus: connect to ibus-daemon when it restarts in Flatpak
IBus clients cannot access the IBus socket path in Flatpak and
need to watch the D-Bus disconnection.

Change-Id: Ida1a5ce4fe112c1c4f8855ec886e74f2cbdcc8a0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-10 10:56:03 +00:00
Timur Pocheptsov
ab731692e2 QDtls: delay protocol version verification
A weird behavior of the DTLS server example, when linked with 1.0.2,
exposed that client code, requesting an invalid protocol (for example, SSLv3)
can end-up with connection encrypted with DTLS 1.2 (which is not that bad,
but totally surprising). When we check the protocol version early in
setDtlsConfiguration() and find a wrong version, we leave our previous
configuration intact and we will use it later during the handshake.
This is wrong. So now we let our user set whatever wrong configuration they
have and later fail in TLS initialization, saying -
'Unsupported protocol, DTLS was expected'.

Auto-test was reduced - the follow-up patch will introduce a new
'invalidConfiguration' auto-test.

Change-Id: I9be054c6112eea11b7801a1595aaf1d34329e1d2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-10 03:55:28 +00:00
Timur Pocheptsov
26a6afd472 DTLS server - use the proper TLS configuration
The one we had before was invalid and we ended up with
defaultDtlsConfiguration which has peerVerifyMode == AutoVerify.

Change-Id: I5b9ceb027e90189325c1d8fd0db37d1b212ebbc8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-08-10 03:46:45 +00:00
Tor Arne Vestbø
6b8e03456b tst_qmenu: Fix funky use of QTRY_VERIFY with qWaitFor
The QTRY_VERIFY was needed because the window doesn't initially have a handle,
and QTest::qWaitForWindowActive(QWidget *) only checks the active state of the
widget if it does, returning false if not.

This broken logic should be fixed, but for now let's make it clear what's
actually going on by using an explicit wait for the window handle.

Change-Id: I6dd89e0894efed14f4b9a2562dfe8ca76b5ef89c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-09 22:36:11 +00:00
Oswald Buddenhagen
9742ee681b configure: fix passing of -L and -F to configure tests
the global flags are deprecated in favor of per-library paths, but they
obviously should still work. but apparently no-one cares, because there
isn't even a bug report about it ...

amends 90eee08b3.

Change-Id: I85aee41ca11de1715d1c750ae8e663093e012fb7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-08-09 17:11:17 +00:00
Eskil Abrahamsen Blomfeldt
65a1d41a09 Fix potential crash when showing line/paragraph separators
When showing line and paragraph separators at an offset from the start
of the string, the end of string pointer would be incorrectly set, and
we would read past the end of the string. If any part of this memory
happened to match the line or paragraph separator, then we would
overwrite it and have a crash.

I couldn't find any reliable way to test this, since the crash depends on
the contents of the memory after the string allocated by the algorithm.
But with an overflow of 100 000 characters, I found that it crashed every
time I ran the test.

[ChangeLog][QtGui][Text] Fixed potential crash when using
QTextOption::ShowLineAndParagraphSeparators.

Task-number: QTBUG-69661
Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea
Reviewed-by: JiDe Zhang <zccrs@live.com>
Reviewed-by: Michal Lazo <xlazom00@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-08-09 12:46:22 +00:00
Gabriel de Dietrich
da62e76eac Cocoa: Update palette after accent color or appearance changes
This updates the UI after the accent color or NSApp's effective
appearance have changed. For the accent color, we listen to
NSSystemColorsDidChangeNotification. For the effective appearance
changes, we do KVO on NSApp.effectiveAppearance.

Both changes will trigger rebuilding the system palettes followed
by a ThemeChangeEvent in the window system interface layer.

Task-number: QTBUG-68891
Change-Id: Iab1ec874e05f1f6d54cd60217c273e0f8ffbf49e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-09 10:27:24 +00:00
Gabriel de Dietrich
04671a80db macOS: Force light theme on macOS 10.14+
Until we can properly fix QPalette and QMacStyle,
we should disable dark appearance in Qt applications.

Disable by setting NSApp.appearance to Aqua, unless
dark mode support has been requested via Info.plist
or environment variable.

Read the NSRequiresAquaSystemAppearance Info.plist
key, don’t set NSApp.appearance if its value is false.

Also check the QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE
environment variable and apply similar logic. You then
enable dark mode support by setting:

    QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE=0

which is slightly awkward, but matches Info.plist
behavior.

Task-number: QTBUG-68891
Change-Id: I86dc6cf3dee951d46c953396c57d2c31f2e4afcc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-09 08:19:01 +00:00
Morten Johan Sørvig
a09c8b0ee6 Make QEventDispatcherCoreFoundaton work on secondary threads
We were using CFRunLoopGetMain() everywhere. Get the
correct run loop using CFRunLoopGetCurrent() during
initialization, and store it.

Event dispatcher initialization must now be delayed
until after the constructor has run, since event dispatchers
may be created on the main thread and then moved to
the target thread. Initialize on first call to processEvents()
where the current thread will be the correct thread.

Use the stored m_runLoop instead of CFRunLoopGetMain().
This is required for wakeUp() and interrupt() which
may be called from another thread.

Change-Id: I6fffcfd4394899c4a12f241c42781979aaf99d5e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-09 07:24:15 +00:00
Morten Johan Sørvig
489ae6db3c QEventDispatcherCoreFoundation: add override
Add override on overridden virtual functions.

Change-Id: I9853eedf55fcda9d3d20e73382d0022d3c0b5560
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-08-09 07:23:52 +00:00
BogDan Vatra
490d461ab0 Fix apkPath for gradle 4.0+
This change keeps the compatibility with old gradle.
It is needed for projects that must use the old gradle version.

src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply c03f5673 in qttools here.

Task-number: QTBUG-69755
Change-Id: I2399d445f8208766e4185d717bb51f1317fdcc00
Reviewed-by: Volker Krause <volker.krause@kdab.com>
(cherry picked from commit e2f4193112)
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-09 07:21:19 +00:00
Joerg Bornemann
f2668c6b43 qmake vcxproj generator: Fix extra compilers for single configs
For single config mode (no debug_and_release) extra compilers wouldn't
get added to the vcxproj file.

Single config mode creates a temporary project, and that was incomplete.
Multi config mode, on the other hand, directly operates on the "real
data" and wasn't affected by this problem.

Task-number: QTBUG-69769
Change-Id: I9cd942e43d80adbeac9a3c8fbe1a5766bc9645a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-08-09 06:21:01 +00:00
Mårten Nordheim
89d4c600a5 Ssl: clang-tidy modernize-use-nullptr
And reflow the text where it exceeds the 100 column limit.

Change-Id: I0d270c6a74a4c6ecba30e4e4d38a5d8f2cf81040
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-09 05:34:51 +00:00
Timur Pocheptsov
c1117ac496 SecureTransport: clean the code a bit
As discussed/proposed previously: remove the duplicated code when converting the
native certificate representation into QSslCertificate (configuration.peerCertificate).
Also, use the correct integer type when iterating - CFIndex is actually long, not int.

Change-Id: Ia6f43172e21b5153a93f1ef2589980d68ec2b39f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-09 03:52:22 +00:00
Timur Pocheptsov
5b8d5c7493 Document DTLS examples
Task-number: QTBUG-68070
Change-Id: I2b08322049005b02f1ed680bee21992ade16813a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-09 03:52:13 +00:00
Timur Pocheptsov
4c089601d7 Document the DTLS API
Task-number: QTBUG-68070
Change-Id: Ifd08ecb7c2c1a6dc352952a10ad56259bd1ecf10
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-09 03:52:02 +00:00
Thiago Macieira
58b6b723de QSysInfo: fall back to /usr/lib/os-release if the /etc one is missing
Turns out that there are two files and while a lot of distros symlink
one to the other, some distros lack the one in /etc.

[ChangeLog][QtCore][QSysInfo] Fixed QSysInfo::productType() to properly
detect some Linux distributions that ship with a minimal /etc.

Change-Id: Ia741b559c24d46c78fb2fffd1548cab414037220
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-08 20:17:19 +00:00
Liang Qi
977c8a4d18 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-08-08 18:51:11 +00:00
Tony Sarajärvi
1a0b54b825 Extend blacklisting of tst_QSequentialAnimationGroup to macOS 10.13
Task-number: QTBUG-59806
Change-Id: Ic9df44ed4fb7aae4291447c5982f68e51de2abe0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-08 18:41:04 +00:00
Alessandro Portale
a959a0e206 qmake: Apply modernize-use-nullptr
Use nullptr instead of 0.

Change-Id: Ib3120b9c424a274a2d4dd4c42ec5d7cd5bdead65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-08 17:30:32 +00:00
Alessandro Portale
182aca8487 qmake: Apply modernize-use-override
Add overrides to functions, except for destructors.

Change-Id: I6e4640aa95a5c97d6bd6f6d8692d3290c421344e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-08 17:30:23 +00:00
Alessandro Portale
24115f5a9c qmake: Avoid comparison of values with different enumeration types
A switch statement using enumeration type midlErrorCheckOption as
condition had an enumeration value from type midlStructMemberAlignOption
as a case label. This had only coincidentally the intended effect, since
the intended value (midlErrorCheckOption::midlEnableCustom) and the
actually used one
(midlStructMemberAlignOption::midlStructMemberAlignOption) have both
the value 0.

Change-Id: I73b337f23e733a1a6fb80517e29365e01838238a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-08 17:30:12 +00:00
Mauro Persano
d25d11e6e2 Windows QPA: fix transientParentHwnd
QWindowsWindow::updateTransientParent retrieves the handle of the
topmost owner window, not that of the immediate owner window (which
corresponds to the handle of transient parent window).

Task-number: QTBUG-69620
Change-Id: I1433098e8e93832d97508ee1782f88ccc000ee3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-08 17:19:17 +00:00
Gatis Paeglis
b4977a332b tests: blacklist tst_qwidget::saveRestoreGeometry on xcb
This test was un-blacklisted in 4050ee6ac7
but apparently it is still not stable.

Task-number: QTBUG-69666
Change-Id: Iaf933ee27d54ebbfa52d0a8d7b1def0ca91808e7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-08-08 10:36:21 +00:00
Qt Forward Merge Bot
577654047a Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoascreen.mm

Change-Id: Iac965aea4867059dbf7bc401b71e8e8b5b259afb
2018-08-08 11:20:22 +02:00
Thiago Macieira
25feee4e06 Fix qmake build with glibc 2.28
We haven't yet run the configure checks to see if statx and renameat2
are present in glibc, so this fails when we redefine the structures and
functions.

linux/stat.h:56:8: error: redefinition of 'struct statx_timestamp'
bits/statx.h:25:8: note: previous definition of 'struct statx_timestamp'
qfilesystemengine_unix.cpp:110:12: error: 'int renameat2(int, const char*, int, const char*, unsigned int)' was declared 'extern' and later 'static' [-fpermissive]

Change-Id: Ia741b559c24d46c78fb2fffd1548a792d22e3368
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
2018-08-08 08:23:18 +00:00
Jesus Fernandez
458b0ba8e0 Initialize variable
dstZone.offset was being used without initialization.

Coverity-Id: 178898
Change-Id: I8eabef3b4386c3ebfea5d1caffff9add6264bfce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-08-08 07:31:18 +00:00
Robin Lee
2adc06f940 IBus: Support the portal, needed for Flatpak environment
Following commit 35ce6247 in IBus, IBus input plugin now connects to
session bus and use IBus portal to create input context when running
in Flatpak environment or IBUS_USE_PORTAL is set.

[ChangeLog][plugins][ibus] Support IBus portal. Qt programs in Flatpak
environment can now trigger IBus input method.

Change-Id: I561f5f873d709b8abeae554d804daa058f9f6e16
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
2018-08-08 06:18:13 +00:00
Joerg Bornemann
7dc930d400 qmake vcxproj generator: Fix compilation of generated C++ sources
Generated C++ source files with extensions other than .cpp would not get
compiled, because the code ignored all other C++ source extensions like
.cc and .cxx.

Fix this by respecting the value of QMAKE_EXT_CPP and QMAKE_EXT_C.

Task-number: QTBUG-69770
Change-Id: I097dfef6920e353a351c97891cdbfdc9a859815f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-08 05:12:44 +00:00
Thiago Macieira
634e5dd9f2 QStringLiteral: remove the wchar_t fallback for Windows
This isn't necessary anymore, since MSVC 2015 does have Unicode string
support and MinGW (GCC) has had it for a long time. More importantly, we
must remove this macro:

 #    define QT_UNICODE_LITERAL_II(str) L##str

As the updated MSVC preprocessor will no longer support it. See
"Behavior 2" in [1]

[1] https://blogs.msdn.microsoft.com/vcblog/2018/07/06/msvc-preprocessor-progress-towards-conformance/

Change-Id: Id59bdd8f1a804b809e22fffd15401099a67175d3
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-07 21:50:48 +00:00