| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
missing-field-initializers and unused variable
Change-Id: I1a5ceaf53ec706786c73eecab0c002fa9153b962
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: Ia64c6615ee81f7ad5d0658449b0ee347c3db8c29
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-105718
Change-Id: Icb25ea4e07a38eea81f55ed59c6d3b9d37602626
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: Ib014757184540728f40df71cd580f01e85fbbb56
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I106d3a5d1a7b96250380b6f51a48f3b19d10e4d9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
| |
Change-Id: If05aeeb7176e4f13af9afffd16e85611ff7c42f2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the combination of the name of the protocol interface and the name of
its request is same as another interface name, it can cause problem in
calling the constructor instead of method generated by wayland-scanner
when calling request.
For example, if you have an interface named "foo" and its request named
"bar", it might conflict with another interface named "foo_bar".
A real example for this is presentation_time protocol which has
a request "feedback" in the interface "wp_presentation" while it also
has another interface named as "wp_presentation_feedback".
Pick-to: 6.3
Change-Id: I7c007978d4aa404d10441643d5461372f33954e5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Call qt_internal_return_unless_building_tools() directly after
qt_internal_add_tool() to avoid having to special-case code for when
this function only creates imported targets in cross-builds.
Task-number: QTBUG-85084
Change-Id: I1830d4e2b9006d1f789ec4889a01bbb66f63ff11
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
This requires 7c7fda3a7e61f23 from qtbase
Fixes: QTBUG-93776
Task-number: QTBUG-88791
Change-Id: Ic7e0be2273739555593ada53d2c855fd4c37fa38
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
libwayland-server ensures that the requested version is less than or
equal to the global version.
This change removes the global version check to simplify the generated
code and reduce memory usage footprint, however the latter shouldn't be
that noticeable.
Change-Id: Idd76098e588f3f4ca1be960d20a16994726702af
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
| |
Relying on the compositor version only works for the core protocols.
Using the version of our relevant object is more extensible and relies
on less caching.
Pick-to: 6.1
Change-Id: I1044e43a1e24a25359db95988c9956f4f1b5d35f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This includes removal of the corresponding .prev_CMakeLists.txt files.
Pick-to: 6.1
Task-number: QTBUG-88742
Change-Id: I57922bff138258f5b35d484caa4b00d84e924a06
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usually, the object associated with the resource gets destroyed in the
destroy_resource() function.
Therefore, we need to double-check that the object is still alive before
trying to reset its m_resource.
Pick-to: 5.15
Change-Id: I26408228f58919db17eb29584a1cbd4a9427d25c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
It doesn't use any Gui classes at the moment.
It also ensures a target dependency cycle is not created on the
default_qpa_plugins custom target when the QT_QPA_DEFAULT_PLATFORM
cache var is set to 'wayland'.
Change-Id: I8958e5b993ad40294abf49f633d1ef31b6c633bb
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In rare cases, the compositor may need to destroy its private data
associated with a wl_resource object. For example, one such case may
arise when an output has been disconnected and the corresponding
QWaylandXdgOutputV1 object needs to be destroyed. Another case is
where some resource has become inert.
If the QWaylandXdgOutputV1 object has been destroyed and there are
still wl_resource objects associated with it, the compositor will
crash due to a segfault when somebody calls xdg_output::destroy().
With this change, qtwaylandscanner will generate code that handles
destruction of inert resources behind the scenes.
Pick-to: 5.15
Change-Id: I0532f783ae53cc7861e0f08433dc2407aa9c7953
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The object that owns the resource will not be necessarily destroyed in
the destroy_resource() function. One such case may arise if the
compositor wants to animate the disappearing of a window, in that case
we want to keep client buffer data around even after the wl_buffer
resource has been destroyed.
If the compositor accidentally accesses the destroyed resource, it'll
most likely crash because of SIGSEGV. Speaking from my experience, such
crashes are far from being fun to debug.
With this change, qtwaylandscanner will generate code that cleans up
m_resource when the associated resource has been destroyed. It can be
useful for the purpose of preventing accessing already destroyed data.
Note that we want m_resource to be valid when the destroy_resource()
func is called because the compositor may need it in order to properly
perform cleanup, for example send a wl_pointer::leave() event, etc.
Pick-to: 5.15
Change-Id: I82dab3b7eae8c282fdbad689af49622350b6c867
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
| |
Modify special case locations to use the new API as well.
Task-number: QTBUG-86815
Change-Id: I2ba7753b64f3d88332e919dc90c98e252e20dd98
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
| |
Change-Id: I6111cd2e280a7cff610d3f89d51fb3964d61b51f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
We need the qt_add_tool changes to successfully configure qemu builds.
The rest of the changes are just to be in sync with the .pro files.
Change-Id: I64e92edc2486a71c88bd964a07adf502481b200d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
Use uint32_t everywhere for id. This is what libwayland does.
Fixes: QTBUG-73098
Change-Id: Ie9564e59001cd9b29481d982b3136a4f31ece717
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
| |
Now that the minimum libwayland version is 1.15, there is no point
in checking whether the version is greater than 1.10.
Task-number: QTBUG-73636
Change-Id: I75a97bec7e464aa6b04e21d1c23566d17ac7684a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-84469
Change-Id: I4bc7b2eb2913fc828f09f96e21480b76cabf8656
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/client/xdgoutput/tst_xdgoutput.cpp
Regenerated CMake projects.
Removed duplicate wayland source in
tests/auto/client/xdgoutput/xdgoutput.pro. It's still
referenced via the included shared.pri file. Regenerated
the CMake project to adapt to that. Otherwise the CMake
project fails to configure due to duplicate rules with
a error like the one below
CMake Error at src/compositor/Qt6WaylandCompositorMacros.cmake:13 (add_custom_command):
Attempt to add a custom rule to output
tests/auto/client/xdgoutput/wayland-xdg-output-unstable-v1-server-protocol.h.rule
Also use a workaround fix for configuring CMake standalone tests
due to regression introduced by
dd7e40b1086020f6a054957f4972720cd684 in qtbase.
Change-Id: Ib364b851a1fa828c153efbf8653c9e4ef5e618cd
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If m_resource is not initialized when calling a send_* method it will
simply crash. This change checks for it beforehand so we get a warning
instead.
Change-Id: I601f9070a35a1b3e595567991f7e54e9a6572c2d
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the new API provided in qtbase, to register a package dependency
between the client module and the QtWaylandScannerTools package.
Do the same for the compositor module.
Also register a dependency between the QtWaylandScannerTools package
and the WaylandScanner package.
Also fix the tests condition to check the correct _FOUND variable.
Change-Id: Id961a365715cef2d7d0b8a54ca9000dc3890ffd7
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some of the changes that were needed
- adjusted wayland macros due to changed target names for plugins
- a few direct moc file includes, to get rid of compilation errors
- Threads::Threads linking for a few tests
- a few special cases for QT_FOR_PRIVATE handling because pro2cmake
doesn't handle those correctly at the moment (they map to
PRIVATE_MODULE_INTERFACE rather than PRIVATE_LIBRARIES)
- just regenerating all projects
Change-Id: I418ce91b1c69c7388d41eb22b94a93a9e80fa732
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ia76896a4d06240ccc3d95ba478b6ce273c7a0be2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's useful to have the source of the generated file on top when
reaching it from the IDE. Also it is useful to explain that it's a
generated file at all.
[ChangeLog][qtwaylandscanner] Include a comment on top explaining what
xml file is being represented.
Change-Id: Ie0584295791f246b0e8c83e0afd3a521f6bdbb2e
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The client, compositor, tests, plugins and examples now build.
There are still a few minor issues:
- The protocol source generation is a bit hacky.
- The tests for checking if building CMake projects don't work anymore as they
have Qt 5 specific code. They have just been commented out for now.
Fixes: QTBUG-78177
Change-Id: Ie17cb05f0cdbd5b098970ce765adaeccf61a8fde
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
|
|
|
|
|
|
|
| |
Task-number: QTBUG-78177
Change-Id: I275cd815e0fe737af94fc46580ec9756eba54451
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
QList is going away in Qt 6, and CoW is not needed, as containers and
elements are only ever moved, not copied, and NRVO is in effect
everywhere.
Change-Id: Ie738da3619f0b8048fbd07e5911db0960133d553
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change
- standardizes on using boolean needsXy to handle join-style omissions
of commas or newlines instead of inspecting the index of the element
in various forms, which enables
- standardize on C++11 ranged for loops instead of indexed loops
- use braced initialization for structs, with designators, which are
strictly a C++20 feature but are being used in QtWayland already, so
should be safe (they originally come from C99).
Together, they make the code easier to understand, because the
variation of patterns used in the program is reduced.
Change-Id: Ib96620a9ecbe4ee47e59290ed758f0ec1bffcfd6
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
This is allowed since C++11, and K&R C, resp., and doing so simplifies
the code.
Change-Id: I4bf5bc50b46c6b811ec386b92bfb0a7529a32645
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch, we port Q_FOREACH loops to C++11 ranged-for loops. All cases are
trivial in the sense that either the argument is already const or is trivially
marked as const, either by qAsConst(), or, in the case of rvalues, by storing
to a const auto temporary first.
In addition, all loop bodies are clear enough to confirm that the container we
iterate over is not changed under iteration. This does not exclude cases where
a loop is prematurely exited just after calling a modifier on the container, as
that is safe, if not especially elegant.
Change-Id: I87a63f07797437d421567d60e52305391a3c4f21
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes the scanner produce generated static functions such as
QtWaylandClient::wl_surface *wl_surface::fromObject(struct ::wl_surface *object);
Which casts from the wayland-scanner generated types, such as struct ::wl_surface *,
to types types generated by qtwaylandscanner, but performs a check to see if
the listener is set to the wrapper class first (at least for interfaces with events).
This lets us easily fix crashes in a couple of places where we receive events
with wayland objects that we didn't create.
Also adds nullptr checks whenever we use the fromWlSurface() and fromWlOutput()
functions to handle failed conversions.
Task-number: QTBUG-73801
Fixes: QTBUG-74085
Change-Id: I9f33c31c7d1a939ccb3ebbbcb0eb67af10037237
Reviewed-by: Jaroslaw Kubik <jarek@froglogic.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/compositor/compositor_api/qwaylandquickitem.cpp
Change-Id: I5e01a0731e880e3eb8eab349043756a5993e3050
|
| |
| |
| |
| |
| |
| |
| |
| | |
QList is not included when built with QT_NO_QOBJECT defined.
Change-Id: Iaf8874583e81b08a49ec246a5de0b62803c8ed7e
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I29192963efa6753a4cf222a3aec92ab400deb2f0
|
| |
| |
| |
| |
| |
| |
| | |
The QByteArray one seems like an actual bug.
Change-Id: I11de9c7a10cdd3e70f9f6af18bcce3bd3bf54320
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows writing template functions like this
template<typename return_type>
return_type *fromResource(struct ::wl_resource *resource) {
if (auto *r = return_type::Resource::fromResource(resource))
return static_cast<return_type *>(r->object());
return nullptr;
}
Letting us easily cast a wl_resource to a wrapper type, i.e.:
wl_resource *resource = ...
auto *surfacePrivate = fromResource<QWaylandSurfacePrivate>(resource);
This can hopefully let us reduce some boilerplate in the future.
Change-Id: I41630f35b3472baa39d88d89c1c6503cc0e6584a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I8e32b267a4cc5a4cfc462f7819a378573e179134
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
wl_proxy_marshal_constructor_versioned was added in libwayland v1.10.0, use the
old way with wl_proxy_marshal_constructor for older versions instead.
Change-Id: I4514212e0b44ecbf200769759667186f71b279b6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wayland-client.h and wayland-server.h includes protocol generated for the
version of wayland.xml corresponding to the libwayland version. This becomes a
problem when we want to support a version of wayland.xml that's newer than the
system libwayland.
The solution is to include wayland-client-core.h and wayland-client-server.h
instead. These headers don't include any wayland-scanner generated code, so we
can safely compile and link code generated against the version of wayland.xml
that we ship.
[ChangeLog] Code generated by qtwaylandscanner now includes
wayland-client-core.h and wayland-server-core.h instead of wayland-client.h and
wayland-server.h. This might break source compatibility for code using custom
wayland extensions.
Fixes: QTBUG-70553
Change-Id: Ice0cdb60ecc4f936acc0e158b96f7978549f62c1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
| |
When we switch to only including core wayland headers, wl_resource will be an
opaque type. Use the getters and setter functions instead.
Task-number: QTBUG-70553
Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
| |
The ifdefs were for version 1.2.0.
Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
| |
Change-Id: I85c17e50cf917a51e74fa03fcdc647def6e4bdfd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
| |
Encapsulate what the scanner needs of functions and state into a class,
Scanner, instead of keeping everything in the global namespace.
Change-Id: Idd4b412bb7f709f24c86abe82b135c09b7985878
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
| |
qwldatadevicemanager.cpp:277:1: warning: missing field 'finish' initializer [-Wmissing-field-initializers]
Change-Id: I052407b777ec43f78378fffd15311263e7498287
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some
manual cleanup to prevent QFlag macros to be affected.
Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When globals are destroyed on the compositor side, send the "global_remove"
event and set the resource implementation to nullptr so all further requests
are ignored.
This also adds a compositor test to see if outputs are removed when they are
deleted.
Change-Id: Ib77a4c3d4c2c93283a14ac20f5964e2ce08a1d38
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|