Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
227ab071
Commit
227ab071
authored
Apr 19, 2022
by
Vlad Zahorodnii
Browse files
Run .clang-format
parent
14ae6e31
Changes
50
Hide whitespace changes
Inline
Side-by-side
src/wayland/appmenu_interface.h
View file @
227ab071
...
...
@@ -60,7 +60,8 @@ public:
/**
* Structure containing DBus service name and path
*/
struct
InterfaceAddress
{
struct
InterfaceAddress
{
/** Service name of host with the AppMenu object*/
QString
serviceName
;
/** Object path of the AppMenu interface*/
...
...
src/wayland/autotests/client/test_drag_drop.cpp
View file @
227ab071
...
...
@@ -109,9 +109,9 @@ void TestDragAndDrop::init()
m_registry
->
setup
();
QVERIFY
(
interfacesAnnouncedSpy
.
wait
());
#define CREATE(variable, factory, iface)
\
variable =
\
m_registry->create##factory(m_registry->interface(Registry::Interface::iface).name, m_registry->interface(Registry::Interface::iface).version, this);
\
#define CREATE(variable, factory, iface) \
variable = \
m_registry->create##factory(m_registry->interface(Registry::Interface::iface).name, m_registry->interface(Registry::Interface::iface).version, this); \
QVERIFY(variable);
CREATE
(
m_compositor
,
Compositor
,
Compositor
)
...
...
@@ -137,10 +137,10 @@ void TestDragAndDrop::init()
void
TestDragAndDrop
::
cleanup
()
{
#define DELETE(name)
\
if (name) {
\
delete name;
\
name = nullptr;
\
#define DELETE(name) \
if (name) { \
delete name; \
name = nullptr; \
}
DELETE
(
m_dataSource
)
DELETE
(
m_dataDevice
)
...
...
src/wayland/autotests/client/test_error.cpp
View file @
227ab071
...
...
@@ -93,10 +93,10 @@ void ErrorTest::init()
void
ErrorTest
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_plasmaShell
)
CLEANUP
(
m_compositor
)
...
...
src/wayland/autotests/client/test_fake_input.cpp
View file @
227ab071
...
...
@@ -101,10 +101,10 @@ void FakeInputTest::init()
void
FakeInputTest
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_fakeInput
)
CLEANUP
(
m_queue
)
...
...
src/wayland/autotests/client/test_idle.cpp
View file @
227ab071
...
...
@@ -90,10 +90,10 @@ void IdleTest::init()
void
IdleTest
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_idle
)
CLEANUP
(
m_seat
)
...
...
src/wayland/autotests/client/test_plasma_activities.cpp
View file @
227ab071
...
...
@@ -120,10 +120,10 @@ void TestActivities::init()
void
TestActivities
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_windowInterface
)
...
...
src/wayland/autotests/client/test_plasma_virtual_desktop.cpp
View file @
227ab071
...
...
@@ -144,10 +144,10 @@ void TestVirtualDesktop::init()
void
TestVirtualDesktop
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_plasmaVirtualDesktopManagement
)
...
...
src/wayland/autotests/client/test_plasmashell.cpp
View file @
227ab071
...
...
@@ -96,9 +96,9 @@ void TestPlasmaShell::init()
m_registry
->
setup
();
QVERIFY
(
interfacesAnnouncedSpy
.
wait
());
#define CREATE(variable, factory, iface)
\
variable =
\
m_registry->create##factory(m_registry->interface(Registry::Interface::iface).name, m_registry->interface(Registry::Interface::iface).version, this);
\
#define CREATE(variable, factory, iface) \
variable = \
m_registry->create##factory(m_registry->interface(Registry::Interface::iface).name, m_registry->interface(Registry::Interface::iface).version, this); \
QVERIFY(variable);
CREATE
(
m_compositor
,
Compositor
,
Compositor
)
...
...
@@ -109,10 +109,10 @@ void TestPlasmaShell::init()
void
TestPlasmaShell
::
cleanup
()
{
#define DELETE(name)
\
if (name) {
\
delete name;
\
name = nullptr;
\
#define DELETE(name) \
if (name) { \
delete name; \
name = nullptr; \
}
DELETE
(
m_plasmaShell
)
DELETE
(
m_compositor
)
...
...
src/wayland/autotests/client/test_pointer_constraints.cpp
View file @
227ab071
...
...
@@ -122,10 +122,10 @@ void TestPointerConstraints::init()
void
TestPointerConstraints
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_pointerConstraints
)
...
...
src/wayland/autotests/client/test_selection.cpp
View file @
227ab071
...
...
@@ -39,7 +39,8 @@ private:
SeatInterface
*
m_seatInterface
=
nullptr
;
DataDeviceManagerInterface
*
m_ddmInterface
=
nullptr
;
struct
Connection
{
struct
Connection
{
ConnectionThread
*
connection
=
nullptr
;
QThread
*
thread
=
nullptr
;
EventQueue
*
queue
=
nullptr
;
...
...
@@ -153,8 +154,8 @@ void SelectionTest::cleanup()
{
cleanupConnection
(
&
m_client1
);
cleanupConnection
(
&
m_client2
);
#define CLEANUP(variable)
\
delete variable;
\
#define CLEANUP(variable) \
delete variable; \
variable = nullptr;
CLEANUP
(
m_display
)
...
...
src/wayland/autotests/client/test_server_side_decoration_palette.cpp
View file @
227ab071
...
...
@@ -109,10 +109,10 @@ void TestServerSideDecorationPalette::init()
void
TestServerSideDecorationPalette
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_paletteManager
)
...
...
src/wayland/autotests/client/test_shadow.cpp
View file @
227ab071
...
...
@@ -96,10 +96,10 @@ void ShadowTest::init()
void
ShadowTest
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_shm
)
CLEANUP
(
m_compositor
)
...
...
src/wayland/autotests/client/test_text_input_v2.cpp
View file @
227ab071
...
...
@@ -127,10 +127,10 @@ void TextInputTest::init()
void
TextInputTest
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_textInputManagerV2
)
CLEANUP
(
m_keyboard
)
...
...
src/wayland/autotests/client/test_wayland_appmenu.cpp
View file @
227ab071
...
...
@@ -111,10 +111,10 @@ void TestAppmenu::init()
void
TestAppmenu
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_appmenuManager
)
...
...
src/wayland/autotests/client/test_wayland_blur.cpp
View file @
227ab071
...
...
@@ -107,10 +107,10 @@ void TestBlur::init()
void
TestBlur
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_blurManager
)
...
...
src/wayland/autotests/client/test_wayland_contrast.cpp
View file @
227ab071
...
...
@@ -110,10 +110,10 @@ void TestContrast::init()
void
TestContrast
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_contrastManager
)
...
...
src/wayland/autotests/client/test_wayland_seat.cpp
View file @
227ab071
...
...
@@ -1092,15 +1092,15 @@ class PointerHoldGesture : public QObject, public QtWayland::zwp_pointer_gesture
Q_OBJECT
void
zwp_pointer_gesture_hold_v1_begin
(
uint32_t
serial
,
uint32_t
time
,
wl_surface
*
surface
,
uint32_t
fingers
)
override
{
Q_EMIT
started
(
serial
,
time
,
surface
,
fingers
);
Q_EMIT
started
(
serial
,
time
,
surface
,
fingers
);
}
void
zwp_pointer_gesture_hold_v1_end
(
uint32_t
serial
,
uint32_t
time
,
int32_t
cancelled
)
override
{
cancelled
?
Q_EMIT
this
->
cancelled
(
serial
,
time
)
:
Q_EMIT
ended
(
serial
,
time
);
cancelled
?
Q_EMIT
this
->
cancelled
(
serial
,
time
)
:
Q_EMIT
ended
(
serial
,
time
);
}
Q_SIGNALS:
void
started
(
quint32
serial
,
quint32
time
,
void
*
surface
,
quint32
fingers
);
void
started
(
quint32
serial
,
quint32
time
,
void
*
surface
,
quint32
fingers
);
void
ended
(
quint32
serial
,
quint32
time
);
void
cancelled
(
quint32
serial
,
quint32
time
);
};
...
...
@@ -1126,7 +1126,6 @@ void TestWaylandSeat::testPointerHoldGesture()
PointerHoldGesture
gesture
(
gestures
.
get_hold_gesture
(
*
pointer
));
QVERIFY
(
gesture
.
isInitialized
());
QSignalSpy
startSpy
(
&
gesture
,
&
PointerHoldGesture
::
started
);
QVERIFY
(
startSpy
.
isValid
());
QSignalSpy
endSpy
(
&
gesture
,
&
PointerHoldGesture
::
ended
);
...
...
@@ -1139,7 +1138,7 @@ void TestWaylandSeat::testPointerHoldGesture()
QVERIFY
(
surfaceCreatedSpy
.
isValid
());
QScopedPointer
<
Surface
>
surface
(
m_compositor
->
createSurface
());
QVERIFY
(
surfaceCreatedSpy
.
wait
());
auto
serverSurface
=
surfaceCreatedSpy
.
first
().
first
().
value
<
SurfaceInterface
*>
();
auto
serverSurface
=
surfaceCreatedSpy
.
first
().
first
().
value
<
SurfaceInterface
*>
();
QVERIFY
(
serverSurface
);
QImage
image
(
QSize
(
100
,
100
),
QImage
::
Format_ARGB32_Premultiplied
);
...
...
@@ -1162,7 +1161,7 @@ void TestWaylandSeat::testPointerHoldGesture()
QCOMPARE
(
startSpy
.
count
(),
1
);
QCOMPARE
(
startSpy
.
first
().
at
(
0
).
value
<
quint32
>
(),
m_display
->
serial
());
QCOMPARE
(
startSpy
.
first
().
at
(
1
).
value
<
quint32
>
(),
1u
);
QCOMPARE
(
startSpy
.
first
().
at
(
2
).
value
<
void
*>
(),
*
surface
.
get
());
QCOMPARE
(
startSpy
.
first
().
at
(
2
).
value
<
void
*>
(),
*
surface
.
get
());
QCOMPARE
(
startSpy
.
first
().
at
(
3
).
value
<
quint32
>
(),
3
);
// another start should not be possible
...
...
src/wayland/autotests/client/test_wayland_slide.cpp
View file @
227ab071
...
...
@@ -107,10 +107,10 @@ void TestSlide::init()
void
TestSlide
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
CLEANUP
(
m_slideManager
)
...
...
src/wayland/autotests/client/test_xdg_foreign.cpp
View file @
227ab071
...
...
@@ -140,10 +140,10 @@ void TestForeign::init()
void
TestForeign
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_compositor
)
...
...
src/wayland/autotests/client/test_xdg_shell.cpp
View file @
227ab071
...
...
@@ -75,14 +75,14 @@ private:
Seat
*
m_seat
=
nullptr
;
};
#define SURFACE
\
QSignalSpy xdgSurfaceCreatedSpy(m_xdgShellInterface, &XdgShellInterface::toplevelCreated);
\
QVERIFY(xdgSurfaceCreatedSpy.isValid());
\
QScopedPointer<Surface> surface(m_compositor->createSurface());
\
QScopedPointer<XdgShellSurface> xdgSurface(m_xdgShell->createSurface(surface.data()));
\
QCOMPARE(xdgSurface->size(), QSize());
\
QVERIFY(xdgSurfaceCreatedSpy.wait());
\
auto serverXdgToplevel = xdgSurfaceCreatedSpy.first().first().value<XdgToplevelInterface *>();
\
#define SURFACE \
QSignalSpy xdgSurfaceCreatedSpy(m_xdgShellInterface, &XdgShellInterface::toplevelCreated); \
QVERIFY(xdgSurfaceCreatedSpy.isValid()); \
QScopedPointer<Surface> surface(m_compositor->createSurface()); \
QScopedPointer<XdgShellSurface> xdgSurface(m_xdgShell->createSurface(surface.data())); \
QCOMPARE(xdgSurface->size(), QSize()); \
QVERIFY(xdgSurfaceCreatedSpy.wait()); \
auto serverXdgToplevel = xdgSurfaceCreatedSpy.first().first().value<XdgToplevelInterface *>(); \
QVERIFY(serverXdgToplevel);
void
XdgShellTest
::
init
()
...
...
@@ -164,10 +164,10 @@ void XdgShellTest::init()
void
XdgShellTest
::
cleanup
()
{
#define CLEANUP(variable)
\
if (variable) {
\
delete variable;
\
variable = nullptr;
\
#define CLEANUP(variable) \
if (variable) { \
delete variable; \
variable = nullptr; \
}
CLEANUP
(
m_xdgShell
)
CLEANUP
(
m_compositor
)
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment