Commit Graph

46447 Commits

Author SHA1 Message Date
Joerg Bornemann
f6a07dfcb7 CMake: Write QT_CPU_FEATURES to qmodule.pri
To achieve this, we save the result of the subarch test in the cache
variable TEST_subarch_result and use this value as the right hand side
of the QT_CPU_FEATURES.xxx assignment. The Qt6HostInfo package now
sets the variable QT6_HOST_INFO_SUBARCHS which will be used for the
host_build scope in qmodule.pri when cross-building.

Change-Id: I2c25f205bfc0692aef0d6f43ff4e542d27e1b948
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-02 15:35:17 +02:00
Volker Hilsheimer
e278d72192 Add keyboardModifiers member to QStyleOptionSlider, and use it for mac
Gets rid of a call to QApplication::keyboardModifiers in a method that
is anyway only called from an input event handler, where we have that
information already.

Task-number: QTBUG-73829
Change-Id: I81753d6bf725e9db4918d831fac5b03a0b1940b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-02 11:42:12 +02:00
Volker Hilsheimer
dbe179e959 Doc: make paragraph about access of QStyleOption members consistent
Slight language simplification, and consistent usage of paragraph for
all QStyleOption subclasses.

Change-Id: I06a0480fc963d4457d5397b11df3acf62bc6912a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-07-02 11:42:11 +02:00
Lars Knoll
800c49097d Remove method declaration that's not used or implemented
Change-Id: If8c03c08b7bfc162908510cac278ce9267b61cdf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-02 11:42:11 +02:00
Lars Knoll
1480aa895b Move the reallocate() method from QArrayDataPointer to the Ops class
And only implement it for QPodArrayOps, as that's the only case where
we should be using it.

Change-Id: If48f3e4b142c322d3451309d6d1cf68aee569ea2
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-02 11:42:11 +02:00
Edward Welbourne
ca8b2a3632 Remove assortee pre-Qt6 code from date/time tests
Assume QT_VERSION >= QT_VERSION_CHECK(6,0,0) throughout.

Change-Id: If70c59f9319f72549de581fc446fd60d32b02521
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-07-02 11:33:01 +02:00
Lars Knoll
6dd9c0720b Small cleanup
Change-Id: Ic8ed50a05a9723ed252f0762d86e41fe719fc3ef
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-02 11:29:11 +02:00
Alexandru Croitor
6a47b5850b Revert "Remove pthread storage for thread local data"
The change introduced crashes in some tests that only surfaced
in certain CMake configurations.

This reverts commit 76c3eee402.

Pick-to: 5.15
Task-number: QTBUG-85357
Change-Id: Ief93aa41e2d487d73b879133e7df0fd5ce0451bd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-07-02 10:57:20 +02:00
Tor Arne Vestbø
1048d83fc2 Limit OpenGL deprecation silencing on Apple platform to Qt itself
Apple deprecated the entire OpenGL API in favor of Metal, which
we are aware of, so we don't need to see the warnings when building
Qt.

Instead of applying the silencing globally for all Qt consumers,
both internal and external, we now limit the silencing to Qt itself.
That means user code that explicitly uses any of the deprecated APIs
will see the warnings. Note that this does not apply to merely using
any of the Qt OpenGL APIs. The user has to explicitly use the platform
APIs that have been deprecated.

The warnings need to be disabled on a build system level, so that
that they are passed as -D flags on the command line. If the defines
were done in Qt headers (qguiglobal.h e.g.), they would require the
user to always include this header before any of the Apple headers.

Change-Id: I3f2a2a5211332a059ad4416394251772c677fdcb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-02 10:27:58 +02:00
Tor Arne Vestbø
6ff79478a4 Introduce platform API abstraction for QOpenGLContext
The API is available by including qopenglcontext.h as usual,
but scoped in the QPlatformInterface namespace. The namespace
exposes platform specific type-safe interfaces that provide:

 a) Factory functions for adopting native contexts, e.g.

    QCocoaGLContext::fromNative(nsContext, shareContext);

 b) Access to underlying native handles, e.g.

    openGLContext->platformInterface<QCocoaGLContext>->nativeContext()

 c) Platform specific functionality, e.g.

    static QWGLContext::openGLModuleHandle()

    openGLContext->platformInterface<QEGLContext>->doSomething();

The platform interfaces live close to the classes they extend,
removing the need for complex indirection and plumbing, and
avoids kitchen-sink modules and APIs such as the extras modules,
QPlatformFunctions, or QPlatformNativeInterface.

In the case of QOpenGLContext these platform APIs are backed
by the platform plugin, so dynamic_cast is used to ensure the
platform plugin supports the requested interface, but this is
and implementation detail. The interface APIs are agnostic
to where the implementation lives, while still being available
to the user as part of the APIs they extend/augment.

The documentation will be restored when the dust settles.

Task-number: QTBUG-80233
Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-02 10:27:50 +02:00
Eskil Abrahamsen Blomfeldt
037dce81fc Support glyphs larger than 255x255 with Freetype engine
We used chars for the width and height of glyphs when caching
them in the Freetype engine. This was okay for Qt Widgets because
we would fall back to QPainterPath when the fonts were too big
anyway (though this has since become configurable).

But in Qt Quick, when NativeRendering is in use, we will always cache
glyphs, because they need to be uploaded to the GPU. Also 255 is
no longer a large font size with current screen sizes, so we need to
upgrade our maximum. The new maximum size is 65535x65535.

[ChangeLog][QtGui][Text] Fixed a bug where glyphs would be clipped
at very large sizes.

Fixes: QTBUG-85259
Pick-to: 5.15
Change-Id: I9a01a707b274e5f12e49c1b0bd58f743abae9f5e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-07-02 09:53:38 +02:00
Timur Pocheptsov
9b36f48f59 QMacStyle - draw inverted vertical slider correctly
Without double-inverting it (and having a knob and the blue filling
mirroring each other relative to the center of the slider's bar).

Pick-to: 5.15
Fixes: QTBUG-85342
Change-Id: I4f0e8dd6d76e5e078a2db5c2ca63ba6bb2a661ed
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-02 07:31:33 +00:00
Joerg Bornemann
ea8ba787ab CMake: Document the mapping of configure options to CMake arguments
Add internal documentation how to map configure options to CMake
arguments. This patch adds a markdown file with a giant table, and
cmake/README.md links to it.

Change-Id: I94a6a4ee24ed0114ccb3095d2c13cf5d84e2de72
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-02 09:00:08 +02:00
Jean-Michaël Celerier
b9588a800b rhi: add support for D24 / D24S8 formats
Change-Id: I7ba14d30fa57bcb92cd764aed6c85cde853935b4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-07-02 08:05:42 +02:00
Nico Vertriest
05b60631a2 Doc: Make dbus snippets compilable
Task-number: QTBUG-84470
Change-Id: Idfe86ae0f38e43678cc5e746e30e5eeaf8eb72dc
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2020-07-02 05:49:32 +02:00
Wang Chuan
c513b1214e QTabBar: make sure the tab is repainted after releasing mouse
The tab has to be repainted even f the mouse release event happened
outside the tab bar, otherwise it will look like the tab is still
pressed.

As a drive-by, replace the repaint() call with update(); there is
no need for synchronous painting in an event handler.

Pick-to: 5.15
Fixes: QTBUG-81637
Change-Id: Ia55182be906511ac3b462f00add8a621c6c05fc3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-02 04:17:52 +02:00
Christian Ehrlicher
843b403286 QTextOption: remove deprecated function QTextOption::tabStop()
Change-Id: I7d647088aacb83d16c3e3cc4d831162a95771083
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-01 22:19:16 +02:00
Ulf Hermann
5a5c20ad40 QFactoryLoader: Do not call unload() automatically
QPluginLoader does not call unload() on the QLibraryPrivate without an
explicit call to QPluginLoader::unload(). QFactoryLoader should behave
the same. We want to avoid unload() if possible as we generally don't
unload plugins and the resulting behavior varies between platforms. In
particular, macOS does make the address space of libraries only the
plugin links to inaccessible on close() even if RTLD_NODELETE is given.

For code that actually wants to unload(), an explicit function to do so
could be added. As QFactoryLoader is private API, there is no need to do
that until such a case is found.

Change-Id: I4e57259a9dcb4ceb60dfbfeda55abc0b995f436a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-01 19:08:24 +02:00
Joerg Bornemann
062318feb2 CMake: Fix non-prefix build detection when CMAKE_STAGING_PREFIX is set
It wasn't possible to create a cross, non-prefix build with
CMAKE_INSTALL_PREFIX set to something else but the qtbase build dir
and CMAKE_STAGING_PREFIX set to the qtbase build dir.
This would be equivalent to
    configure -prefix /usr \
              -extprefix ~/my/qtbase/build/dir

Fix this by comparing the qtbase build dir against
CMAKE_STAGING_PREFIX if it is set. We also have to adjust the
QT_BUILD_DIR variable in a similar way.

Change-Id: Iaba5cf0f6954ae4b15d8af1fc62634f5d7f68835
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-01 18:09:03 +02:00
Joerg Bornemann
389c772fd4 CMake: Fix qconfig.cpp for cross-builds
This patch modifies the two preprocessor definitions
QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and
QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH which are exclusively used
by qmake (and not QtCore's QLibraryInfo) to determine the ext prefix
and the host prefix.

In the qmake build of Qt, qmake considers the host prefix as "location
where qmake is installed". This is usually the same as the ext prefix
but can be modified by the user at configure time.

In the CMake build, we don't build tools for the host but always for
the target platform. The QT_HOST_PATH is an external prefix we never
install to. That means, the qmake we build is always installed into
the ext prefix (CMAKE_STAGING_PREFIX or CMAKE_INSTALL_PREFIX).
Therefore, we can calculate the path of <ext_prefix>/bin relative to
<ext_prefix> and use this value for both,
QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and
QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH.

The "path of <ext_prefix>/bin relative to <ext_prefix>" is equivalent to
just the "path <prefix>/bin relative to <prefix>", meaning we can
safely use <prefix>, which is just CMAKE_INSTALL_PREFIX.

Task-number: QTBUG-84886
Change-Id: Ie1d4628a7049ddfd0d0a56dfe4ee2f2bb4952277
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-01 17:47:58 +02:00
Tor Arne Vestbø
fecfa0a014 Fix define indentation in qopengl.h
Change-Id: I7894fcadf1a0abecbd8206abae1b035c823d52c4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-01 16:09:53 +02:00
Edward Welbourne
da7f4a4c76 Replace a constant with a predicate function using it
Rather than naming a "GMT" string so as to repeatedly test whether a
date-time's string representation ends in it, use a simple lambda to
do the test, so that the string is only used in one place anyway.
Makes the test code more readable.

Change-Id: I5afad9ad5d58702bea7f24e5e5688ea4d738ae0d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-07-01 16:00:34 +02:00
Tor Arne Vestbø
b2bd2708b6 macOS: Remove PPD deprecation warning
We're not going to replace these any time soon, so remove the warning.

Change-Id: If020d2d3cf752e9a11558a55df5d05e2d2b3c567
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-01 15:16:15 +02:00
Kai Koehne
63e2acec00 Documentation fixes for QStringTokenizer
Task-number: QTBUG-85343
Change-Id: Ib647d90ba3cfa1181690dc745249637031c7ad67
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-07-01 15:10:54 +02:00
Tor Arne Vestbø
9ca731ed48 In-class initialize QWindowsGLContext members
Change-Id: Icd84e96706d5779656d7311755596110494eacd8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-01 15:05:09 +02:00
Tor Arne Vestbø
a94b4f1b14 Remove explicit tracking of QOpenGLContext in QWindowsGLContext
QPlatformOpenGLContext takes care of that via QPlatformOpenGLContextPrivate,
which is set up in QOpenGLContext::create().

Change-Id: I1088c2e18efe6023c8e76f126d967a607746e980
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-01 15:05:02 +02:00
Tor Arne Vestbø
46d4c2022d Fix warnings in QtConcurrent image scaling example
Change-Id: Ib82b2abf608536ef4df6d7cfa5fb106f29f9253f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-01 14:57:43 +02:00
Alexandru Croitor
5d6705c567 CMake: Skip / ignore failing tests on CMake platforms
Skip crashing tests and ignore failing tests on CMake platforms.

Add missing QTEST_ENVIRONMENT=ci env var assignment to Coin test
instructions. This was hardcoded by the Coin code for qmake
configurations.

Task-number: QTBUG-85364
Change-Id: Id2312e504a0d36b8f8596d4cebaa49c63731406e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 14:55:29 +02:00
Alexandru Croitor
bb5757f0cd CMake: Add "cmake" keyword for test blacklisting
Certain tests fail only on CMake configurations. We need the
capability to ignore these failures, without removing the
qmake-built-Qt coverage for now.

The keyword is enabled when Qt is built with CMake. So it doesn't
matter if the final test is built with CMake or qmake.

Task-number: QTBUG-85364
Change-Id: I157fe3d9254b589ef1e84022c01f4487ff834d27
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 14:55:26 +02:00
Volker Hilsheimer
ab6861b01f Fix delivery of MouseMove events to newly opened popup windows
Amend d934fd7f54, which was too naive in
assuming that any change to the popup stack while a popup had been
pressed into should result in mouse move events to be delivered without
buttons.

Instead, add a new flag that is set explicitly when the qt_popup_down
widget is closed, and remove buttons from the move move events only when
that flag is set.

Add the sorely missing test case as well, even if we have to accept that
not all behavior can be tested reliably. Ie. on macOS, the simulated
mouse event differs from the event we do get from the QPA plugin or the
system; on Xcb, some of the behavior depends on the window manager.
This is something we could try to clean up for Qt 6.

Change-Id: Ibf0a0a6fb7d401915057365788947e5a35aa20c3
Fixes: QTBUG-84926
Task-number: QTBUG-82538
Pick-to: 5.15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-07-01 14:52:49 +02:00
Timur Pocheptsov
37d9e44cd0 QSslConfiguration::setCiphers - introduce the overload taking QString
We had such an overloaded version in QSslSocket, it was deprecated without
providing any alternative. Now this function has some use and may be
introduced in Qt6, as QSslConfiguration::setCiphers(const QString &).
Last but not the least - a useless and strange auto-test was removed
(it was creating a list of 5 QSslCiphers each with isNull() == true).
That's becasue '!MD5' or 'ALL' (for example) is not a cipher to be found
in supportedCiphers.

Change-Id: I47eb4c0faa9b52885e883751dd992cd9cb3d26fe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-07-01 11:26:15 +02:00
Joerg Bornemann
4fbb040f75 CMake: Hard-code QT_CONFIGURE_CROSSBUILD to 0
The qmake we're building is always built for the target platform.
Therefore, QT_CONFIGURE_CROSSBUILD can always be set to a falsy value.

Change-Id: I0f03c4ce0c75d3b4e97be5141adf742276131dcb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-01 11:22:46 +02:00
Alexandru Croitor
fb55e1e71e Sql: Fix heap-user-after-free for globally initialized db objects
Becaues the database objects were created as globals, there was a
possible use-after-free issue when deleting the objects on application
exit.

Move the initialization of the database objects into static variables
inside the test constructor.

As a drive-by, also add one missing test to the CMake projects.

Fixes: QTBUG-85357
Change-Id: I2c8f2c5daee96bb9d1d21dae37950a2da5ffdf27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:57 +02:00
Alexandru Croitor
a046833176 CMake: Enable bitcode when targeting UIKIT aka iOS
Building an iOS app with qmake failed because Qt itself was not built
with bitcode enabled.

Enable building with bitcode.
Make sure qrc resource files and bundled 3rd party libraries also
build with the regular Qt module flags and thus with bitcode enabled.
As a consequence gc_sections has to be disabled for UIKIT platforms.

Task-number: QTBUG-82581
Task-number: QTBUG-84781
Task-number: QTBUG-85240
Change-Id: I15fe668725a139c02f2a32a5db849b46d4ce325c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-07-01 10:03:54 +02:00
Alexandru Croitor
36b0d9b51c CMake: Use target install prefix for MODULE_BASE_OUTDIR
When building qtbase for iOS with CMake, and then trying to mix build
qtsvg with qmake, the value of MODULE_BASE_OUTDIR was wrongly set
to the host prefix because that usually coincides with the target
prefix when doing builds with just qmake.

That is not the case for CMake builds, where the host and target
prefix locations are necessarily different.

This caused syncqt to place the forwarding headers inside the host
prefix location instead of the target prefix location, and thus
compiling qtsvg files failed.

Make sure to use the target install prefix instead of the host one.

Task-number: QTBUG-82581
Task-number: QTBUG-84781
Task-number: QTBUG-85240
Change-Id: I592be0b2799c72c11497c8adc12be13106082cfc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:50 +02:00
Alexandru Croitor
e9200ce4b0 CMake: Use non-sanitized plugin type names in .pri files
This is required for qmake to correctly pick up and use plugins that
have strange characters in the types (slashes for platforms/darwin
type and dashes for wayland plugin types).

This fixes some issues with trying to build an iOS application
using qmake due to the qiosnsphotolibrarysupport plugin.

Task-number: QTBUG-85240
Task-number: QTBUG-84781
Task-number: QTBUG-82581
Change-Id: I94faf2d3dbbdeb22dbd96dfb11c7bff00645b524
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:47 +02:00
Alexandru Croitor
3ac50d2f71 CMake: Specify Prefix in target_qt.conf for non-prefix builds
The EffectivePaths section does not inherit the Prefix value from
the Paths section.

Specfiy it explicitly, otherwise the paths reported by qmake -query
for /get variants ended up containing an extra "./bin/" part, which
ended up breaking building iOS apps with qmake.

Amends d7fd684861

Task-number: QTBUG-85240
Task-number: QTBUG-84781
Task-number: QTBUG-82581
Change-Id: I288a6e76a21d779a7e03443777f8a4ce28df9974
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:43 +02:00
Alexandru Croitor
868c7016e0 CMake: Use correct framework link flags in scripts and .pri files
target_link_libraries expects a quoted string like
"-framework CoreFoundation" when linking frameworks and not 2
different arguments like "-framework" "CoreFoundation".

Fix that in the FindWrapOpenGL and FindGLESv2 find modules.

Make sure to not quote the framework link flags when generating
.pri files even if there are spaces, otherwise building apps
with qmake fails.

Amends 7fcc9cf055
Amends 2ed63e587e
Amends 55a15a1c1b
Amends 2a767ab4bb

Task-number: QTBUG-85240
Change-Id: I66ba36760ad704d65e712072a528d9e25c336dfa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:38 +02:00
Alexandru Croitor
1685b0540d CMake: Fix top-level .prl file generation
Promotes qt_find_package()'d targets and their transitive dependency
targets to global scope. This will allow .prl file generation to
access targets in a sibling repo scope.

Retrofits qt_collect_libs() to be a bit more general, so it can be
reused both for prl lib collection, and traversing of dependencies
of qt_find_package() provided targets.

Removes the bail out checks for top-level static builds.

Amends 8c8c0f65e3
Amends dde11715d3

Task-number: QTBUG-84874
Fixes: QTBUG-84917
Change-Id: Id95b4cb7a0887c52f35c40bfdb96ad4a68dd6794
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:32 +02:00
Volker Hilsheimer
980795dc55 Let QScreen::grabWindow's winId parameter default to 0 and add test
The platform plugins are implemented to grab the entire screen if
no window ID is provided. They do not grab the entire virtual
screen, just the screen the method is called on.

On macOS, the implementation ignored the window parameter, and
always grabbed the entire virtual screen. This change fixes the
cocoa implementation. The test passes in local tests (with two
displays with different dpr). Since grabbing a screen returns an
image with managed colors, we need to convert it to sRGB color
spec first, otherwise displaying a grabbed image will produce
different results. This will need to be changed once Qt supports
a fully color managed flow.

The test does not cover the case where a window spans multiple
displays, since this is generally not supported at least on macOS.
The code that exists in QCocoaScreen to handle that case is
untested, but with the exception of the optimization it is also
unchanged.

Done-with: Morten Sørvig <morten.sorvig@qt.io>
Change-Id: I8ac1233e56d559230ff9e10111abfb6227431e8c
Fixes: QTBUG-84876
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-01 07:09:24 +02:00
Shawn Rutledge
836c0b5a24 Make QDebug operator<< polymorphic for QPointingDevice
At least it will look polymorphic by doing dispatch internally.
Adding pointingDeviceType avoids the need for qobject_cast,
and will probably also be useful in other contexts.

Change-Id: I3b6d13765bdf3add9a8208de6f0e98018e40cc42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-01 06:53:14 +02:00
Friedemann Kleint
acbe4190e9 Move the EDID parser into QtGui
As a drive by, fix recursive inclusion in qxcbscreen.h.

Task-number: QTBUG-83255
Change-Id: Ia008921b559ef450c07aa17ca554c6b35e0a88bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-01 00:46:59 +02:00
Liang Qi
b92a41ea21 xcb: increase XCOORD_MAX to 32767
Align with int16_t in xcb_create_window() and xcb_get_geometry_reply_t.

Fixes: QTBUG-85275
Pick-to: 5.15
Change-Id: Ibbc0fab6b3d725a96ac4545857a4f04b026c4175
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-30 21:41:30 +02:00
Giuseppe D'Angelo
16a5206c78 QLoggingRegistry: remove an always true test
idx has already been tested for being >=0, so it's pointless
retesting it.

Change-Id: I2f5d7e1b7a70097de2601c1ed83752f6aa707cd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 18:54:57 +02:00
Giuseppe D'Angelo
b1ec50c96d QByteArray::insert: do not assert that pos must be non-negative
The insert() overloads have generally a very wide contract. The very
next line accepts negative positions, so remove the related assert.

Change-Id: I89b67615c59287825942047a28572bf896cf30e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 18:54:57 +02:00
Giuseppe D'Angelo
5fa016f284 QUrl: do not retest if a codepoint is less than 0xFFFF
It's already tested in the surrounding if.

Change-Id: I37e13406cfd4865731ce06ed097c03294a75c592
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-30 18:54:57 +02:00
Giuseppe D'Angelo
6ed9b484da QRgba: code tidies
Fix the signature of an assignment operator.

Change-Id: I125c0129bb2607e5d8beb932da843a0393f2cfeb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-06-30 18:54:57 +02:00
Tor Arne Vestbø
9db36a7143 glx: Pull out screen numnber from GLXFBConfig instead of QXcbScreen
Change-Id: I6b87bb1c3c501613bc147c5f88e0f2d2222b0a50
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-30 18:54:57 +02:00
Tor Arne Vestbø
69d581736c glx: Remove assumption about supporting multiple displays
We only support one display (X server connection), so there's no reason
to have the user pass in the display. We can always use the one we know
from the QXCbScreen (which also matches the QXcbIntegration connection).

Change-Id: Ifc43dac4c74ba16490d3dee25fc3d43ee053a7d5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-30 18:54:57 +02:00
Laszlo Agocs
bed8c5d678 Switch to qvla where it makes sense in rhi
For all of these we know in advance that the vast majority of usages
will not exceed a certain number of elements. Also, none of these are
copied or moved ever.

Change-Id: I48aedf143e221dc178d661e23454d1e4fb7a271b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-30 15:24:43 +02:00