Commit Graph

1050 Commits

Author SHA1 Message Date
Tor Arne Vestbø
7d45f2d0b9 macOS: Add debug keyboard layout for manual testing
Pick-to: 6.2
Change-Id: Ie35f7a57c6d54c1cc0a7b79d8fd25d0b056bf5e6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-08-23 17:30:18 +02:00
Morten Johan Sørvig
60ca8ca5bc wasm: add cmake build for manual tests
The tests can now be built with qt-cmake-standalone-test.

Change-Id: I098340a9f755806061de281fbc25cb00c61f33f0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-08-19 18:41:53 +02:00
Mårten Nordheim
1edb51a315 QNetworkInformation: Give the manual test a GUI
For mobile platforms. Makes it quite a bit easier to follow on the
updates when I'm not tethered to my PC with ADB.

Change-Id: Icba03470e6082b6e47e31c9ead6df074407d3172
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-07-13 16:37:19 +02:00
Liang Qi
01ff216c82 tests: update startsystemmove manual test with latest api
Change-Id: Ib9a070f7878fa67b7db1e26c8ebbbb54873cb645
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-06-16 15:53:22 +02:00
Mårten Nordheim
14b74af060 QNetworkInformation: Adjustments to captive portal API
Make it return bool since the TriState was really only used signify that
the property was unsupported but there is already a separate way to
check if it's supported. More importantly there is no different set of
actions available to a user if they're in the Unknown or False state.

Because of the change to bool, we also rename the property to have an
'is'-prefix.

Change-Id: Iaaaad5ac31e663c36e00223bf5b0e719f412fc69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-06-08 14:54:16 +02:00
Mårten Nordheim
da955aadf5 QNetworkInformation: Behind captive portal
This patch adds the API, with no supporting backends

Task-number: QTBUG-93848
Change-Id: I50454717f928819e1b990df91872675e842f9987
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-05-31 17:25:22 +02:00
Laszlo Agocs
51c22a1f51 rhi: Add support for 3D textures
Supported on OpenGL (and ES) 3.0+ and everywhere else.

Can also be a render target, targeting a single slice at a time.

Can be mipmapped, cannot be multisample.

Reading back a given slice from a 3D texture is left as a future
exercise, for now it is documented to be not supported.

Upload is going to be limited to one slice in one upload entry,
just like we specify one face or one miplevel for cubemap and
mipmapped textures.

This also involves some welcome hardening of how texture subresources
are described internally: as we no longer can count on a layer index
between 0..5 (as is the case with cubemaps), simply arrays with
MAX_LAYER==6 are no longer sufficient. Switch to sufficiently dynamic
data structures where applicable.

On Vulkan rendering to a slice needs Vulkan 1.1 (and 1.1 enabled on the
VkInstance).

Task-number: QTBUG-89703
Change-Id: Ide6c20124ec9201d94ffc339dd479cd1ece777b0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-05-31 17:16:57 +02:00
Laszlo Agocs
bbc6b5c3a7 vulkan: Update legacy tests and examples to the modern validation layer
Fixes: QTBUG-88388
Change-Id: Ib072f203ada5d692dea8d35da2b24db0deac0297
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-05-31 17:16:49 +02:00
Laszlo Agocs
0199640d44 rhi: manual tests: Switch to VK_LAYER_KHRONOS_validation
Task-number: QTBUG-88388
Change-Id: Ia6d7caf0357b017625d3245a72d21a3023d81035
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-05-31 17:16:45 +02:00
Joerg Bornemann
92185d417d Fix BASE argument of qt_add_resources
The BASE argument of qt_add_resources now denotes the root point of the
alias of the file.  Before, BASE was merely prepended to every file that
got passed to qt_add_resources.

Old behavior:
    qt_add_resources(app "images"
        PREFIX "/"
        BASE "../shared"
        FILES "images/button.png")

Alias is "../shared/images/button.png", and pro2cmake generated
QT_RESOURCE_ALIAS assignments to fix this.

New behavior:
    qt_add_resources(app "images"
        PREFIX "/"
        BASE "../shared"
        FILES "../shared/images/button.png")

The alias is "images/button.png".  No extra QT_RESOURCE_ALIAS assignment
is needed.

The new behavior is in effect for user projects and for Qt repositories
that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE.  Qt repositories will be
ported one by one to this new behavior.  Then the old code path can be
removed.

Pick-to: 6.1
Task-number: QTBUG-86726
Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-18 16:02:52 +02:00
Tor Arne Vestbø
7feeb7c34b Rejig native interface plumbing
The initial approach for providing public access to native
interfaces via T::nativeInteface<I>() was based on the template
not being defined, and then having explicit instantiations of
the supported types in a source file, so that the accessors
were exported and available to the user.

This worked fine for "simple" types such as QOpenGLContext
and QOffscreenSurface, but presented a problem in the context
of classes with subclasses, such as Q{Core,Gui}Application.

To ensure that a native interface for QCoreApplication was
accessible both from QCoreApplication and its subclasses,
while at the same time preventing a native interface for
QGuiApplication to be accessible for QCoreApplication, the
nativeInterface() template function had to be declared in
each subclass. Which in turn meant specializing each native
interface once for each subclass it was available in.

This quickly became tedious to manage, and the requirements
for exposing a new native interface wasn't very clear with
all these template specializations and explicit instantiations
spread around.

To improve on this situation, while also squashing a few
other birds at the same time, we change the approach to
use type erasure. The definition of T::nativeInteface<I>()
is now inline, passing on the requested interface to a per
type (T, not I) helper function, with the interface type
flattened to a std::type_info.

The type_info requested by the user is then compared to the
available types in a single per-type (T) "switch statement",
which is a lot easier to follow for someone trying to trace
the logic of how a native interface is resolved.

We can safely rely on type_info being stable between the user
application and the Qt library as a result of exporting the
type info for each native interface, by explicitly ensuring
they have a key function. This is the same mechanism that
ensures we can safely dynamic_cast these interfaces, even
across library boundaries.

The use of a free standing templated helper function instead
of a member function in the type T, is to avoid shadowing issues,
and to not pollute the class namespace of T with the helper
function.

Since we are already changing the plumbing for how a user
resolves a native interface for a type T, we take the opportunity
to add a few extra safeguards to the machinery.

First, we add a static assert in the T::nativeInteface<I>()
definition, that ensures that only compatible interfaces,
as declared by the interface themselves, are allowed.
This ensures a compile time error when an incompatible
interface is requested, which improves on the link time
errors we had prior to this patch, and also offsets the
one downside of type erasure, namely that errors are only
caught at runtime.

Secondly, each interface meant for public consumption through
T::nativeInteface<I>() is declared with a revision, which
is checked when requesting the interface. This allows us
to bump the revision when we make breaking changes to the
interface that would have otherwise been binary incompatible.
Since the user will never see this interface due to the
revision check, they will not end up calling methods that
have been removed or renamed.

One advantage of moving to a type-erased approach for the
plumbing is that we're not longer exposing the native
interface types as part of the T::nativeInteface symbols.
This means that if we ever want to rename a native interface,
the only exported symbol that the user code relies on is
the type info. Renaming is then possible by just exporting
the type info for the old interface, but leaving it empty.
Since no class in Qt implements the old native interface,
the user will just get a nullptr back, similarly to bumping
the revision of an interface.

Change-Id: Ie50d8fb536aafe2836370caacb22afbcfaf1712a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-05-12 22:02:05 +02:00
Martin Storsjö
236ae73ed8 Lowercase system includes and lib names for Windows, fix cross compiling
When cross compiling from a case sensitive file system, casing
matters, and mingw headers and import libraries consistently
use lowercase.

This was uncovered by d385158d5213ef568b7629e2aa4a818016bbffac;
prior to that, the schannel TLS plugin didn't end up built (at
least when cross compiling).

Fix other similar cases that can be found by grepping the repo.

Change-Id: Ia696e17b7aaa979d7b7f5b0801383f338a8b585b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-04-23 14:31:04 +03:00
Morten Johan Sørvig
fea54241aa Add ScreenGadget utility
ScreenGadget visualizes virtual desktop screen layout,
in device independent and native pixels.

This can be used to debug the (sometimes surprising)
device independent screen geometry resulting from Qt
applying a scale factor.

Change-Id: I5b18e0fc9a54ba3e14d648794429b2eeadd25748
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-04-19 18:45:39 +02:00
Morten Johan Sørvig
74cae2580f Update DprGadadget
Display active environment variables. Reorder the
labels with device independent values to the left
and native values to the right. Display the Qt scale
factor.

Change-Id: If95c252b06eff5abd91a25847777246effe94be2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-04-19 18:45:39 +02:00
JiDe Zhang
50a7eb8cf7 Add the "Territory" enumerated type for QLocale
The use of "Country" is misleading as some entries in the enumeration
are not countries (eg, HongKong), for all that most are. The Unicode
Consortium's Common Locale Data Repository (CLDR, from which QLocale's
data is taken) calls these territories, so introduce territory-based
names and prepare to deprecate the country-based ones in due course.

[ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for
its Country enumeration, and associated territory-based names to match
its country-named methods, to better match the usage in relevant
standards. The country-based names shall in due course be deprecated
in favor of the territory-based names.

Fixes: QTBUG-91686
Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-15 20:17:49 +08:00
Eirik Aavitsland
14ccc11194 lance tool: fix build for Qt 6
Pick-to: 6.1
Change-Id: I639ffa60609b1e6036252cccc146dd98fded0b3e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-22 13:59:40 +01:00
Mårten Nordheim
fcb9a94f83 Switch QNetworkInformation manual test back to using qDebug
It turns out QTextStream on Android isn't as easily visible as it is
when going through qDebug (where it can easily be seen with
`adb logcat -v brief libqnetworkinformation_<arch>.so:* -s`)

Change-Id: I3b495d7a3d331fda6cfe602c461107dd1d0b3faf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 677797929d8080199990d741773832f80a654265)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-07 11:10:31 +00:00
Mårten Nordheim
67d2963583 Remove QNetworkStatusMonitor
Since the old code is now fully integrated in QNetworkInformation backends

Change-Id: Ia843d17bb3c98333e8d68752e25722b5860f48e0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 7860b9e6ffece207d054ac0c321bc3c5b983708f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-02-06 10:28:20 +00:00
Mårten Nordheim
a3b58a7844 NetworkListManager based backend for QNetworkInformation
For Windows. Based on the code I wrote for QNetworkStatusMonitor.
It also renames the netlistmgr feature, avoiding the abbreviation.
Locally my MinGW fails the networklistmanager feature test so it may
not be supported on MinGW, likely leaving it without a backend at all.

Change-Id: I13bbe4127edc2a9c0bb91602c95f1cb206a85a69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-02-02 11:10:06 +01:00
Laszlo Agocs
df0e98d408 rhi: Pipeline cache load/save
Add QRhi APIs to retrieve and reload the contents of the "pipeline
cache".

The only API where there is a true pipeline cache is object is Vulkan
(VkPipelineCache). For OpenGL, the other backend where we support this,
it is simulated with program binaries. The Qt 5 style OpenGL program
binary disk cache continues to work like before, but one has now the
option to do things in a more modern, graphics API agnostic way, that
leads to generating a single blob instead of a large set of files in
some system location, allowing easier "pre-baking" of the cache content.

It is expected that Qt Quick exposes the two new functions in form
if QSG_RHI_ environment variables, thus allowing easy testing and
cache file generation.

As an example for the performance improvements this can give, consider
Vulkan, where we do not have any existing persistent caching mechanism
in place:

Running BenchmarkDemoQt6.exe --scene flythrough --mode demo creates 18
QRhiGraphicsPipeline objects from Qt Quick and Qt Quick 3D.

The total time spent in QRhiGraphicsPipeline::create() during application
startup for these 18 pipelines is 35-40 ms on a given Windows (NVIDIA)
system.

When exporting the pipeline cache contents to a file, and then, in a
subsequent run, reloading the cache contents, this is reduced to 5-7 ms
on the same system, meaning we get a 6-7x improvement.

The generated data is always specific to a given Qt version, RHI
backend, graphics device, and driver version. Much of the implementation
consists of adding and verifying the appropriate header to the blobs
retrieved from the driver, to allow gracefully ignoring data that was
generated with a device or driver that differs from the one used at
run time. This should provide robustness, even if the Vulkan or OpenGL
implementation is for some reason not prepared to identity and reject
incompatible cache/program blobs.

Fixes: QTBUG-90398
Change-Id: I67b197f393562434f372c7b7377f638abab85cb3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-22 10:26:03 +01:00
Laszlo Agocs
9f7088fd7f rhi: Stop hardcoding the Vulkan backend's desired instance extensions
Instead, have a static function in QRhiVulkanInitParams then Qt Quick
and anyone else who creates a QVulkanInstance that is then used in
combination with QRhi can query.

Change-Id: I046e0d84541fc00f5487a7527c97be262221527f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-18 13:21:15 +01:00
Joerg Bornemann
04f11f9935 Remove .prev_CMakeLists.txt files
Those serve no purpose anymore, now that the .pro files are gone.

Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-12 20:59:13 +01:00
Laszlo Agocs
133af89038 rhi: shadowmap manual test: use Nearest filtering
Just to avoid validation warnings on systems where the sampling
a D32 texture with linear filtering is not supported.

This is likely not a problem elsewhere: Qt Quick 3D for example
samples the depth texture only with Nearest filtering already.

Fixes: QTBUG-89761
Pick-to: 6.0
Change-Id: I80bf5b7ecfcb3365f4010daa17f2ef00bb206b74
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 17:30:26 +01:00
Laszlo Agocs
c715974dc2 rhi: Make triquadcube manual test compile after recent changes
Amends a0aafefd00

Change-Id: I616df866e32fe6df87ce2944f09aac8f0c077534
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 11:42:15 +01:00
Laszlo Agocs
97da4519ba Add a dedicated QWindow surface type for D3D
Even though there is no D3D-specific logic in the windows platform
plugin, meaning a QWindow with either OpenGLSurface or VulkanSurface
(or anything really) is DXGI/D3D-compatible, it now looks like it is
beneficial, and more future proof, if there is a dedicated surface
type.

As the linked report shows, there are OpenGL-specific workarounds
accumulated in the platform plugin, while not being clear if these
are relevant to non-OpenGL content, or if they are relevant at all
still. (and some of these can be difficult/impossible to retest and
verify in practice)

When D3D-based windows use the same surface type, all these are
active for those windows as well, while Vulkan-based windows have
their own type and so some of these old workarounds are not active
for those. To reduce confusion, having a dedicated surface type for
D3D as well allows the logic to skip the old OpenGL workarounds,
giving us (and users) a more clear overall behavior when it comes
to OpenGL vs. Vulkan vs. D3D.

The change is compatible with any existing code in other modules
because any code that uses OpenGLSurface for D3D will continue to
work, using the new type can be introduced incrementally.

Task-number: QTBUG-89715
Change-Id: Ieba86a580bf5a3636730952184dc3a3ab7669b26
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-04 10:37:11 +00:00
David Skoland
27d96b4789 Replace QtTest headers with QTest
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.

Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-22 15:20:30 +01:00
Alexandru Croitor
2304acab5f CMake: Regenerate projects using pro2cmake one last time
And fix up some wrong qmake project files

Pick-to: 6.0
Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-10 11:52:30 +01:00
Friedemann Kleint
5634bdf9ce Fix qtdiag testing helper on Windows
The windows library user32 is no longer a known library for qmake; add
it explicitly.

Pick-to: 6.0
Change-Id: I61f44e8a2cbccbabbdc5d58bd2615b431097aafd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-07 11:37:35 +01:00
Liang Qi
c48cb33810 tests: add a shortcut to quit app in allcursors
Pick-to: 6.0 5.15
Change-Id: I6b377cacfe05fc13c9f70e37247ed4da72f3f72e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-04 16:20:09 +01:00
Shawn Rutledge
2e0f7117b6 Fix deprecations in manual tests
QEventPoint instead of TouchPoint:  we have source compatibility for that,
but we can use the new type to avoid the deprecation warnings.
Some position accessors have been renamed too.

Change-Id: I5bfe5bc853931127a883d2bd61fab122495fd427
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-12-01 20:20:11 +01:00
Andreas Buhr
0440614af0 Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE
Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with
move semantics, its name is misleading. Q_RELOCATABLE_TYPE was
introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE
is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE
by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this
patch should have no impact on users.

Pick-to: 6.0
Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-30 17:16:21 +01:00
Friedemann Kleint
c8ae8ddb3a Manual shortcut test: Fix deprecation warnings about key combinations
Change-Id: Ifd85dad8042c98ea3c1402588cd50169dee1f685
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-11-16 12:35:42 +01:00
Alexandru Croitor
d2b50a736b CMake: Update usage of add_qt_gui_executable
Change-Id: I8a5e3b4ecdd1c4fa888d4e11dfd09c5116cfb4d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-29 12:13:34 +01:00
Shawn Rutledge
da4ac99b12 Expunge WA_GroupLeader
It's been deprecated since Qt 4.1.

Task-number: QTBUG-85816
Change-Id: Iafc6340716556f54fc5472c60035bb57461b842f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-27 02:55:59 +01:00
Morten Johan Sørvig
4fed50f4ab Prepare for having multiple highdpi manual tests
Move the existing “kitchen sink” test out of the way,
and rename it to “kitchensink”

Change-Id: I121260e640bb2810a94f8112fcea212e97055fb3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-23 00:58:11 +02:00
Volker Hilsheimer
215594d664 Purge QDesktopWidget
It's no longer used; the only calls to QApplicationPrivate::desktop
pass the default nullptr for QScreen, so all we need is a Qt::Desktop
type toplevel widget.

Include changes documentation about both the class and QApplication::desktop
being gone in Qt 6.

Change-Id: I22d6e93cabc6aaaefffe5e96942886a2ef4e0609
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-16 04:44:13 +02:00
Friedemann Kleint
a8b687b101 Manual tablet test: Add a window showing the devices
Task-number: QTBUG-46412
Change-Id: I9cb9bb3493728186e1e6b140308c292ca9662e55
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-10-15 21:55:03 +02:00
Laszlo Agocs
63790184c7 rhi: Fix up vertex inputs with matrices
In order to prevent too much voodoo in backends like D3D11, the input
layout is expected to specify the slice index for vecX that are part of
an unrolled matrix.

Also deoptimize the instancing manual test to exercise a matrix too
instead of just vectors.

Change-Id: If2dcbcbc483645ce2420b2f87dda765b95da6e80
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-14 22:35:19 +02:00
Volker Hilsheimer
1c76aa077e Get rid of all usage of QApplication:desktop
Use QScreen APIs instead.

Change-Id: Ie99af94fe4292223dbb165b3f5c1b74e8fe0498b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-10-14 06:38:43 +02:00
Laszlo Agocs
2189e0f2fc rhi: Make the new direct buffer update available for non-uniform buffers
The original restriction to UniformBuffer was due to the GL backend
where there is no GL buffer object for QRhiBuffers with usage
UniformBuffer. However, we can still implement this for cases when
there is a true GL buffer object underneath. With other backends it
should all work as-is already.

This becomes useful when one has buffers with usage Vertex that need
full updates every frame. (f.ex. instance data)

Unfortunately this involves renaming the function. But while at it, add
an autotest case as well.

Change-Id: Iff59e4509a8bae06654cc92fe8428bd79eb012fb
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-12 07:55:37 +02:00
Laszlo Agocs
0eb8a332af rhi: Regenerate shaders for some manual tests
The qsb files seem to be out of date for those two.

Change-Id: Id832e872667cac4d364e13c440011109a6dbdc7f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-11 10:58:56 +02:00
Laszlo Agocs
f26e329c47 rhi: Add a many cubes manual test
Draw 25000 cubes while doing a uniform buffer update for each.

Change-Id: I2216641c8bf7c6ea147fe3edd679317b472e1f04
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-10-11 10:58:44 +02:00
Allan Sandfeld Jensen
564b59d903 Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.

Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-10-07 23:02:47 +02:00
Tor Arne Vestbø
0efe79f80d Rename the new platform APIs from QPlatformInterface to QNativeInterface
We were already using the 'native' nomenclature when referring to these
kinds of APIs, e.g. when talking about native handles, or the existing
QPlatformNativeInterface on a QPA level. Using 'native' for the user
facing APIs also distinguishes them from the 'platform' backend layer
in QPA and elsewhere.

Change-Id: I0f3273265904f0f19c0b6d62471f8820d3c3232e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-07 13:03:27 +02:00
Laszlo Agocs
a0195a5bea Fix rhi manual test build
Change-Id: Ib121a3a9871c29c10c1f3ae720c093444e076e8c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-30 17:08:01 +02:00
Friedemann Kleint
38a5b6212d qtabletevent/regular_widget manual test: Add a toggle for WinTab
Task-number: QTBUG-83218
Change-Id: I179f53c051c92dbb86fbac710d4a514c4e5d3c49
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-27 12:25:54 +02:00
Friedemann Kleint
18bd226564 Fix compilation of some manual tests
- qtabletevent/device_information
- dialogs
- windowflags

Change-Id: Id3e4b2aec2a873b00dcda39fb1227b24832181ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-26 19:53:54 +02:00
Laszlo Agocs
60871b4fdf rhi: vulkan: Fix mipmap generation for cubemaps
Change-Id: Ia1aab06214be802aaabc97ffefa28947e11148e3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-25 09:24:25 +02:00
Alexandru Croitor
403213240c CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.

Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-23 16:59:06 +02:00
Alexandru Croitor
a3bd80c08c CMake: Regenerate projects
Clean up the state of the projects,
before changing the internal CMake API function names.

Task-number: QTBUG-86815
Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-22 19:08:53 +02:00
Morten Johan Sørvig
6e806b5339 Say hello to PixelGadget
Utility for visualizing and debugging high-dpi rendering
using QPainter, at different (fractional) scale factors.

In addition contains prototype code for mitigating
painting artifacts such as drawing outside the clip
rect when scaling.

Change-Id: I44f39315ad9674790d51413dddf41e3a51043da6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-18 16:07:20 +02:00
Morten Johan Sørvig
30e776fb1b Say hello to DprGadget
DprGadget displays the devicePixelRatio for the current
screen using a large friendly font, as well as the
platform and environment inputs used for determining
the DPR.

Change-Id: Id619edad181eb7717f18eb98af341d6582a843a1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-18 16:07:20 +02:00
Laszlo Agocs
8fe16fef28 rhi: Expose compute threadgroup limits in ResourceLimits
As OpenGL ES and Vulkan ruin the day with the spec mandated minimum
value for max threads per threadgroup being only 128, clients need
a way to decide if their compute shader (local_size_*) is suitable
for use at run time.

Change-Id: I72b4fc97032406340623add82ea4d9544ebe9fdc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-18 09:49:54 +02:00
Allan Sandfeld Jensen
9815ebf24b Switch QSurfaceFormat::colorSpace to a QColorSpace
Allows more flexibility in the future.

Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-15 01:41:13 +02:00
Mårten Nordheim
8a3847aab9 QNAM: Enable HTTP/2 by default
It has been in Qt for some years now and 6.0 marks a good point to
enable it by default. The exception is connectToHostEncrypted where we
still require the users to enable it explicitly since there's no logical
way to disable it.

[ChangeLog][QtNetwork][QNetworkAccessManager] HTTP/2 is now enabled by
default.

Fixes: QTBUG-85902
Change-Id: Ia029a045727cc593d77df9eb3a5888522ad19199
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-10 18:28:43 +02:00
Morten Johan Sørvig
b3c991ae8f Port from devicePixelRatioF() to devicePixelRatio()
This ports all of QtBase.

Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-10 17:28:11 +02:00
Tor Arne Vestbø
89f7a2759c Deliver Quit event when calling QCoreApplication::quit()
Instead of QCoreApplication::quit() directly calling exit(0), which would
leave QGuiApplication and client code out of the loop, we now send the
Quit event, and let it pass through event delivery, before finally ending
up in QCoreApplication::event(), where we call exit(0).

This has the advantage that QGuiApplication can ensure all windows are
closed before quitting, and if any of those windows ignore the close
event the quit will be aborted. This aligns the behavior of synthetic
quits via QCoreApplication::quit() with spontaneous quits from the
platform via QGuiApplicationPrivate::processApplicationTermination.

Clients who wish to exit the application without any event delivery or
potential user interaction can call the lower level exit() function
directly.

[ChangeLog][QtGui] Application termination via qApp->quit() will now
deliver Quit events to the application, which in turn will result in
application windows being closed as part of the application quit,
with an option to cancel the application quit by ignoring the close
event. Clients who explicitly want to exit the application without
any user interaction should call QCoreApplication::exit() explicitly.

Task-number: QTBUG-45262
Task-number: QTBUG-33235
Task-number: QTBUG-72013
Task-number: QTBUG-59782
Change-Id: Id4b3907e329b9ecfd936fe9a5f8a70cb66b76bb7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-07 14:41:16 +02:00
Volker Hilsheimer
0f39cfae93 Change QWidget::enterEvent signature to take a QEnterEvent
This is a source incompatible change for widget implementors.
Leaving the old enterEvent as a virtual overload is problematic due to
shadowing. Best to make a clean cut, widget reimplementors will get a compile
time warning if they mark their override as such, or if they try to call the
parent class implementation.

Addresses ### Qt 6 comment.

[ChangeLog][QtWidgets][QWidget] The virtual enterEvent handler now receives
a QEnterEvent, which contains information about mouse position and button
states, rather than a plain QEvent.

Change-Id: I233f594fd79c0c090983b3db8532913d00132fde
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-05 02:06:26 +02:00
Liang Qi
c91d1fdc10 xcb: drop Xinerama support
[ChangeLog][Important Behavior Changes][X11] Xinerama is no longer
supported.

Fixes: QTBUG-86082
Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-09-04 17:28:49 +00:00
Volker Hilsheimer
00a5629d8d Remove deprecated QPrinter and QPagedPaintDevice APIs
Adjusting the QPrinter test case - some use cases no longer exist, or are
already tested in QPageSize and QPageLayout tests.

Adjust examples and manual tests.

Change-Id: I01cbc65f3d8031aea2dac86dd942126ba708b111
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-04 08:37:59 +02:00
Tor Arne Vestbø
90358f6042 Deprecate and remove uses of AA_DisableHighDpiScaling
Change-Id: Ibadce68775858c524b998aacad310905ba2c2e8e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-08-31 19:14:55 +02:00
Tor Arne Vestbø
2dc46c0902 Deprecate and remove all uses of AA_UseHighDpiPixmaps
High-DPI pixmaps are always enabled, and cannot be disabled.

Change-Id: I01a006b404e5431582b64ef812974c1c022b39ae
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-31 14:29:01 +02:00
Laszlo Agocs
9390edb119 rhi: Work around qsizetype fallout in manual tests
Change-Id: I9f0e210caacc6eefe5ed1ee6fa97574ad5e9edcc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-08-30 17:45:01 +02:00
Tor Arne Vestbø
dce106c77c High-DPI: Remove usage of Qt::AA_EnableHighDpiScaling
This attribute is now on by default.

Change-Id: I7c9d2e3445d204d3450758673048d514bc9c850c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-28 20:08:43 +02:00
Tor Arne Vestbø
92a32e050f Remove QMacNativeWidget and QMacCocoaViewContainer
The functionality should be available via QWidget::winId(),
and QWidget::createWindowContainer() + QWindow::fromWinId().

Any bugs in this area should be fixed by improving the general
wrapping APIs.

Fixes: QTBUG-83254
Change-Id: I86584a4a8138d17d65a50da39efd58039f10da91
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-08-28 14:16:52 +02:00
Volker Hilsheimer
b77a3f47c9 Rename confusingly named QFont/QPalette::resolve overloads
Having three methods with the same name doing different things is
unnecessarily confusing, so follow the standard naming convention in
Qt and call the getter of the resolve mask resolveMask, and the setter
setResolveMask. These methods were all documented as internal.

The publicly documented resolve() method that merges two fonts and
palettes based on the respective masks remains as it is, even though
'merge' would perhaps be a better name.

Change-Id: If90b1ad800834baccd1dbc38fc6b861540d6df6e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-25 17:59:10 +02:00
Laszlo Agocs
81159cf3f7 rhi: Enable msaatexture manual test on OpenGL
...now that a recent path enables MultisampleTextures for ES >= 3.1 and
GL 3.x and up.

Just need to make sure the .qsb contains something for OpenGL as well.

While we are at it, make updated .qsb files for all the commonly used
shaders since what we had before was version 4. Bump them to version 5.

Change-Id: If2040f4894e6360d1ebd5daf7e698508e5e6e42e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-08-17 18:20:36 +02:00
Volker Hilsheimer
c54a5b8380 Introduce QWidget::setScreen
Follows the QWindow semantics, and is a replacement for creating
a QWidget with a QDesktopScreenWidget as the parent.

We can now remove much of the special handling of QDesktopWidget and
the Qt::Desktop window type, and get rid of QDesktopScreenWidget.

Add a manual test that allows local testing. Our CI environments
only have a single screen, and no multi-head display server setup
which is the primary case where QWidget::setScreen is interesting.
For the more common case of a virtual desktop, QWidget::setScreen
has no real impact (just as QWindow::setScreen doesn't).

Change-Id: Id0099e069d316741bacd8c795c396ccad37be297
Fixes: QTBUG-85483
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-08-17 15:08:39 +02:00
Eskil Abrahamsen Blomfeldt
76068d0114 Make QFontDatabase member functions static
QFontDatabase is a singleton and all instances would share
a single, mutex-protected global data pointer. But some functions
were implemented as non-static functions. This caused a lot
of code on the form

	QFontDatabase().families(...)

since there was no static access. Other functions were implemented
as static.

To consolidate, we make all functions static. This should be
source-compatible, but not binary compatible.

[ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in
principle static, but previously not implemented as such. All
member functions have now been made static, so that constructing
objects of QFontDatabase is no longer necessary to access certain
functionality.

Fixes: QTBUG-83284
Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-08-06 11:43:24 +02:00
Tor Arne Vestbø
a00ad95137 Remove last remaining bits of QtPlatformHeaders
Task-number: QTBUG-84220
Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-08-04 07:12:32 +02:00
Edward Welbourne
f144507829 Clean up manual network stress-test
Don't attempt the remote test if we don't have a remote server.
Don't add error returns from read to byteCounter.
Don't cast from ASCII to QString in URL components.
Don't waste time encoding a path for which it's a no-op
(especially as I recently deleted the method used to do it).

Name the time-out, both for clarity and to give anyone who needs to
debug the test only one line to edit so as to increase the time-out
enough to make debugging practical.

Change-Id: I378aa96c0501f7033ca4abb82734b03b8c807f08
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-07-27 11:25:11 +02:00
Edward Welbourne
02c2c930f0 Fix some compiler errors caused by bit-rot in manual tests
Two methods that have gone away or been renamed,
an enum that now doesn't support being assigned from int.
QTime should no longer be used as a timer.
Removed a test of deprecated code that's gone away.

Task-number: QTBUG-85700
Change-Id: Idc6d59542625d22b9937084411b54b0d8aa87f00
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-27 11:20:35 +02:00
Edward Welbourne
f16ab166bc QLogging: purge deprecated qInstallMsgHandler(QtMsgHandler)
Deprecated since 5.0.  Renamed a function in a manual test that no
longer needs to say it's Qt5-specific.

Change-Id: I6f2159c702f389d378a0e4d86bd4fe633298b100
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-07-23 11:05:53 +02:00
Friedemann Kleint
32a26f1714 Manual touch test: Add a settings dialog for windows
Exercise the touch settings of the native interface.

Task-number: QTBUG-41433
Task-number: QTBUG-48849
Task-number: QTBUG-83252
Change-Id: I5ae95a79c00b55236dbbed9d8549f4fdf5b10b8e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-22 19:46:09 +02:00
Friedemann Kleint
a54639acd2 Fix the touch manual test to compile
Task-number: QTBUG-72167
Change-Id: I9074fc21ae8fccf66140fb38bfbd35e526506c36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-22 12:20:16 +02:00
Shawn Rutledge
1b72f9676f Styles manual test: show active, inactive and disabled palette colors
Change-Id: I19c9648f3099ec299e0117748a2808d7a407a3e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-17 23:29:27 +02:00
Shawn Rutledge
4e400369c0 Refactor pointer event hierarchy
Some goals that have hopefully been achieved are:
- make QPointerEvent and QEventPoint resemble their Qt Quick
  counterparts to such an extent that we can remove those wrappers
  and go back to delivering the original events in Qt Quick
- make QEventPoint much smaller than QTouchEvent::TouchPoint, with no pimpl
- remove most public setters
- reduce the usage of complex constructors that take many arguments
- don't repeat ourselves: move accessors and storage upwards
  rather than having redundant ones in subclasses
- standardize the set of accessors in QPointerEvent
- maintain source compatibility as much as possible: do not require
  modifying event-handling code in any QWidget subclass

To avoid public setters we now introduce a few QMutable* subclasses.
This is a bit like the Builder pattern except that it doesn't involve
constructing a separate disposable object: the main event type can be
cast to the mutable type at any time to enable modifications, iff the
code is linked with gui-private. Therefore event classes can have
less-"complete" constructors, because internal Qt code can use setters
the same way it could use the ones in QTouchEvent before; and the event
classes don't need many friends. Even some read-accessors can be kept
private unless we are sure we want to expose them.

Task-number: QTBUG-46266
Fixes: QTBUG-72173
Change-Id: I740e4e40165b7bc41223d38b200bbc2b403e07b6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-10 14:32:56 +02:00
Alexandru Croitor
1339cc4667 CMake: Regenerate manual tests
Change-Id: Id42b9e481375d2ec0e68b73dc1e2ff36f0cbd49e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-08 11:01:38 +02:00
Lars Schmertmann
6ce2f3f26b Add ; to Q_UNUSED
This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:51:48 +02:00
Jarek Kobus
d33655a953 Use QList instead of QVector in other qtbase tests
Task-number: QTBUG-84469
Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:48:45 +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
Christian Ehrlicher
ab1e0961d4 QFileDialog: remove deprecated mode QFileDialog::DirectoryOnly
Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-26 22:40:34 +02:00
Laszlo Agocs
b60f516aca Fix qsizetype fallout in rhi manual tests
Change-Id: I574a2930b5eeb4b3e1f3c6fca6d70dbda64ec324
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-26 14:42:36 +02:00
Shawn Rutledge
9b72900834 Update QTabletEvent device_information manual test
- stop using deprecated accessors in QTabletEvent and QMouseEvent
- position() and globalPosition() provide high resolution so
  we don't need to display hi-res global pos separately
- keep a pointer to the last-seen QPointingDevice instance
  rather than copying fields out of it; it will only be deleted
  if the platform plugin does that (usually only at exit or
  when it's unplugged)
- show seat ID
- show platform-specific device ID

Change-Id: Ic34e1d1256d6956867992db831c2e66bdda7001e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-17 09:12:20 +02:00
Shawn Rutledge
6589f2ed0c Introduce QInputDevice hierarchy; replace QTouchDevice
We have seen during the Qt 5 series that QMouseEvent::source() does
not provide enough information: if it is synthesized, it could have
come from any device for which mouse events are synthesized, not only
from a touchscreen. By providing in every QInputEvent as complete
information about the actual source device as possible, we will enable
very fine-tuned behavior in the object that handles each event.

Further, we would like to support multiple keyboards, pointing devices,
and named groups of devices that are known as "seats" in Wayland.

In Qt 5, QPA plugins registered each touchscreen as it was discovered.
Now we extend this pattern to all input devices.  This new requirement
can be implemented gradually; for now, if a QTWSI input event is
received wtihout a device pointer, a default "core" device will be
created on-the-fly, and a warning emitted.

In Qt 5, QTouchEvent::TouchPoint::id() was forced to be unique even when
multiple devices were in use simultaneously. Now that each event
identifies the device it came from, this hack is no longer needed.

A stub of the new QPointerEvent is added; it will be developed further
in subsequent patches.

[ChangeLog][QtGui][QInputEvent] Every QInputEvent now carries a pointer
to an instance of QInputDevice, or the subclass QPointingDevice in case
of mouse, touch and tablet events. Each platform plugin is expected to
create the device instances, register them, and provide valid pointers
with all input events. If this is not done, warnings are emitted and
default devices are created as necessary. When the device has accurate
information, it provides the opportunity to fine-tune behavior depending
on device type and capabilities: for example if a QMouseEvent is
synthesized from a touchscreen, the recipient can see which touchscreen
it came from. Each device also has a seatName to distinguish users on
multi-user windowing systems. Touchpoint IDs are no longer unique on
their own, but the combination of ID and device is.

Fixes: QTBUG-46412
Fixes: QTBUG-72167
Task-number: QTBUG-69433
Task-number: QTBUG-52430
Change-Id: I933fb2b86182efa722037b7a33e404c5daf5292a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-16 22:06:56 +02:00
Laszlo Agocs
9b8d4a9e45 rhi manual tests: Prevent warnings with MSVC
The QPair changes trigger warnings about size_t vs. quint32.

We made offsets and sizes 32-bit in the QRhi API to emphasize that
some of the graphics APIs are using 32-bit sizes still. It's a bit
unfortunate that pairs now generate warnings when the size does not
match. Just cast as needed.

Change-Id: I88504eed8be6f4bdb2205b3671e2c2a9db9fcb1e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-06-15 15:34:05 +02:00
Volker Hilsheimer
44fb925f50 Phase 2 of removing QDesktopWidget
Remove QDestopWidget public header, simplify the implementation that
maintains a Qt::Desktop type QWidget for each QScreen, and turn
QWidget's initial target screen into a QScreen pointer.

QApplication::desktop() now takes an optional QScreen pointer, and
returns a QWidget pointer, so that applications and widgets can get
access to the root widget for a specific screen without having to
resort to private APIs.

QDesktopWidgetPrivate implementations to look up a screen for an index,
widget, or point are now all inline functions that thinly wrap
QGuiApplication::screens/screenAt calls. We should consider adding those
as convenience APIs to QScreen instead.

Note that QWidget::screen is assumed to return a valid pointer; there is
code that handles the case that it returns nullptr (but also code that
trusts that it never is nullptr), so this needs to be defined, verified
with tests, and asserted. We can then simplify the code further.

Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-06-08 20:29:49 +02:00
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Eskil Abrahamsen Blomfeldt
a389001710 Fix compilation of lance tool
The QLayout::setMargin(x) call has been deprecated since Qt 5.13.
It was an alias for setContentsMargins(x, x, x, x) so we just
replace it with that.

Change-Id: I1c89eebfe776e0e3c8d0bdc19244bd452db4ef3c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-06-05 14:26:41 +02:00
Laszlo Agocs
56977990e0 rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and
destroy. This becomes confusing now that more modules in Qt start taking
QRhi into use. Migrate to the more familiar naming, so those who have
used QWindow or QOpenGLContext before will find it natural.

Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-28 17:53:32 +02:00
Eskil Abrahamsen Blomfeldt
3ec0df4b5f RHI: Store texture handle as 64-bit int
When storing a void* pointer to the texture handle, we had
to ensure that the variable would exist until the build phase,
which is error prone and caused errors in QQuickWidget because
we copied the texture ID from the FBO into a local variable
before passing it into QQuickWindow::setRenderTarget().

The reason for using a void* was that we cannot know the width
of the handles in the different backends, but we do know that
they are 64-bit at maximum, so instead of storing potentially
dangling pointers, we just make it a 64-bit integer and cast
it back and forth in the backends.

Task-number: QTBUG-78638
Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-22 10:32:10 +02:00
Shawn Rutledge
3e12951c0b Remove QScreen::orientationUpdateMask
It simplifies the API and reduces surprise to have rotation working by default.
On Android, the manifest specifies which orientations the application has
been designed to support; on iOS, it is controlled via the
UISupportedInterfaceOrientations property list key.
In addition, QWindow::contentOrientation() is another way to give
a hint to the window manager, or on iOS to directly control whether
the window's rotation is locked or not.

Task-number: QTBUG-35427
Task-number: QTBUG-38576
Task-number: QTBUG-44569
Task-number: QTBUG-51012
Task-number: QTBUG-83055
Change-Id: Ieed818497f686399db23813269af322bfdd237af
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-05-07 13:48:08 +00:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Mårten Nordheim
d8b49e6b51 QtNetwork: Delete bearer management
All remaining pieces are gone, configuration included.

Relevant CMakeLists and configure.cmake were regenerated.

Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-05 16:41:08 +02:00
Shawn Rutledge
f515ca5dcd Fix QTabletEvent manual tests
- QPainterPath needs an explicit include now
- QTabletEvent::device() is deprecated

Change-Id: I2d1086847ee2cf5ed63e345c7c2d6eb43897f0e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-04-01 22:57:55 +02:00
Volker Hilsheimer
bcaff2b06f Remove QGuiAction again and split QAction implementation up instead
Duplicating the number of classes is a high price to pay to be able to
have some QAction functionality behave differently, or be only available
in widgets applications.

Instead, declare the entire API in QtGui in QAction* classes, and
delegate the implementation of QtWidgets specific functionality to
the private. The creation of the private is then delegated to the
Q(Gui)ApplicationPrivate instance through a virtual factory function.

Change some public APIs that are primarily useful for specialized tools
such as Designer to operate on QObject* rather than QWidget*. APIs that
depend on QtWidgets types have been turned into inline template
functions, so that they are instantiated only at the caller side, where
we can expect the respective types to be fully defined. This way, we
only need to forward declare a few classes in the header, and don't
need to generate any additional code for e.g. language bindings.

Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-29 11:18:57 +01:00
Friedemann Kleint
cc333f5faf Diaglib: Fix build
Use range-based for and fix deprecation warnings.

Change-Id: I54152b2598e9e4a7a3cc9db9b7072bbabcef7fcf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-03-25 14:30:24 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Alexandru Croitor
8facb31fde CMake: Regenerate tests projects
Change-Id: I559bf2c82d83fac9bd3c52a331d99e1e83bc3f87
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:39 +01:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
Edward Welbourne
305ddbeb5b Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-28 15:37:11 +01:00
Lars Knoll
60f12c58a0 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-02-28 09:53:26 +01:00
Lars Knoll
a450cce6b6 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
2020-02-28 09:48:30 +01:00
Johan Klokkhammer Helsing
d2068b24e4 Manual tests: Port diaglib from QGL to QOpenGL
Task-number: QTBUG-74408
Change-Id: I25dedd69c6927e5d627f8104c404e23ce68487d9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-28 08:16:32 +01:00
Alexander Akulich
cb26a4da69 QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-27 13:56:45 +01:00
Qt Forward Merge Bot
75c0ffaf6d Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/network/bearermonitor/CMakeLists.txt
	examples/network/CMakeLists.txt
	src/corelib/tools/qlinkedlist.h
	src/sql/kernel/qsqldriver_p.h
	src/sql/kernel/qsqlresult_p.h
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
2020-02-26 18:39:21 +01:00
Johan Klokkhammer Helsing
e0fb295aad Port lance manual test to qopengl
Task-number: QTBUG-74408
Change-Id: I5e112a2024aebee4be740e770ea0fb4e5b2a9daa
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-21 10:01:23 +01:00
Laszlo Agocs
79b605d285 rhi: Fix building hellominimalcrossgfxtriangle on macOS
Change-Id: I55fa7d4d122750ca7ab90559026f4f4fcdf11663
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-02-21 09:15:10 +01:00
Alexandru Croitor
c53ee1f054 Merge remote-tracking branch 'origin/wip/cmake' into dev
Conflicts:
	tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt

Hopefully final merge from wip/cmake, and then all cmake changes
should target dev directly.

Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
2020-02-13 23:29:51 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Alexandru Croitor
0d177053b9 Regenerate projects one last time before merge
Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-12 17:30:49 +00:00
Alexandru Croitor
c9e67a7926 CMake: Regenenerate projects where recent changes happened
Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 10:19:45 +01:00
Qt Forward Merge Bot
6b858e21ed Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-02-04 10:49:41 +01:00
Qt Forward Merge Bot
97417e8f28 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	examples/widgets/widgets/imageviewer/imageviewer.cpp
	src/corelib/text/qchar.cpp
	src/corelib/time/qdatetime.cpp

Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
2020-02-04 10:44:00 +01:00
Laszlo Agocs
b3422402b4 Clean up and modernize hellominimalcrossgfxtriangle manual test
This particular test may serve as sample code in various materials in
the future, therefore it is highly beneficial if it is kept in good shape.

Make it easier to read, more compact, and split up among the natural
boundaries of the functionality (global setup in main, window+swapchain
management in Window, graphics resource setup and draw call recording
in HelloWindow).

Change-Id: I2451d3961a01131dcbffe66baf23d2cf9bfd077f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-04 10:15:02 +01:00
Edward Welbourne
90fbd086c6 Pass QDate and QTime by value in manual calendar test code
They're value types, pass them as such.

Change-Id: I78e93165d431ac4eff145f47a9385d6bf5cd0c15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-31 14:02:53 +01:00
Alexandru Croitor
43d2b60a29 Post-merge fixes
Change-Id: I6acd29103f6cc550544e7422328d97ea0e2dcafb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-30 20:45:08 +00:00
Alexandru Croitor
a1dbdcbd6e Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
        src/corelib/Qt5CoreConfigExtras.cmake.in
        src/corelib/Qt5CoreMacros.cmake
        src/dbus/Qt5DBusConfigExtras.cmake.in
        src/widgets/Qt5WidgetsConfigExtras.cmake.in

Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
2020-01-29 16:57:27 +01:00
Friedemann Kleint
9109461809 Manual test foreignwindows: Modernize code
Use nullptr, range-based for and replace typedef by using.
Fix duplicated setting of option. Replace deprecated API.

Change-Id: I2628e8b41e64e9809b2f405dfd2be6bee18b048c
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-28 22:39:07 +01:00
Johan Klokkhammer Helsing
a611c632bb Add QWindow::startSystemMove and startSystemResize
This can be used to create custom client side window decorations.

Refactors the xcb implementation to use edges instead of corners and we now use
the last mouse position for `root_x` and `root_y` in the `_NET_WM_MOVERESIZE`
event. Touch has also been changed, so just pick a point that's currently being
pressed.

The workaround for QTBUG-69716 has now been moved to QSizeGrip, as the comment
in the bug report says that it should ideally be fixed at the widget level.

On Windows, we no longer abort when GetSystemMenu returns false. I assume this
code was added to check whether the window didn't have any decorations and not
resize in that case. However, since the point of this patch is to let windows
without native decorations resize/move, it makes most sense to remove the
check.

Adds a manual test, which calls QWindow::startSystemMove and startSystemResize
on touch and mouse events.

[ChangeLog][QtGui] Added API for starting interactive window resize and move
operations handled by the system.

Fixes: QTBUG-73011
Change-Id: I7e47a0b2cff182af71d3d479d6e3746f08ea30aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-28 16:52:13 +01:00
Qt Forward Merge Bot
558fc903ac Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qvariant.cpp
	src/corelib/serialization/qjsoncbor.cpp
	src/corelib/serialization/qjsonvalue.cpp
	src/corelib/tools/tools.pri
	src/gui/image/qimage.cpp
	src/gui/kernel/qguivariant.cpp
	src/widgets/kernel/qshortcut.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json
	tests/auto/tools/moc/tst_moc.cpp
        src/opengl/qglframebufferobject.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Leander Beernaert <leander.beernaert@qt.io>
Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
2020-01-28 14:14:20 +00:00
Leander Beernaert
48c82e90af Post Merge Fixes
Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:29:18 +00:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Laszlo Agocs
eecd502ff3 Regenerate qsb files for auto and manual tests
They are now version 4, which is hopefully the final format,
relying on nothing but QDataStream.

Except for the qshader autotest which tests all the 1..4 versions
and so needs appropriate test data.

Also unifies the batch file naming.

Change-Id: Iec478be86d14dbec7ffb9d5f9b62c14fca5d7c9e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-22 22:47:04 +01:00
Qt Forward Merge Bot
0a4e5bb265 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/kernel/qshortcut.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
2020-01-16 11:20:42 +01:00
Qt Forward Merge Bot
d14fd32d40 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
2020-01-15 10:14:05 +01:00
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +01:00
Tor Arne Vestbø
eb2a7738a4 Skip instead of fail tests when test server is not available
We were being inconsistent in how we handled this, some tests skipping
while others using QVERIFY. It makes more sense to skip the tests, since
the problem is a missing pre-condition of the test, not the test itself
being bad or exposing real failures in the implementation.

Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-14 00:15:16 +01:00
Laszlo Agocs
1f267b7e6d rhi: Add render-to-cubemap manual test
What's more, demonstrate two types of rendering to a cubemap:
one by one to each face, and by attaching all faces as color
attachments in one go.

Both are used by Qt Quick 3D in connection with shadows, so this
proves that the same is possible to implement with QRhi.

Task-number: QTBUG-81261
Change-Id: I5c7077224d7cae0dd6ea02ac30a9e6f9f1f0c229
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-01-13 15:52:58 +01:00
Laszlo Agocs
fe97af0c9a rhi: Add manual test for RGBA16F and compute
Uses the two compute shaders from Qt Quick 3D. Demonstrates
and tests both RGBA16F textures and using them (and doing
load/store with mip levels individually) in combination with
compute.

Task-number: QTBUG-81213
Change-Id: I3f0f250d5997a26c857b7c45517684c63b44e58e
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2020-01-13 15:52:46 +01:00
Friedemann Kleint
75391511ff Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
2020-01-07 08:34:53 +01:00
Andy Shaw
24b8b2cb6c Stylesheet: Handle tabs with elide mode set correctly
In order for SE_TabBarTabText to correctly calculate the space available
for the text it needs to get the rectangle of the tab directly instead
of relying on the option's rectangle as this may have been modified
before this point. Therefore we introduce QStyleOptionTabV4 to be able
to store the index as part of the option so it can be queried directly.

[ChangeLog][QtWidgets] Added QStyleOptionTabV4 as a subclass of
QStyleOptionTab so that the tab's index information can be obtained.

Fixes: QTBUG-50637
Change-Id: If705f5069fdd14eeccf06bc63dba4e8d2e704359
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-01-06 09:37:34 +01:00
Liang Qi
a503bf5470 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qvector.h
		Make QVector(DataPointer dd) public to be able to properly merge
		5b4b437b30 from 5.15 into dev.
	src/widgets/kernel/qapplication.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
2020-01-04 15:32:34 +01:00
Qt Forward Merge Bot
51df9bd251 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I7b6e6c687d8d60b4a54e6b9dada025ef66c53d96
2020-01-02 01:00:07 +01:00
Alexandra Cherdantseva
a63969081c wasm: support all cursor shapes
Every Qt::CursorShape is supported.
Tested in Chrome, Firefox and Safari.

Change-Id: I38c9024dba4af70af789ac84ad7e38f749c847d7
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-12-30 14:30:22 +03:00
Qt Forward Merge Bot
a4a7c1bcf7 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp

Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
2019-12-11 14:50:53 +01:00
Liang Qi
90210d5d9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/auto/network/kernel/qnetworkinterface/BLACKLIST

Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
2019-12-10 13:51:40 +02:00
Qt Forward Merge Bot
bef74b6c3a Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
2019-12-09 10:16:01 +01:00
Friedemann Kleint
843be88e29 Manual High DPI test: Add a page logging all screen change signals to Metrics
Turn the Metrics widget into a QTabWidget and add a tab logging
all changed signals of QScreen.
This is useful when for example debugging issues with lock screens and
laptop hibernation.

Task-number: QTBUG-79248
Task-number: QTBUG-76902
Change-Id: Ie86789fe1514cb3333a5f3def7f613f217fa6802
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-05 18:37:00 +01:00
Paul Olav Tvete
913146ccd4 RHI: new native texture API
The new version takes/returns a value that can be unpacked and passed to
other functions without knowing which backend is in use.

The old API will be removed in a later change when dependent modules have
been updated

Task-number: QTBUG-78570
Change-Id: I18d928ceef3cb617c0c509ecccb345551a7990af
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-12-05 10:04:46 +01:00
Qt Forward Merge Bot
0c29ebe374 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
2019-12-04 01:00:23 +01:00
Alexandru Croitor
55a15a1c1b Add initial support for cross-building to iOS
Tested locally with the following configurations:
- iOS device builds (arm64)
- iOS simulator builds (x86_64)
- iOS simulator_and_device builds (fat arm64 and x86_64 archives)

All iOS builds currently require a custom vcpkg fork which contains
fixes for building the required 3rd party libraries.

qtsvg, qtdeclarative, qtgraphicaleffects and qtquickcontrols2
have also been tested to build successfully.

simulator_and_device builds are also supported, but require an umerged
patch in upstream CMake as well as further patches to vcpkg.

Task-number: QTBUG-75576
Change-Id: Icd29913fbbd52a60e07ea5253fd9c7af7f8ce44c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2019-12-03 13:35:59 +00:00
Ulf Hermann
e62d04b933 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/serialization/qcborvalue.cpp

Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
2019-12-03 06:57:05 +01:00
Qt Forward Merge Bot
ad4ef9836c Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ib8357609b37b7cc22b51c27602ba60c69bf91da9
2019-11-29 01:01:08 +01:00
Friedemann Kleint
43c8596be5 More polish of the manual High DPI test
The aim is to make it suitable to test for High DPI
bugs, ideally removing the need to provide bug report
examples.

- Add descriptive window titles/output
- Add options to force scaling on/off
- Change the updating of the text to be done in screenChanged()
  and log the signal.
- Rearrange the layout and show the descriptions as labels

Task-number: QTBUG-80323
Change-Id: Ia44c184c2b38cb18045c40b440fe785c6c17925f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-11-28 14:26:25 +01:00
Friedemann Kleint
c94e756f01 Polish the manual High DPI test
- Use C++ constructs like range-based for, member initialization
- Fix formatting in a few places
- Silence clang warnings:
  - Add override
  - Make member variables private

Task-number: QTBUG-80323
Change-Id: I5b0fda06acb6c8054aafa4dd934b763f8493a6b3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-11-28 14:26:19 +01:00
Laszlo Agocs
f3c37c839c Enable QRhi Metal backend on iOS
While we are at it, remove the Border and MirrorOnce wrap modes that have
not been supported on OpenGL, because they are unsupported with Metal+iOS
as well.

Task-number: QTBUG-78580
Change-Id: I0db94b9d3a6125b3bb5d7b1db5d02a42cd94d2c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-11-27 09:51:28 +01:00
Friedemann Kleint
d3814e51bb Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I5bdfe94f7eec1ba328c4a4b54d12dbc0da7fc3ac
2019-11-27 08:41:33 +01:00
Friedemann Kleint
d556d7a6b8 Avoid initializing QFlags with 0 or nullptr in tests
Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99.

Change-Id: Ib5d17611e43e7ab2c63c7f0587f549377f262e32
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-11-26 09:08:51 +01:00
Leander Beernaert
1c655fb0fc Post merge fixes
Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-25 14:53:27 +00:00
Qt Forward Merge Bot
58c69df4d3 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qhash.h
	src/gui/kernel/qevent.h
	src/widgets/kernel/qshortcut.cpp
	src/widgets/kernel/qshortcut.h

Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
2019-11-25 11:30:04 +01:00
Allan Sandfeld Jensen
af2daafde7 Deprecate constructing QFlags from a pointer
This was used to support QFlags f = 0 initialization, but with 0 used
as a pointer literal now considered bad form, it had been changed many
places to QFlags f = nullptr, which is meaningless and confusing.

Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-20 19:43:38 +01:00
Leander Beernaert
26e8769124 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
2019-11-19 13:53:21 +01:00
Leander Beernaert
47428dfa55 Convert all of tests/manual
Fixes: QTBUG-78164
Change-Id: I28b59bf84533fc33fafafd1511b5337d36af0e2b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-14 09:03:26 +00:00
Leander Beernaert
bac999f38c Fix two manual tests qmake project files
Fixes incorrect target name for styles test.

Explicit reference of widgets and opengl libraries in dialog.pri. While
not necessary for qmake it makes our lives easier when running the
CMake conversion script.

Change-Id: I036cae9d801c80c5817421b8427fc5c91e2f7883
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-13 15:00:58 +01:00
Leander Beernaert
15b78b3b54 Update version checks in tests/manual
Remove unnecessary version in tests/manual since they are always true in
the CMake port where it's impossible to have a QtVersion less than 6.0.

Change-Id: I26a13117a8c2e032a9cc70ca0f040122cbf79886
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-13 15:00:51 +01:00
Leander Beernaert
2285dd6f10 Rename some more manual test to be unique
This patch renames some of the manual test by prefixing them with
tst_manual_ to make sure they are unique in the project structure. This
is a requirement for the CMake port.

Change-Id: I83e2152826e0f95c3378374ab1c9992412022109
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 63a1a30a01)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:35:39 +00:00
Leander Beernaert
70a218b90b Fix compile errors related to missing Qt:: namespace
Change-Id: I092a26ef38b08c52d84adb027a1b1bdee8cc7f6b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit ce187c4f0e)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:35:26 +00:00
Leander Beernaert
190021b9c7 Rename some manual test to be unique
This patch renames some of the manual test by prefixing them with
tst_manual_ to make sure they are unique in the project structure. This
is a requirement for the CMake port.

Change-Id: Ie393b125ce5a35b7069cf006db0f3af8c4fda5b4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 937e014e63)
2019-11-12 10:28:40 +00:00
Leander Beernaert
2199a50a2a Build test/manual if it contains a CMakeLists.txt
Change-Id: Ibada60b0902f9c6a6a7284489a56106e0021a9de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-12 10:06:46 +00:00
Leander Beernaert
63a1a30a01 Rename some more manual test to be unique
This patch renames some of the manual test by prefixing them with
tst_manual_ to make sure they are unique in the project structure. This
is a requirement for the CMake port.

Change-Id: I83e2152826e0f95c3378374ab1c9992412022109
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-11 14:08:57 +01:00
Leander Beernaert
ce187c4f0e Fix compile errors related to missing Qt:: namespace
Change-Id: I092a26ef38b08c52d84adb027a1b1bdee8cc7f6b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-11 14:08:52 +01:00
Leander Beernaert
937e014e63 Rename some manual test to be unique
This patch renames some of the manual test by prefixing them with
tst_manual_ to make sure they are unique in the project structure. This
is a requirement for the CMake port.

Change-Id: Ie393b125ce5a35b7069cf006db0f3af8c4fda5b4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-11 10:01:13 +01:00
Friedemann Kleint
1dd83dd202 Diaglib/Windows: Output more information on geometry for native handles
Obtain the client area and output frame and position relative to the
parent window.

Task-number: QTBUG-79861
Change-Id: I193dfbcdec7e27d32a70ada08ba271260eedc969
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-11-08 11:34:11 +01:00
Lars Knoll
06456873fc Get rid of QT_STRICT_ITERATORS
The concept was a nice idea to avoid accidental detach() calls
in implicitly shared containers, but it conflicts with a C++11
compatible API for them, with signatures for modifying methods
taking a const_iterator as argument and returning an iterator
(e.g. iterator erase(const_iterator)).

Change-Id: Ia33124bedbd260774a0a66f49aedd84e19c9971b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-04 12:52:26 +00:00
Qt Forward Merge Bot
4b0af2cdbf Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I68a6ed3184e62fa89c47c564bb01002c0918d0fd
2019-11-01 01:01:02 +01:00
Morten Johan Sørvig
dcbcda81b4 wasm: add local file access manual test
Testes file load and save, computes a sha256 hash
for verifying file content.

Change-Id: Id7f697c4dfd41e051442350f4050f04b493cfc18
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-10-29 14:02:43 +00:00
Samuel Gaist
9fc5902d23 test: migrate manual dialogs tests to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I9eae3291bc6934375404224c7242e2b23af2019b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-21 10:38:02 +02:00
Simon Hausmann
02164e0288 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
2019-10-17 09:41:36 +02:00
Qt Forward Merge Bot
6f27bb1352 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
2019-10-17 01:01:01 +02:00
Sona Kurazyan
9cc040a806 Prepare for deprecating the QDesktopWidget
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.

Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()

Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-15 20:09:29 +02:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Sona Kurazyan
66a9c4b0b2 Remove usages of deprecated APIs of QDesktopWidget
- Replaced the usages of the following deprecated APIs:
  * QDesktopWidget::screenCount() -> QGuiApplication::screens().size()
  * QDesktopWidget::screenGeometry(int) -> QGuiApplication::screens().at()
  * QDesktopWidget::screenNumber(QPoint) -> QGuiApplication::screenAt(QPoint)

- Added notes for the QWidget *QDesktopWidget::screen(int), which
currently has no replacement.

- Fixed the tests to build conditionally, only when these APIs are
enabled.

Task-number: QTBUG-76491
Change-Id: I2fdec96d0a6a4fc782c53549b05a5556412b8305
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-13 13:08:42 +02:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Liang Qi
96a2044009 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplyhttpimpl.cpp

Change-Id: I059be651604623616fd31e8616be8ae61b4f8883
2019-10-04 15:27:15 +02:00
Laszlo Agocs
f1c7814a55 rhi: Remove QVectors from the data description structs as well
As usual, keep some QVector overloads around to allow Qt Quick to compile.

Color attachments and vertex input bindings get an at(index) type of
accessor, unlike any other of similar lists. This is because there the
index is significant, and sequential iteration is not the only type of
operation that is performed. Sometimes a lookup based on an index will
be needed as well.

Task-number: QTBUG-78883
Change-Id: I3882941f09e94ee2f179e0e9b8161551f0d5dae7
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-03 09:37:48 +02:00
Qt Forward Merge Bot
4c8814a341 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
2019-10-02 08:39:15 +02:00
Laszlo Agocs
7000b66f7e Remove QVector in the API of QRhiResource subclasses
Forcing users to go through a QVector, when in practice they almost
always want to source the data from an initializer list, a QVarLengthArray,
or a plain C array, is not ideal. Especially since we can reason about
the maximum number of elements in the vast majority of use cases for all
the affected lists. QRhiResource is also not copyable so we do not need
the usual machinery offered by containers. So switch to a
QVarLengthArray.

Note that a resource is not a container. The only operations we are
interested in is to be able to source data either via an initializer
list or by iterating on something, and to be able to extract the data,
in case a user wishes to set up another resource based on the existing
one.

In some cases a QVector overload is kept for source compatibility with
other modules (Qt Quick). These may be removed in the future.

Also do a similar QVector->QVarLengthArray change in the srb-related
data in the backends.

Change-Id: I6f5b2ebd8e75416ce0cca0817bb529446a4cb664
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-30 20:07:43 +02:00
Liang Qi
99cdd5fc67 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/global/qrandom.cpp
	src/corelib/io/qfileinfo.cpp
	src/corelib/kernel/qeventdispatcher_win.cpp
	src/corelib/kernel/qeventdispatcher_win_p.h
	src/gui/text/qfontdatabase.cpp
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/testlib/qtestcase.cpp

Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
2019-09-30 14:43:02 +02:00
Laszlo Agocs
86876744f0 Ensure drawable size atomicity within a frame
Revert surfacePixelSize() to be a getter only. With Metal this will
mean returning the "live" layer size (and so not the
layer.drawableSize), which is in line with what we expect with other
backends.

Instead, we leave it to the swapchain's buildOrResize() to "commit"
the size by setting drawableSize on the layer. With typical
application or Qt Quick logic this ensures that layer.drawableSize is
set once and stays static until we get to process the next resize - on
the rendering thread.

This of course would still mean that there was a race when a client
queries surfacePixelSize() to set the depth-stencil buffer size that
is associated with a swapchain. (because that must happen before
calling buildOrResize() according to the current semantics)

That can however be solved in a quite elegant way, it turns out,
because we already have a flag that indicates if a QRhiRenderBuffer is
used in combination with (and only in combination with) a
swapchain. If we simply say that setting the UsedWithSwapChainOnly
flag provides automatic sizing as well (so no setPixelSize() call is
needed), clients can simply get rid of the problematic
surfacePixelSize() query and everything works.

Task-number: QTBUG-78641
Change-Id: Ib1bfc9ef8531bcce033d1f1e5d4d5b4984d6d69f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-29 22:16:55 +02:00
Laszlo Agocs
cd5a0bc735 rhi: Always enable debug info printing from manual tests
It can be important to see for example the adapter enumeration that is
printed when qt.rhi.general is enabled. Make it enabled by default in
the tests.

Change-Id: I7bd073781e176d9b17b5386c548e9f8a2e16c10f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-29 00:12:53 +02:00
Laszlo Agocs
22d22eb282 rhi: Add a --transparent option to manual tests
This will also cause clearing to 0,0,0,0.

Essential in order to allow fast testing of window transparency
issues in combination with QRhi and the various backends.

Change-Id: Iee2763c1d06f1d3e5d59a9142abaf30fab1dc543
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:12 +02:00
Laszlo Agocs
30e27328e3 rhi: Unify handling of special cases for scissor and viewport rects
With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative
width or height. Everything else is allowed. This is also the semantic we wish to
keep for QRhiViewport and QRhiScissor.

This raises some problems. For instance, when we do bottom-left - top-left
rectangle conversion, the case of partially out of bounds rects needs to be
taken into account.

Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when
the QQuickWindow size is decreased so the content does not fit because that will
then start generating negative x, y scissors for clipping (which is perfectly
valid but the QRhi backends need to be able to deal with it)

Then there is the problem of having to clamp width and height carefully, because
some validation layers for some APIs will reject a viewport or scissor with
partially out of bounds rectangles.

To verify all this, add a new manual test, based on the cubemap one. (cubemap was
chosen because that is an ideal test scene as it fills the viewport completely, and
so it is visually straightforward when a scissor rectangle is moving around over it)

Fixes: QTBUG-78702
Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:05 +02:00
Timur Pocheptsov
13e0a36626 Retire SPDY protocol implementation (Qt6)
As it was superseded by HTTP/2. Bye, Speedy. Since it's Qt 6,
we also fix the attribute's enumerator to fit our coding
convention with HTTP2AllowedAttribute becoming Http2AllowedAttribute,
and the same for HTTP2WasUsedAttribute.

tst_qnetworkreply in 'benchmark' directory of qtbase/tests
was updated - we have the logic they tested in preConnectEncrypted
in tst_http2 now.

Manual qnetworkreply test was updated (instead of SPDY in NPN failure
we can use H2, the second test was deleted - again, auto-tested in
tst_http2).

Change-Id: I559c140c333ddf72664911c6e275b1d0d2b980a9
Task-number: QTBUG-78255
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-25 14:46:28 +02:00
Edward Welbourne
22742c5f21 Include missing shbang line in executable shell script
Change-Id: I802665c89fcac9e07e745cf6dce1a04404ae764d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-23 16:31:48 +02:00
Rolf Eike Beer
3a4f11c0f9 tests: fix typo in comment
Spotted while grepping for 'imx'.

Change-Id: I24889929e58045d6bba8dd74f213eff3c0487c4c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-23 10:27:56 +02:00
Laszlo Agocs
ef78a2e8f9 rhi: Add a flag to indicate preferring a software adapter
...if there is one and the concept is applicable in the first place.

Change-Id: Iab202c1c1cdd229f4910159de4cae7ce30805ea9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 14:28:23 +00:00
Laszlo Agocs
f567129bb5 rhi: d3d11: Add the device lost testing machinery
The device can be lost when physically removing the graphics adapter,
disabling the driver (Device Manager), upgrading/uninstalling the
graphics driver, and when it is reset due to an error.

Some of these can (and should) be tested manually, but the last
one has a convenient, programmatic way of triggering: by triggering
the timeout detection and recovery (TDR) of WDDM. A compute shader
with an infinite loop should trigger this after 2 seconds by default.

All tests in tests/manual/rhi can now be started with a --curse <count>
argument where <count> specifies the number of frames to render before
breaking the device. Qt Quick will get an environment variable with
similar semantics in a separate patch.

Change-Id: I4b6f8d977a15b5b89d686b3973965df6435810ae
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 12:39:12 +02:00
Sona Kurazyan
14ade9c476 Fix the build of the qgraphicslayout manual test
This was accidentally introduced by
2f33e030b8 and since manual tests are not
built by default, was not discovered earlier.

Change-Id: I5cb6d5cfe0911bdb01a33014f2648a47b7a48848
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-06 09:57:57 +02:00
Laszlo Agocs
2602209f54 rhi: vulkan: Introduce secondary command buffer usage
As an option. Must opt in via setting ExternalContentsInPass in
the flags for beginFrame(). It is somewhat unfortunate to require
declaring this up front, but forcing using secondary command buffers
always, even though beginExternal() may not be used in many applications,
would be an overkill.

Change-Id: I8d52bcab40c96f89f140c4c7877b6c459925e3c7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-08-29 10:23:15 +02:00
Morten Johan Sørvig
3e5362bfa1 HighDPI: Add “metrics” manual test
This test displays a summary of relevant DPI and scale
factor/devicePixelRatio values:

 - DPI and DPR as seen by the application
 - Input from QPlatformScreen
 - Input from environment variables.

Task-number: QTBUG-53022
Change-Id: I340391624b202e342f22902ffbd7228fe7fbe94b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-23 03:40:43 +02:00
Morten Johan Sørvig
900f2cb6f7 Update Dpi and scale factor computation
Remove pixelScale() in favor of logicalBaseDpi(). Compute scale factor
based on logical DPI and logical base DPI, or optionally based on the
physical DPI.

Add policies for running the scale factor and adjusting the logical
DPI reported to the application. The policies are set via environment
variables:

  QT_SCALE_FACTOR_ROUNDING_POLICY=Round|Ceil|Floor|RoundPreferFloor|PassThrough
  QT_DPI_ADJUSTMENT_POLICY=AdjustDpi|DontAdjustDpi|AdjustUpOnly
  QT_USE_PHYSICAL_DPI=0|1

Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Task-number: QTBUG-53022
Change-Id: I4846f223186df665eb0a9c827eaef0a96d1f458f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-23 03:40:35 +02:00
Tor Arne Vestbø
ce73b4db62 Remove dead code from Qt 4 times
The benefit of keeping this code around was to inspire or inform
changes in the areas to take into account possibly missing features
in Qt 5, but at this point that benefit is questionable. We can
always use the history to learn about missing pieces if needed.

Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-20 22:27:46 +00:00
Alexandru Croitor
c7ec7cd2a1 Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
2019-08-15 16:53:19 +02:00
Thiago Macieira
7922cd5272 QChar: add FormFeed (FF) special character
[ChangeLog][QtCore][QChar] Added FormFeed (FF) special character.

Fixes: QTBUG-77089
Change-Id: I1024ee42da0c4323953afffd15b245a508f545f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-12 22:06:39 -07:00
Nils Jeisecke
9c891bead8 QTextDocument: add manual test for table border logic
This adds a manual test for the QTextTable border logic.

Two HTML files are bundled as resources:

table-border-test.html: Contains various test cases for the border
logic.

table-border-test-header.html: Contains a test case for printing a table
with a repeated header.

The test application allows:
- editing
- previewing
- printing
- opening the HTML in the system browser (via temp. file)

It is possible to edit the HTML with "live preview" so new test cases
can easily be implemented.

Change-Id: Ic88488bc8b7dd74d5c03c3363f55840423462325
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-09 07:21:25 +00:00
Sona Kurazyan
19a9d3517b Remove the unused includes for QSignalMapper
Change-Id: I13f19fadc7ad3fed8eb0a6718244cc8880e91be9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-05 10:15:57 +02:00
Sona Kurazyan
bd2c8353b4 Improve the keypadnavigation manual test
- No need to use QSignalMapper here, replace its uses with lambdas.
- Replace index 'for' loop with iterator loop, to simplify the code.

Change-Id: Ide3d2db99a074c0233eb5c2fd7a9b217d804973f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-01 19:03:42 +02:00
Laszlo Agocs
3f201f988f rhi: Fix clear value in offscreen test
Leftover from the migration to QColor as color clear value.

Change-Id: Ibf49d65234a1e14d53035b46249753a5929ca22b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-07-31 09:04:49 +02:00
Laszlo Agocs
493ce2f3d4 rhi: gl: Add support for compute
...and storage buffers and images.

Change-Id: If38a51322e3187088a13cf4e9b88cb40c8af8621
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-07-31 09:04:45 +02:00
Laszlo Agocs
c955426945 rhi: metal: Do not hold on to the drawable when not presenting
The Quick render loops do SkipPresent occasionally, and it all seemed
to work with the threaded one because we lack an autorelease pool on
the SG render thread. (to be corrected separately) The basic one ended
up crashing sometimes, however. Holding on to the drawable is incorrect.

Fixes: QTBUG-76953
Change-Id: I0d0ec6d09aa209d2c848d7a9dbd9b15916fe23ab
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-07-31 09:04:41 +02:00
Sona Kurazyan
2f33e030b8 Remove usages of deprecated APIs of qtbase/gui
- Replaced the usages of deprecated APIs by corresponding
  alternatives in the library code and documentation.

- Modified the tests to make them build when deprecated APIs disabled:
    * Made the the parts of the tests testing the deprecated APIs to
      be compiled conditionally, only when the corresponding methods are
      enabled.
    * If the test-case tests only the deprecated API, but not the
      corresponding replacement, added tests for the replacement.

Change-Id: Ic38245015377fc0c8127eb5458c184ffd4b450f1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-13 10:43:15 +02:00
Alexandru Croitor
4dac45c9ee Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
2019-07-11 17:17:51 +02:00
Mårten Nordheim
8436fa30af Add manual test for QNetwork{Connection|Status}Monitor
Simplistic console application with one test for each of the two
classes. Simply tests that we receive the signal when the connection
is disrupted in some way.

This patch also exports the classes for tests/developer builds
so that we can actually link with them.

Change-Id: I8066312274350984110c3f3ad3e94854adca7c2a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-08 12:12:57 +02:00
Sona Kurazyan
9b3e8b32f2 Remove usages of deprecated APIs of corelib
- Replaced the usages of deprecated APIs of corelib by corresponding
  alternatives in the library code and documentation.

- Modified the tests to make them build when deprecated APIs disabled:
    * Made the the parts of the tests testing the deprecated APIs to
      be compiled conditionally, only when the corresponding methods are
      enabled.
    * If the test-case tests only the deprecated API, but not the
      corresponding replacement, added tests for the replacement.

Task-number: QTBUG-76491
Task-number: QTBUG-76539
Task-number: QTBUG-76541
Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-05 11:25:46 +02:00
Liang Qi
57fccd6f21 Merge "Merge remote-tracking branch 'origin/5.13' into dev" 2019-07-01 19:20:20 +02:00
Laszlo Agocs
058c52fc2a rhi: Improve base vertex/instance support
Have feature flags as appropriate. OpenGL is causing a mess here
but let's support what we can since some of this will become relevant
in more sophisticated mesh drawing cases with 3D in particular.

Change-Id: Idfa7b4642ec87147978e03d78d6233efbd151491
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-01 17:34:47 +02:00
Laszlo Agocs
9452c963c8 rhi: Add a test for instancing
Draws 1024 cubes at random x,y positions with varying color with
a single instanced draw call.

Change-Id: I8737503acf23866ad4734b1d88753415a3b93445
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-01 17:34:40 +02:00
Laszlo Agocs
854ddb0301 rhi: Enhance line width and point size support
...but this will vary between backends, or in some cases
even between implementations of the same API.

Point size is settable only via the vertex shader (gl_PointSize).
It is silently ignored with D3D and HLSL.

Line widths other than 1 are supported only on OpenGL and Vulkan.
(but this is in fact deprecated with GL and optional with Vulkan)

Add QRhi::Feature values for both.

The line width is now settable on QRhiGraphicsPipeline. It is not a
dynamic state since the static, per-pipeline width is good enough for
most cases. (and the feature is not supported on half of the backends
anyways so it will get limited use in practice).

Change-Id: I6d3a32269527c452b794b2cb8b0f03101eab40b2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-01 17:34:29 +02:00
Liang Qi
d25c322729 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/network/ssl/qsslsocket_openssl.cpp
	src/platformsupport/vkconvenience/qvkconvenience.cpp

Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
2019-07-01 10:21:37 +02:00
Sona Kurazyan
ff2b2032a0 Remove usages of deprecated APIs from QtAlgorithms
Task-number: QTBUG-76491
Change-Id: I9dab736a0cbd2e86588919640c26e8ce6b3674d0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-06-29 21:58:36 +02:00
Qt Forward Merge Bot
7265fb0597 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
2019-06-28 01:00:23 +02:00
Friedemann Kleint
530c6903a4 Brush up Diaglib
Fix most clang warnings about override, nullptr, range-based for loops.

Change-Id: Id47e57adb63a38e2f397a31511b788a2432c97cf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-06-24 08:56:00 +02:00
Laszlo Agocs
6f4aa54131 rhi: Add compute api and implement for Vulkan and Metal
D3D11 and GL (4.3+, ES 3.1+) will come separately at a
later time.

Change-Id: If30f2f3d062fa27e57e9912674669225b82a7b93
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-17 10:32:57 +02:00
Alexandru Croitor
e4079eca49 Merge remote-tracking branch 'origin/dev' into wip/cmake
Take 5.

Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
2019-06-03 15:14:42 +02:00
Samuel Gaist
20c6242c52 test: migrate highdpi manual test to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I0bb1d1409cb0c8f38b7582bb5ce6bbc2b047b6fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-10 10:16:52 +02:00
Tobias Hunger
6630937e63 Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
2019-04-16 16:32:08 +02:00
Liang Qi
9967a011ea Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	qmake/generators/makefile.cpp
	src/plugins/platforms/cocoa/qcocoaintegration.h
	src/plugins/platforms/cocoa/qcocoaintegration.mm

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
2019-06-07 13:19:27 +02:00
Friedemann Kleint
761f88f8ba Diaglib: Improve formatting of DebugProxyStyle
The class used the default debug operator for QObject, which outputs
the object's address. This makes it hard to compare the log output.

Make the existing QObject formatting helper from the EventFilter
publicly usable by providing a helper with a stream operator.

Change-Id: Ifab83e23cc792a5efe231fd9ae84e0439ab0d609
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-06-04 08:02:12 +02:00
Eirik Aavitsland
ecfda0d523 Fix manual lance test: avoid using deprecated api
...and other slight modernizations and minor fixes.

Change-Id: Ide587d9fe59ca9113ae775882c99a50debaf9000
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-26 07:47:12 +00:00
Gatis Paeglis
37b5bb42d8 manual shortcut test: add more shortcut sequences
Change-Id: I45fdda6f35f7ab1416a273ed136e49bc3f002cc4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-04-24 18:48:13 +00:00
Liang Qi
a20da2353c Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/gui/image/qpnghandler.cpp

Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
2019-04-10 08:16:20 +02:00
Qt Forward Merge Bot
ce7f14d2e0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
2019-04-06 01:00:08 +02:00
Friedemann Kleint
5a168507b1 Manual dialog test: Output URLs when testing QFileDialog
Change-Id: Icfaedcd68ff387cc888e41ec0b1db1810122b229
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-05 05:57:17 +00:00
Andy Shaw
a49c564891 Implement support for WA_MacNoClickThrough
This is done by adding a QWindowPrivate::allowsClickThrough() function,
so this could easily be adapted later on if desired for other
platforms.

Fixes: QTBUG-41126
Change-Id: I1157e5e7e7667ff11d1a5d21b3ce8c4b13202272
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-04-01 12:22:54 +00:00
Friedemann Kleint
9732ecc321 Manual dialog test: Fix deprecation warnings
filedialogpanel.cpp:441:55: warning: 'bool QFileDialog::confirmOverwrite() const' is deprecated: Use !testOption(DontConfirmOverwrite) instead [-Wdeprecated-declarations]
filedialogpanel.cpp:443:53: warning: 'bool QFileDialog::resolveSymlinks() const' is deprecated: Use !testOption(DontResolveSymlinks) instead [-Wdeprecated-declarations]
printdialogpanel.cpp:708:62: warning: 'const QRect QDesktopWidget::availableGeometry(int) const' is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]

Change-Id: I087615b7e62b5fc11ec1063590fe55b2615f95fd
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-03-22 17:58:58 +00:00
Qt Forward Merge Bot
6893919b0c Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/gui/kernel/qplatformintegration.cpp
	src/gui/kernel/qplatformintegration.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/xcb/qxcbconnection_screens.cpp

Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
2019-03-20 14:09:30 +01:00
Liang Qi
b1a216649e Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/unix/unixmake2.cpp
	src/corelib/thread/qthread_unix.cpp
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
2019-06-14 13:45:18 +02:00
Laszlo Agocs
53599592e0 Introduce the Qt graphics abstraction as private QtGui helpers
Comes with backends for Vulkan, Metal, Direct3D 11.1, and OpenGL (ES).

All APIs are private for now.

Shader conditioning (i.e. generating a QRhiShader in memory or on disk
from some shader source code) is done via the tools and APIs provided
by qt-labs/qtshadertools.

The OpenGL support follows the cross-platform tradition of requiring
ES 2.0 only, while optionally using some (ES) 3.x features. It can
operate in core profile contexts as well.

Task-number: QTBUG-70287
Change-Id: I246f2e36d562e404012c05db2aa72487108aa7cc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-13 10:13:45 +02:00
Friedemann Kleint
50f3f8f6bb Use High DPI pixmaps in prominent examples and tests
Set AA_UseHighDpiPixmaps.

Task-number: QTBUG-52622
Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-15 18:26:56 +00:00
Andy Shaw
edf2e69985 Don't increase the size of the layout unnecessarily when moving toolbars
When the toolbar was moved from one position to another it could end up
increasing the size of the saveState data due to extra lines. This
removes any needless ones that should not be included.

Change-Id: I1c5d094ae1405d6a82db5fcdc3cd081904706837
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-15 12:24:02 +00:00
Qt Forward Merge Bot
fbc9fb233d Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ica3f89ace33585ad7854417a328156f5a68e2a00
2019-03-09 01:00:20 +01:00
Friedemann Kleint
3702622dde manual tests: Fix build
Fix QOverload<void>::of(), causing

../../../../include/QtCore/../../src/corelib/global/qglobal.h: In instantiation of ‘struct QConstOverload<void>’:
     Q_DECL_CONSTEXPR auto operator()(R (T::*ptr)(Args...) const) const Q_DECL_NOTHROW -> decltype(ptr)

and add a missing .pro-file.

Change-Id: I19597adc33f2323a9f7dea9ee5ce94546f0e8f12
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-07 22:09:01 +00:00
Friedemann Kleint
464d261aa8 Fix some warnings in manual tests
Fix:
gestures.cpp:46:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
gestures.cpp:47:5: note: here
gestures.cpp:48:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
gestures.cpp:52:5: note: here
main.cpp: In function 'QByteArray windowsVersionToString(QSysInfo::WinVersion)':
main.cpp:40:12: warning: enumeration value 'WV_CE' not handled in switch [-Wswitch]
...

main.cpp: In function 'QByteArray macVersionToString(QSysInfo::MacVersion)':
main.cpp:68:12: warning: enumeration value 'MV_10_12' not handled in switch [-Wswitch]
...

widget.cpp: In member function 'CustomItem* Widget::checkedItem() const':
widget.cpp:238:12: warning: 'item' may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: I434784e86d127e56b92663cb45eba7d60d8f8eaf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-07 22:06:04 +00:00
Christian Ehrlicher
4f6eb43898 QtCore: mark obsolete enumerations as deprecated
The following enumerations were obsolete for a log time but not marked
as deprecated:
 - WA_NoBackground
 - WA_MacNoClickThrough
 - WA_MacBrushedMetal
 - WA_MacMetalStyle
 - WA_MSWindowsUseDirect3D
 - WA_MacFrameworkScaled
 - AA_MSWindowsUseDirect3DByDefault
 - AA_X11InitThreads
 - ImMicroFocus

mark them as deprecated and remove the usage inside QtBase so they can
be removed with Qt6

Change-Id: Ia087a7e1d0ff1945286895be6425a6cceaa483fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-17 14:08:30 +00:00
Joerg Bornemann
ce1830fd21 Migrate Windows system libs to external dependencies
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-08 08:30:02 +00:00
Shawn Rutledge
23c2da3cc2 Add QTextMarkdownWriter, QTextEdit::markdown property etc.
A QTextDocument can now be written out in Markdown format.

- Add the QTextMarkdownWriter as a private class for now
- Add QTextDocument::toMarkdown()
- QTextDocumentWriter uses QTextMarkdownWriter if setFormat("markdown")
  is called or if the file suffix is .md or .mkd
- Add QTextEdit::toMarkdown() and the markdown property

[ChangeLog][QtGui][Text] Markdown (CommonMark or GitHub dialect) is now
a supported format for reading into and writing from QTextDocument.

Change-Id: I663a77017fac7ae1b3f9a400f5cd357bb40750af
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-01 14:31:27 +00:00
Qt Forward Merge Bot
03f7d0a005 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
2019-04-27 01:00:11 +02:00
Qt Forward Merge Bot
67c70b22f6 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
2019-02-19 01:00:08 +01:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Christian Ehrlicher
edc455c69b QtWidgets: mark QDialog/QFileDialog functions as deprecated
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
 - QDialog::setOrientation()/orientation()
 - QDialog::setExtension()/extension()/showExtension()
 - QFileDialog::setNameFilterDetailsVisible()/isNameFilterDetailsVisible()
 - QFileDialog::setResolveSymlinks()/resolveSymlinks()

Change-Id: Ibbd5b4192ea8ab483d6b2a8dbf9879f29f9ee86d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-06 22:11:38 +00:00
Mårten Nordheim
503ff495aa Update manual qsslsocket test to use HTTP/2 instead of spdy
Some of the spdy/3 tests don't pass anymore because those services
no longer support spdy/3. Solve this by updating it to HTTP/2 (h2).

Change-Id: Ib3ef6109b75f4298fed15c1c7922deca35459df9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-22 09:45:41 +00:00
Liang Qi
03039979b5 Merge remote-tracking branch 'origin/5.12' into dev
Also blacklist tst_QRawFont::unsupportedWritingSystem() and
tst_QGlyphRun::mixedScripts() on windows for now.

 Conflicts:
	qmake/generators/makefile.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
	tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
	tests/auto/gui/text/qglyphrun/BLACKLIST
	tests/auto/gui/text/qrawfont/BLACKLIST

Task-number: QTBUG-72836
Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
2019-01-04 07:33:14 +01:00
Tor Arne Vestbø
3306b16239 macOS: Only do gamma-corrected blending for subpixel-antialiased text
The grayscale font-smoothing doesn't expect to be linearly blended,
as first assumed.

Amended nativetext manual test to better diagnose the native Core
Text behavior. Non-linear blending will result in the magenta
text having a dark outline against the green background.

Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 12:00:07 +00:00
Tor Arne Vestbø
1f30434356 nativewindow: Add additional test for 8pt font size
Change-Id: I5012eb6ffee8f81da61a6fe611352ee5900a5eee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-16 15:02:19 +00:00
Qt Forward Merge Bot
ad4f359f80 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I0fe623517af28e408b642c879efd59f633ab63ac
2018-12-13 01:00:11 +01:00
Tor Arne Vestbø
f10b980840 nativetext: Fix baseline positioning for CoreText
The Qt and CoreText positioning is now in sync.

Change-Id: I0cbb5b150d1bef732674b8d42c64a040773a62ab
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-11 23:41:47 +00:00
Qt Forward Merge Bot
fc11604964 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I10ae61ec6867b38601d85d6fc34e1f6a6ba0cc11
2018-12-09 01:00:43 +01:00
Tor Arne Vestbø
e12aad05f0 Add manual test case for verifying our text rendering
Allows comparing Qt's text rendering to the native rendering.

Change-Id: I56f015fb64df3f70c33db58891876c325cbbc55d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-08 15:27:06 +00:00
Liang Qi
bf58c70546 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/io/qdir.cpp
	src/corelib/kernel/qtimer.cpp
	src/corelib/kernel/qtimer.h

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
2018-11-22 01:53:29 +01:00
Friedemann Kleint
79af4ec056 Manual dialogs test: Fix shortcut
Fix:
QAction::event: Ambiguous shortcut overload: Ctrl+Q

when pressing CTRL+Q

Amends b5eb850e0d .

Change-Id: Ie31d5830ea357cd34cdd422e667ceca507c7b53f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-14 18:35:51 +00:00
Qt Forward Merge Bot
0441d959ff Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I5dbdc13c6133e5b03e362c5461b4a599d781bd1e
2018-11-13 01:00:13 +01:00
Friedemann Kleint
79ed504f10 Manual dialogs test: Add option to turn off the printer panel
On Linux, the printer panel impacts the application startup time,which
can be annoying when testing other dialogs.

Change-Id: Id13446047cf50765951a6bb5182ee50cae983457
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-12 13:01:05 +00:00
Friedemann Kleint
47dc810724 Manual test foreignwindows: Add option to recover lost windows
Add an option that moves windows back to the top left corner,
which is useful when some window (of some application saving its
position) is lost after changing the monitor setup.

Change-Id: If358b1ed7f481f2bb98e375e88f11049f97a4a91
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-07 11:46:50 +00:00
Christian Ehrlicher
f06e0f62fa Fix usage of QGuiApplication::set/resetOverrideCursor
Replace all occurrences of QApplication::set/resetOverrideCursor with
the QGuiApplication::set/resetOverrideCursor since it's a static
function of QGuiApplication.

Change-Id: Ic898ab50a7ad4ed2bc9c6acb26cf4a979c2f82af
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-05 21:57:43 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00
David Faure
c82ab86cea New proxy model: QConcatenateTablesProxyModel
It takes multiple source models and concatenates their rows into a single model.

With full unit tests.

[ChangeLog][QtCore] New class QConcatenateTablesProxyModel, to
concatenate the rows from multiple source models.

Change-Id: Iaf4f325473adef106f423677fdc5ee0e35e87d35
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2018-09-09 10:13:06 +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
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
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
Andy Shaw
a832e3773a Show the toolbutton's menu in the right place on multiple screens
When a screen is positioned to be above another, then the toolbutton
menu could be shown on the wrong screen if it was deemed to not fit
below the button the same screen. This ensures that it shows it on the
right screen when there is sufficient space to do so.

Change-Id: Ia626b28f74c1931904ff5b30cca17e63914d3c79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-10 15:24:16 +00:00
Liang Qi
e3ed2281c0 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_dragging.mm
	src/plugins/platforms/ios/qiosinputcontext.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/tools/androiddeployqt/main.cpp
		Was moved from qttools into qtbase in 5.11.
		So re-apply 32398e4d here.
	tests/auto/corelib/global/qlogging/test/test.pro
	tests/auto/corelib/global/qlogging/tst_qlogging.cpp
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
	tests/auto/corelib/thread/qthreadstorage/test/test.pro
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
	tests/auto/widgets/kernel/qapplication/test/test.pro

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
2018-07-02 11:23:45 +02:00
Andy Shaw
34d212cb02 QMenuBar: Account for displays that are above 0x0
If a display is placed above a primary screen which has the top left set
to be 0x0, then menus that are defaulting to go up can still be
displayed on that screen when the menubar is placed on the bottom of it.

This ensures that this is the case and also adds a manual test to aid
verification of it in the future.

Change-Id: Ib657ccdc1aabfe1586c72585c087ac80a6c632c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-06-29 05:37:13 +00:00
Tor Arne Vestbø
92b3ef24ed Fix window(child)geometry manual tests
Task-number: QTBUG-67632
Change-Id: I16482d3501cc7c7893d6eac4617c77dc70e1e215
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-06-25 13:01:14 +00:00
Gabriel de Dietrich
595c1ae9e7 Cocoa Menus: Add support for menu items in window-less apps
Since we moved the menu items validation and target/action to
QNSView (thus relying on the responder chain), we need to take
care of case when the applications that doesn't have any window
open. By adding similar methods to QCocoaApplicationDelegate,
the last responder, we ensure the menu items will be validated
and will trigger properly. This is particularly necessary for
dock menu items, which live separately from any top-level widget.

Dock menu added to Menurama which won't quit when its last window
is closed. This way we can test that dock menu items will trigger
in the absence of any window.

Change-Id: I56d864eb9da1f8dd5adb2a3b6c3dd5304c723117
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-05-23 18:09:28 +00:00
Liang Qi
b5a956601f Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro

Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
2018-05-08 20:43:45 +02:00
Friedemann Kleint
807f819357 Manual dialogs test: Add about dialog showing style and scaling
Change-Id: I8750956056466d3cfd99903fb5e432ac81223403
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-08 06:57:15 +00:00
Liang Qi
60fefff22f Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
	examples/widgets/graphicsview/elasticnodes/node.cpp
	examples/widgets/graphicsview/elasticnodes/node.h
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_drawing.mm
	src/widgets/kernel/qmacgesturerecognizer_p.h

Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
2018-05-03 14:50:22 +02:00
Qt Forward Merge Bot
7de400052f Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
2018-05-02 13:15:15 +02:00
Friedemann Kleint
ae618e0694 Manual touch test: Add handling for multiple touch screens
- Add a display label showing the screen parameters.
- Add a menu option to launch secondary windows and restructure
  the code accordingly

Change-Id: I2bdb76da0b0a00e62db41e674aa93cef9598fe67
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-05-02 09:36:19 +00:00
Friedemann Kleint
578c96f0bb Polish the manual touch test
Introduce C++11, nullptr, for, port to Qt 5 connection syntax.

Change-Id: I2d233ccd68bad533af8d4674d91236b2c049e997
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-04-30 11:46:19 +00:00
Morten Johan Sørvig
18d2619224 QGraphicsView: Improve high-DPI item caching
Scale cache size by target paint device devicePixelRatio.

Add manual test for the cache modes.

Change-Id: I9f3a2b4c4cf12571aefe54ebf534009a2448fb48
Done-with: MihailNaydenov <garfieldhq@yahoo.com>
Task-number: QTBUG-26795
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-04-26 23:39:46 +00:00
Morten Johan Sørvig
7160df3a15 High-dpi drawTiledPixmap (raster paint engine)
Implement more consistent behavior for drawTiledPixmap(),
which should produce the same visual tiling pattern
independent of display devicePixelRatio

Consider the following pixmaps and draw calls:

  QPixmap px32; // 32x32
  QPixmap px64; // 64x64
  drawTiledPixmap(QRect(0, 0, 128, 128), px32);
  drawTiledPixmap(QRect(0, 0, 128, 128), px64);

On 1x displays this will produce 4x4 and 2x2 tiles,
respectively.

On 2x displays this would previously produce a different
tiling pattern, where the paint engine would tile in
the device pixel coordinate system. Change this to
tile in the device independent coordinate system,
producing the same visual tiling pattern as the 1x case.

It is possible to produce a 4x4 tiling pattern with
high-resolution output from the 64x64 pixmap by setting
the devicePixelRatio:

  QPixmap px64;
  px64.setDevicePixelRatio(2);
  drawTiledPixmap(QRect(0, 0, 128, 128), px64);

This change adds an inverse scale to the image filler
transform that accounts for the pixmap devicePixelRatio.

[ChangeLog][QtGui] QPainter::drawTiledPixmap() now
tiles in the device independent coordinate system.

Change-Id: I4918d274192967f222f181b374571c7c597dcd76
Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: 石博文 <sbw@sbw.so>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-04-26 10:39:25 +00:00
Qt Forward Merge Bot
6f45fda50b Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I0bea38585382b5d9c8d7a013bf6bcb3a6008d159
2018-04-20 21:22:53 +02:00
Friedemann Kleint
370cd37cea Manual shortcut test: Arrange in QGridLayout
Change-Id: I93264bec8810f4dd1e2c010cc4dd35df93f31102
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-18 20:54:03 +00:00
Qt Forward Merge Bot
8264e495fa Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
2018-03-15 01:00:11 +01:00
Friedemann Kleint
ed245f3e70 Manual tablet test: Draw crosshairs when tablet pen is close
Crosshairs provide better visual feedback for coordinate
conversions.

Change-Id: I20f67733d7a5e6b1455507a39a8b9535202a92c4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-03-14 14:15:45 +00:00
Qt Forward Merge Bot
efb46ea7cc Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I01dfc41e18333ac55954296cef8f01475adab27e
2018-02-23 09:27:52 +01:00
Gatis Paeglis
5d3f540fc6 tests: improve shortcut manual test
Change-Id: Id45bbe77a59917f25a031539f8414dc27d8fe19f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-22 21:37:58 +00:00
Thiago Macieira
988c3e4fc0 filetest: Make the "ls" command actually list the dirs
Change-Id: I940917d6763842499b18fffd15143af77c036d69
Reviewed-by: David Faure <david.faure@kdab.com>
2018-02-22 18:59:37 +00:00
Tor Arne Vestbø
8ef9a0ae89 windowflags: Make it easier to debug windows without a frame
Without any content it was hard to see the window. Put some lipstick on it.

Change-Id: I0fefffb0a4deba7ac91e67a6153a9a27308fe493
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-02-22 09:51:49 +00:00
Tor Arne Vestbø
8702e28628 windowflags: Lock fixed size to current size instead of 300x300
The latter would allow one final resize that would immediately
jump to 300x300.

Change-Id: I566e5e9dc1fb07f748f528f002166a8438344173
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-02-22 09:51:44 +00:00
Jake Petroules
ba871065e0 Clean up our Objective-C usage
- Move ivars into @implementation
- Use instancetype where applicable
- Use dot notation for property access
- Use subscript operator for dictionaries and arrays
- Format selectors consistently
- Use proper style for init methods
- Use generics instead of void pointers where possible
- Use "range for" loops instead of indexing
- Replace or replace IBAction/IBOutlet with void

Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-02-20 10:02:12 +00:00
Liang Qi
bb0fec8057 Merge remote-tracking branch 'origin/5.10' into 5.11
Conflicts:
	src/corelib/corelib.pro
	src/corelib/global/qrandom.cpp
	src/network/access/qhttpnetworkrequest_p.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoansmenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/offscreen/qoffscreenintegration.h
	src/widgets/kernel/qaction.cpp
	src/widgets/widgets.pro

Done-with: Andy Shaw <andy.shaw@qt.io>
Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
2018-02-15 10:14:11 +01:00
Liang Qi
32b506d1db Merge remote-tracking branch 'origin/dev' into 5.11
Conflicts:
	src/corelib/tools/qvarlengtharray.qdoc
	src/corelib/tools/qvector.qdoc

Resolved documentation changes in favor of 017569f702,
which keeps the move overloads along with its const-ref sibling.

Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
2018-02-10 15:55:52 +01:00
Andy Shaw
c48f4bde00 Set the ellipseDiameters back to the original size in QGraphicsView
When calling setSceneRect() on a QTouchPoint it will cause the
ellipseDiameters to be changed, whereas this should not be affected by
the scene rectangle as it should be in logical pixels.

Also add a manual test for visually checking the ellipse diameters on
various devices.

Change-Id: I1ee9207cb1a63cfef33fe904594c73aba221af5c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-08 21:25:01 +00:00
Friedemann Kleint
2bf4dd1302 Diaglib: Make mouse event logging more verbose
Add information about mouse tracking/grabbing for widgets
and window where applicable.

Change-Id: Idfe8bef6d146ff06dfe95c0bad5e29e7a4ea7adc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-02 07:20:55 +00:00
Friedemann Kleint
cb612491b3 tests/manual/widgets/styles: Extend the style icon display
Refactor the page displaying the standard pixmaps of a style:
- Use a QGroupBox
- Sort items by enumeration name

Add a page displaying the standard icons along with the list of
sizes.

This allows for conveniently checking which resolutions are available.

Change-Id: I2d7f655456fc3e7013c2582ad520b6ac582951e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-26 22:57:08 +00:00
Friedemann Kleint
cb142954c5 XCB: Implement native window dump for diaglib
Extract a helper function to determine the window title from QXcbConnection
and add an invokable function to the native interface that dumps the window
tree similar to existing functionality on Windows.

Change-Id: I5544d69ea2b801eb16d3b5b8d64021b3e567b0d8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-01-24 14:39:16 +00:00
Liang Qi
87204c856a Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/corelib/thread/qsemaphore.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
2017-11-30 09:16:58 +01:00
Liang Qi
7c4b0aa970 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/corelib/io/qstandardpaths_win.cpp
	src/plugins/platforms/ios/qioswindow.mm
	src/plugins/platforms/ios/quiview.mm
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
2017-11-23 12:52:18 +01:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Gabriel de Dietrich
f55a40ac03 Menurama: Fix custom application class constructor signature
Change-Id: I989b9205dde9280f97dedbaad47ef4a8d75004ac
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-17 13:30:40 +00:00
Liang Qi
88cf044580 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/gui/kernel/qwindow.cpp
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
	tests/auto/widgets/kernel/qaction/tst_qaction.cpp

Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
2017-11-09 11:47:57 +01:00
Thiago Macieira
19b0ce5daa Change almost all other uses of qrand() to QRandomGenerator
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)

This commit also found a couple of calls to rand() instead of qrand().

This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
  src/network/ssl/qsslkey_qt.cpp
  src/network/ssl/qsslsocket_mac.cpp
  tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-08 09:14:03 +00:00
Thiago Macieira
ed48a03b21 QSysInfo: add a function that returns the boot ID
[ChangeLog][QtCore][QSysInfo] Added machineUniqueId() and
bootUniqueId().

Task-number: QTBUG-63425
Change-Id: I0b48fc8e90304e0dacc3fffd14e91064020d165b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-05 18:34:09 +00:00
Thiago Macieira
16fba4a28f QSysInfo: add a function that returns a somewhat permanent unique ID
We can use the D-Bus / systemd machine-id file (which is a UUID without
the dashes) on systems with D-Bus. On Windows, there's a value in the
registry that is filled when Windows is installed, like on Linux. For
BSD systems, the kernel has a UUID we can use too, so extract that.

Task-number: QTBUG-63425
Change-Id: I27eaacb532114dd188c4ffff13d32f2e3c1d74bb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-11-05 18:34:07 +00:00
Gabriel de Dietrich
385589ef45 QCocoaMenu: Attach menu items when updating the menubar
Instead of waiting for the menu delegate to update each item,
we can attach an NSMenu to its NSMenuItem as soon as we update
the current window's menubar. This is safe to do because we
know that this is going to be the main menubar right after, so
we're not orphaning any NSMenuItem from its NSMenu at the wrong
moment.

By doing this, we also ensure that all menus from the active
menubar are reachable by the key-equivalent dispatching logic,
even before we display the actual menu.

This was shown in BigMenuCreator where, under the menubar's ASP
and SAP menus, all A*S submenus would be disabled. Furthermore,
on the same menus, SAP would show the same issue.

Added test in Menurama as well.

Change-Id: If6e7311072e6b53ad1cbced73623d1832aa0df8e
Task-number: QTBUG-57076
Task-number: QTBUG-63712
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2017-11-05 01:39:30 +00:00
Liang Qi
17d5141113 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/platforms/windows/qwindowswindow.cpp
	tests/auto/widgets/kernel/qaction/tst_qaction.cpp

Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
2017-10-30 08:54:05 +01:00
Allan Sandfeld Jensen
fa9d12f4a2 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/plugins/platforms/xcb/qxcbimage.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/manual/qtabletevent/regular_widgets/main.cpp

Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io>
Done-with: Mårten Nordheim<marten.nordheim@qt.io>
Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
2017-10-24 13:40:55 +02:00