Commit Graph

36656 Commits

Author SHA1 Message Date
Timur Pocheptsov
d74ced697e Extend the feature 'dtls' to handle missing DTLS support in OpenSSL
OpenSSL has 'no-dtls' configure option (or can be too ancient to properly
support it), we shall respect such builds. This patch extends configure.json
with a 'dtls' test and adds protection against linkage/compile-time
issues in the QtNetwork's code.

Change-Id: I0c0dd94f5c226115cee4285b82c83aa546555aea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-13 04:50:38 +00:00
Timur Pocheptsov
58065cedf7 OpenSSL: remove unused symbols/declarations
These are leftovers from the prototype version of DTLS connection
and no code is using them now.

Change-Id: I3970a56303a59ce95e9c22344fac89e89f6559c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-13 03:57:38 +00:00
Andre de la Rocha
20d6dac63c Add Windows Pointer Input Messages support
Replaces the handling of tablet/touchscreen/touchpad/mouse input with a
unified implementation based on the Windows Pointer Input Messages added
to Windows 8. The legacy implementation is still used for Windows 7.

Task-number: QTBUG-60437
Change-Id: I0a0f48ee9d5365f84ba528aa04c6ab1fe4253c50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-12 09:52:07 +00:00
Andre de la Rocha
dffbf4a7f6 Fix use of QTest::mouseMove() in widgets tests
Fixing some issues that could cause intermittent or environment-dependent
failures. One kind regards the use of multiple QTest::mouseMove()
calls in sequence internally using the QCursor API, causing timing
dependent failures. Switching to the override that does not require the
QCursor API, where possible. Other test could fail depending on the size
of the screen.

Change-Id: I4a368955ddbb48f729dcdf74c20eb163329936b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-07-12 09:51:56 +00:00
Tor Arne Vestbø
d6fb64267f macOS: Correctly restart display-link when window is moved between screens
Change-Id: I4b9cdd3d259965f9094ef1bbbca3ebed8df18443
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-12 09:49:35 +00:00
Jüri Valdmann
97e88dcb92 cbordump: Fix build with linux-clang-libc++
../cbordump/main.cpp:716:15: error: use of undeclared identifier 'LC_ALL'
    setlocale(LC_ALL, "C");
              ^

Change-Id: Ibff2345ffa99894cdcd48323f8c365d01ebd6300
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-12 09:42:28 +00:00
Timur Pocheptsov
86632bd377 QSslSocketBackendPrivate - avoid recursion while handing errors
The logic seems to be simple - if client code on error signal
tries to close TLS socket and this socket has buffered data,
it calls 'flush' and 'transmit' or even 'startHandshake' as
a result, which in turn will set and emit error again. To auto-
test this, we initiate a handshake with pre-shared key hint
on a server side and both client/server sockets incorrectly
configured (missing PSK signals). We also do early write
into the client socket to make sure it has some data
buffered by the moment we call 'close'.

Task-number: QTBUG-68089
Task-number: QTBUG-56476
Change-Id: I6ba6435bd572ad85d9209c4c81774a397081b34f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-12 09:16:25 +00:00
Nathan Collins
e40f23f098 Add QStyle::SH_SpinBox_StepModifier style hint
This patch allows the developer to pick which keyboard modifier
increases the number of steps a QAbstractSpinBox takes when the user
interacts with it.

The modifier can be either Qt::ControlModifier (default),
Qt::ShiftModifier or Qt::NoModifier. Qt::NoModifier disables the step
modifier. Note that on macOS, Control corresponds to the Command key.

Holding the modifier increases the step rate when:
- scrolling;
- pressing the up/down keys;
- pressing the spin box up/down buttons.

[ChangeLog][QtWidgets][QStyle] QStyle::SH_SpinBox_StepModifier allows
the developer to pick which keyboard modifier increases the number of
steps a QAbstractSpinBox takes for the following interactions:
scrolling, up/down keyboard keys and the spin box buttons. The
Qt::ShiftModifier can now be used, or the feature can be disabled
using Qt::NoModifier. Previously, only Qt::ControlModifier could be
used as the modifier.

Change-Id: Ib5518127e86a8f67798a9a1d6e860c6e35896e6f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-12 09:07:32 +00:00
Valentin Fokin
21291d78c5 Fix build with '-no-feature-action' configuration
Task-number: QTBUG-68353
Change-Id: Ia949e4a72a363df5fba86504e5f7e3ce8a3ad347
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-12 08:57:09 +00:00
Kai Koehne
9146432dc6 Allow loading of empty translation files
Do not return false for loading an empty .qm file - that is, a valid
file without any translations. We're already shipping empty .qm
files for English translations of Qt since a while, mainly as a
stop for the QTranslator::load(const QLocale &, ...) logic.

Note that QCoreApplication::installTranslator() will still return
false for an empty translation file - which is ok, because it
arguably does not make much sense to install it.

[ChangeLog][QtCore][QTranslator] It is now possible to load qm files
without any translations. This is particularly useful for the
language the untranslated strings are written in; logic to
load translations can now handle the source language like all
other languages.

Task-number: QTBUG-31031
Change-Id: Ibcb84aa755538cb2fa21b14f8635295a58440bbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-12 08:54:33 +00:00
Alexander Volkov
4e0404a6d2 xcb: Remove unused QXcbNativeInterface::locateSystemTray()
It was forgotten to be removed in 8f9a72c39d.

Change-Id: I028bea448a2c99cdbdfa0db07de2b1fcd50c93b2
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-10 20:04:17 +00:00
Alexander Volkov
556221d97b QSystemTrayIcon/X11: Move platform-specific calls to the xcb plugin
- Detect the tray icon window in the platform plugin by the object
  name. This way we don't need
  QXcbWindowFunctions::requestSystemTrayWindowDockIdentifier().

- Get rid of unused calls
  QXcbIntegrationFunctions::xEmbedSystemTrayVisualHasAlphaChannel()
  and QXcbWindowFunctions::setParentRelativeBackPixmap().

- Mark the tray icon window as embedded to be able to get the correct
  result from QWindow::mapToGlobal(). It allows to drop
  QXcbWindowFunctions::systemTrayWindowGlobalGeometry().

This change allows to remove the intermediate level between
the QSystemTrayIconSys widget and the xcb plugin. The code looks
clearer.

Change-Id: I7d067131287a6dec162b36f0bddc8cb518aaa38c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-10 20:04:09 +00:00
Alexander Volkov
5cf6f51b4c xcb: Fix artifacts on the tray background with lock screens
With the current method of painting the tray icon with 24 bpp
visuals we grab the window's background once on the first show
and then use it in all paint operations. This leads to a wrong
background if an application shows the system tray icon when
the lock screen is active.

We can avoid this by painting with XRender when it's available.

This change introduces QXcbSystemTrayBackingStore and moves the
selection of a suitable painting method from QSystemTrayIconSys
into it. In addition the visual for the window is selected
according to the system tray specification and the platform window
for the tray icon is created without needless OpenGL and Vulkan
support.

Task-number: QTBUG-55540
Change-Id: Ib3ca42bc02dcbdd4ccfe5d6e23f870ef22f0d25a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-10 20:03:53 +00:00
Kai Uwe Broulik
d743df975d Support interactive authorization flag in DBusMessage
This flag was introduced to serve as a replacement for a dedicated "interactive" boolean
argument in method calls guarded by Polkit.

Change-Id: Ida91c9872e70f8ca6672563d0ca6642f38c498ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-10 19:46:40 +00:00
Ryan Chu
5c5af7155a Enable mDNS service discovery in Docker-based test servers
To resolve the challenge of connecting Docker containers from the host
without extra user-efforts, Avahi is used to publish the Docker-based
test servers (Docker containers) on a local network. It is a free
Zeroconf implementation, and it provides multicast DNS (mDNS) service
discovery. By default, mDNS only resolves hostname ending with the
".local" domain. In this change, the domain name of test servers is
changed to "test-net.qt.local". As stated in the standard, the DNS query
for a local domain will be sent to the mDNS multicast address. It avoids
the need for root access to modify system files.

Task-number: QTQAINFRA-1686
Change-Id: I255fba0720ee6d0e84c9cb5ca9289d4466578922
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-07-10 15:25:14 +00:00
Oswald Buddenhagen
6d0878db1b configure: move qtConfTest_verifySpec() out of qt_configure.prf
the callback is specific to qtbase/configure.json, so it belongs into
qtbase/configure.pri.

amends d90db0f136.

Change-Id: I905f985e2d3d2e42c4587cbacdea8dc3eb09a5be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-07-10 15:19:44 +00:00
Timur Pocheptsov
ced0bd8068 DTLS client - improve the example
- Remove redundant pingTimer.start() call (timer is not a single
shot timer and already started before this point in code).
- Use connected UDP sockets to show that it can work with QDtls.
- Replace (translated) string concatenations with formatted strings
  and 'arg' where needed.

Change-Id: I8dba54f43464a718062cd897d24f89b75b99f2a4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-10 04:55:48 +00:00
Tor Arne Vestbø
d27dd47ffa iOS: Document how to handle URL requests from external applications
Change-Id: Ideeb0b06b6c7fc792e2102eb71296e99f3023842
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-09 23:09:34 +00:00
Alexander Volkov
5b8702fd55 xcb: Set WM_CLIENT_MACHINE property
It can be useful to detect that a window belongs to an
application running on a remote host. E.g. a window manager
may display the name of the remote host in the window title.
Or it can detect whether a client can be killed.

This property is set by Xlib's function XSetWMProperties(),
which is called by GTK and Qt 4, so it's also good to do
for consistency.

Change-Id: I0693156635cb2696b2fbe7006cbecb25d2680513
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-09 17:35:36 +00:00
Tor Arne Vestbø
17e29fada4 macOS: Remove dead updateRequest code based on setNeedsDisplay
We're no longer using this code path for QWindow::requestUpdate()

Change-Id: I000304a4f1a6ea2c3a4e8268ae978dedd968e07c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-09 16:46:49 +00:00
Andre Hartmann
1a5d3a7300 QLocale: Convert the ok checks to nullptr
And stick to one style in the same file.

Change-Id: I8a9a15425dadf4b480f63b68860de9276dbb787c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-09 12:17:44 +00:00
Thiago Macieira
d13d7f87ae Plugins: remove unused macro
Change-Id: I117816bf0f5e469b8d34fffd153db690b7ca8de3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-07-09 00:18:33 +00:00
Thiago Macieira
12cf0dbfe5 SIMD: Change the way we declare constants for x86
We need to use macros because MSVC is a crappy C compiler.

Change-Id: Ieb48f7c0dd0e4e0fb35efffd153b8af62d34ebdf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-09 00:18:30 +00:00
Thiago Macieira
5219c37f7c QLibrary: find AVX2 (Haswell) optimized plugins and libraries
Libraries are placed in a subdir "haswell/" of the main library dir,
whereas plugins are simply named with ".avx2" appended to the plugin
name (plugin.so.avx2). The "haswell/" library directory suffix is a
convention found in glibc since version 2.26, whereas the ".avx2" and
".avx512" suffixes are a convention found in the Clear Linux OS for
Intel Architecture.

This patch implements this for all Unix OSes, except for Darwin, where
the fat file format already has a sub-architecture for Haswell
(x86_64h).

We could also implement the "sse2/" subdir search for libraries, but I
don't think it's worth the cost in 2018.

Change-Id: Iff4151c519c144d580c4fffd1539fe5ee9a4d7b1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-09 00:18:27 +00:00
Thiago Macieira
c3a4ec5d0b SIMD: Add a haswell sub-architecture selection to our support
As the comment says, Haswell is a nice divider and is a good
optimization target.

I'm using -march=core-avx2 instead of -march=haswell because the latter
form was only added to GCC 4.9 but we still support 4.7 and that has
support for AVX2.

This commit changes the AVX2-optimized code in QtGui to Haswell-
optimized instead. That means, for example, that qdrawhelper_avx2.cpp
can now use the FMA instructions.

Change-Id: If025d476890745368955fffd153129c1716ba006
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-09 00:18:24 +00:00
Tor Arne Vestbø
746f15d0c2 macOS: Remove dead accessibility debug code in QNSView
Change-Id: I00d7f59576d8315f47ea70404460a6e2d133dd1f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-08 10:50:35 +00:00
Tor Arne Vestbø
1918674309 macOS: Organize QNSView accessibility code like the rest of the class
Drive-by style-fixes were applied as well.

Change-Id: I22c17925be41eeaac692ab776dd5b46791265cb3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-08 10:50:34 +00:00
Tor Arne Vestbø
2d01de4e87 macOS: Add missing m_ prefix to QNSView currentWheelModifiers member
Change-Id: I057db59797f1e18c3a8fc5386f7e1295fe352e02
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-08 10:50:34 +00:00
Tor Arne Vestbø
012af8abf8 macOS: Remove unused QNSView member 'currentCustomDragTypes'
Change-Id: Id2e37cc81c24edce37cac2bfa843ee669fd13d98
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-08 10:50:34 +00:00
Tor Arne Vestbø
573c81da9b macOS: Merge the two QNSView initializers
We never call [QNSView init] directly, so there's no point in splitting
up the logic.

Change-Id: Ie40705a3a78c0d732a3f3378c6e8fa76dc6c68e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-08 10:50:33 +00:00
Frederik Gladhorn
23e20e4030 Add logging for QAccessibleCache
Change-Id: I2cbaf6c6dfb80b2b5c2732f1633da411fd816710
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-07-08 06:37:56 +00:00
Frederik Gladhorn
4fa12d8553 Fix deletion of items in QAccessibleCache
Items in the cache may be part of the parent/child hierarchy. Make sure
not to have dangling pointers in the cache, but rather cleanly remove
all interfaces that get deleted since they may delete each other (TabBar
deletes its child interfaces for example.

Task-number: QTBUG-69283
Change-Id: Iad17cd1d3356804b3d8cbba8632ec22b836c3521
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-08 06:37:48 +00:00
Frederik Gladhorn
2a00a5d70b QAccessibleTabButton: fix isValid
The button interface is faking everything to represent the buttons when
it comes to accessibility, since they are not represented by a QWidget.
When the parent TabBar is in its destructor, isValid should return false
to prevent accessing it.

Task-number: QTBUG-69283
Change-Id: Ifedf3fa45f9106723afb0b04922b071a3c5467c3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-07-08 06:37:43 +00:00
Andre Hartmann
f98ee77cd3 QByteArray: toInt() and toDouble() ignore surrounding whitespaces
[ChangeLog][QtCore][QByteArray] QByteArray::toInt(),
QByteArray::toDouble() and the other number conversion functions
now ignore leading and trailing whitespaces, as their QString
counterparts already did. For consistency reasons, the same
behavior was added to qEnvironmentVariableIntValue() also.

Task-number: QTBUG-66187
Change-Id: I8b5e478ea8577b811d969286ea9e269f539c1ea4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-07 19:58:18 +00:00
Tor Arne Vestbø
85472b6b02 macOS: Deliver update request via CVDisplayLink if swapInterval > 0
We use GCD for marshaling the display link update over to the main
thread, as Qt requires that the update request is delivered there.

Change-Id: I318a5b8f27dc5094ce71244401308a4044c41b39
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-07 14:40:57 +00:00
Tor Arne Vestbø
b3dc96ef4c macOS: Move wantsBestResolutionOpenGLSurface logic to QNSView initializer
Change-Id: If9d76a8e82ce034eccc5130e036dfeae12377cac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-07 14:40:55 +00:00
Tor Arne Vestbø
3235140517 macOS: Remove explicit call to setWindowIcon in QCocoaWindow ctor
Window setup should happen in QCocoaWindow::recreateWindowIfNeeded(),
and there we already call setWindowFilePath(), which takes care of
setting the window icon.

Change-Id: Iaa2f42c694cf8d251703cc56648e5819edd79bec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-07-07 14:40:54 +00:00
Gatis Paeglis
ecb8478819 tests: port tst_QGraphicsProxyWidget to QTEST_QPA_MOUSE_HANDLING
... and various other cleanups.

This patch re-factors tests that relied on QCursor API (directly or indirectly via
QTest::mouseMove widget overload) to use the QTEST_QPA_MOUSE_HANDLING code path.
Misuse of QCursor API causes tests to be flaky.

Removed Qt::X11BypassWindowManagerHint as it is not really needed. Based on
the comment where this flag is used, it would be needed for all test functions
that use mouse events. That assumption is not valid. A window is expected to have
received its final position when QTest::qWaitForWindowActive() returns. There were
issues with this on Unity, but those have been fixed.

Un-QSKIP-ed QTBUG_6986_sendMouseEventToAlienWidget for Q_OS_WIN.
Un-QSKIP-ed hoverEnterLeaveEvent for all platforms.
Un-QSKIP-ed bypassGraphicsProxyWidget for Q_OS_MAC and Q_OS_WIN as the test
passes on those platforms. According to QTBUG-33067 it used to crash with 5.2.0.

Removed unnecessary mouseMove() and stray mouseRelease() in mouseDoubleClickEvent().
Removed unnecessary show()/setVisible() on items that are being added to the scene -
items are visible by default.

Among other randomly spotted issues, one worth mentioning is that when adding
items to the scene after the view is already shown, we need to ensure that the scene
is updated (e.g QSignalSpy + QGraphicsScene::changed) before interacting with it. As
an example, mousePressReleaseEvent() only passed because of random luck that the
invalid coordinates were still within the bounding rect of the button. This patch
does not attempt to cleanup all instances of this anti-pattern.

Task-number: QTBUG-52546
Task-number: QTBUG-26948
Task-number: QTBUG-33067
Change-Id: I2ccbc004c1cb4f5b31c70c8568ee591c458d8446
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-07-07 13:23:17 +00:00
Simon Hausmann
42cc42acae Fix QString::localeAwareCompare with composed/decomposed strings on macOS
Similar to commit cd64a96b31 we also need
to normalize the strings before comparison in order to be compliant with
the ECMAScript test suite.

This patch also adds the remaining test cases from
built-ins/String/prototype/localeCompare/15.5.4.9_CE.

Since the same tests are also failing with strcoll/qt_compare_strings,
this simplifies the code to always normalize except when using ICU
(which gets it right by default).

Change-Id: I16b32da7fc70dc7e6725c49f66fe9941d0bf3a47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-07-06 20:49:29 +00:00
Tor Arne Vestbø
13337096f9 Re-enable QGradient::Preset documentation by explicitly ignoring warnings
Change-Id: Ibde6d905c74a571dc2e9d2942e99682e0a4f9b8c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-07-06 13:59:10 +00:00
Allan Sandfeld Jensen
a149659c5c Provide access to QSslCertificate on OpenSSL free Windows builds
The QSslCertificate class can parse and provide details about SSL
certificates without a proper backend, this can for instance be used
by QtWebEngine to provide metadata about certificates, even on Windows
builds without OpenSSL, as QtWebEngine does not use Qt's SSL stack.

Change-Id: Ib48f1ed7315c5bc66721ec87ee651d8372f07f71
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-06 06:52:06 +00:00
Thiago Macieira
514972544a QCborArray & Map: implement move semantics
There isn't a lot of efficiency gain, since QCborValue was already
refcounted. This saves two atomic operations and an out-of-line call. In
the case of QCborValueRef (which includes QCborMap), because we reset
the container pointer in inline code, the call to QCborValue::dispose()
is also suppressed.

Change-Id: Icc2c231dc2c44abdb087fffd1533eaba7a9c70fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-05 14:56:15 +00:00
Albert Astals Cid
fddf09363e QFutureInterface::reportFinished use nullptr instead of 0
So that users don't get a warning if using
-Wzero-as-null-pointer-constant

Change-Id: Ia15b5f380a2f6a93e05eec06646608e480cdf5d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-05 15:22:35 +00:00
Thiago Macieira
340472534c QCborValue: refactor extended types so isTag() is true
This makes QCborValue more future compatible, as code written today for
tags that QCborValue does not recognize will continue to work if
QCborValue gains support for it in the future.

This change also obviates the need for reinterpretAsTag(), which I had
not written unit tests for as I knew this change was coming.

Change-Id: I052407b777ec43f78378fffd15302bdc34f66755
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-05 14:56:12 +00:00
Alexandru Croitor
22c1a46a03 macOS: Remove declarative override of -[NSView wantsLayer]
The -[NSView setWantsLayer:] method may have side effects that
extend beyond just setting an internal boolean property, so
we need to ensure it gets called.

This was observed on e.g. macOS 10.12.5, where the method
ends up creating the internal backing layer. On later macOS
versions the method just emits KVO notifications for wantsLayer,
but these may in turn result in similar logic being triggered.

The issue was masked somewhat by AppKit itself calling the
method from e.g. -[NSWindow setContentView:], so we still got
the backing layer created. The problem appeared when running
binaries built against an older SDK (10.6 in this case), which
triggered AppKit to not call -[NSView setWantsLayer:], due to
__NSViewLayerBackWindowFrame() in that case returning false.

This change removes the overridden -[NSView wantsLayer], and replaces
it with an explicit call to -[NSView setWantsLayer] when creating
a new QNSView, essentially revering c8c8cc790a.

Task-number: PYSIDE-724
Task-number: PYSIDE-734
Change-Id: Idaff4ed38838311b37da4925b1eec241e077dbcc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-05 14:49:44 +00:00
Ryan Chu
9e24b43cb9 Docker-based test servers for network-related Qt autotests
The existing network test server has some limitations. Most notably, it
is not accessible by every Qt developer. Also, some services don't allow
simultaneous access, which causes flaky test results.

Instead of centralizing all the services to one physical machine, the
idea is to build up several dedicated servers inside separate Docker
containers.

1. Create testserver.pri and integrate it into the make check command of
   Qt Test.

2. Define QT_TEST_SERVER flag for changing test parameters at compile
   time.

Task-number: QTQAINFRA-1686
Change-Id: I0422ddb97eb8c11b4818771454851d19671253b1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
2018-07-05 14:13:36 +00:00
Thiago Macieira
7cd7d6ab3f QCborMap: Add reserve() to the QHash conversion
Change-Id: Id4c99d74841842cfa442fffd15371720f9566708
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-05 13:44:18 +00:00
Timur Pocheptsov
5bd9f98342 QDtls - handle server-side timeouts
According to RFC 6347 a DTLS server also must retransmit buffered message(s)
if timeouts happen during the handshake phase (so it's not a client only as
I initially understood it).

Conveniently so an auto-test is already in place and needs just a tiny
adjustment - handshakeWithRetransmission covers both sides.

Change-Id: If914ec3052e28ef5bf12a40e5eede45bbc53e8e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-05 13:39:46 +00:00
Edward Welbourne
2afa6e5f94 tst_QSqlThread: match #if-ery on declaration to use
Variable was declared outside #if-ery but only used inside,
leading to warnings when the define wasn't set.

Change-Id: Iad6a236bdf76b8ca0a58a84509d19f7e1a3e2df2
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-07-05 13:39:02 +00:00
James McDonnell
b14527f529 Make QQnxIntegration a singleton
Turn all the static members and functions into regular members and
functions.

Change-Id: Ib37d9bdd1a84e512013af7d334e04cd2b1da640e
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2018-07-05 13:35:50 +00:00