Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWayland Server
Commits
50df14d4
Commit
50df14d4
authored
Feb 25, 2021
by
David Edmundson
Browse files
Port all connects
This is mostly all automatic from clazy, though it got confused by a few namespace issues.
parent
6f706ed6
Pipeline
#52287
passed with stage
in 7 minutes and 11 seconds
Changes
19
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
autotests/client/test_compositor.cpp
View file @
50df14d4
...
...
@@ -59,7 +59,7 @@ void TestCompositor::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -70,7 +70,7 @@ void TestCompositor::init()
QVERIFY
(
connectedSpy
.
wait
());
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
compositorSpy
(
&
registry
,
SIGNAL
(
compositorAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
compositorSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
compositorAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
@@ -106,7 +106,7 @@ void TestCompositor::testDestroy()
connect
(
m_connection
,
&
ConnectionThread
::
connectionDied
,
m_compositor
,
&
Compositor
::
destroy
);
QVERIFY
(
m_compositor
->
isValid
());
QSignalSpy
connectionDiedSpy
(
m_connection
,
SIGNAL
(
connectionDied
())
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connectionDied
);
QVERIFY
(
connectionDiedSpy
.
isValid
());
delete
m_display
;
m_display
=
nullptr
;
...
...
@@ -123,7 +123,7 @@ void TestCompositor::testCast()
{
using
namespace
KWayland
::
Client
;
Registry
registry
;
QSignalSpy
compositorSpy
(
&
registry
,
SIGNAL
(
compositorAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
compositorSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
compositorAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
autotests/client/test_datadevice.cpp
View file @
50df14d4
...
...
@@ -73,7 +73,7 @@ void TestDataDevice::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -89,11 +89,11 @@ void TestDataDevice::init()
QVERIFY
(
m_queue
->
isValid
());
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
dataDeviceManagerSpy
(
&
registry
,
SIGNAL
(
dataDeviceManagerAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
dataDeviceManagerSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
dataDeviceManagerAnnounced
);
QVERIFY
(
dataDeviceManagerSpy
.
isValid
());
QSignalSpy
seatSpy
(
&
registry
,
SIGNAL
(
seatAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
seatSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
seatAnnounced
);
QVERIFY
(
seatSpy
.
isValid
());
QSignalSpy
compositorSpy
(
&
registry
,
SIGNAL
(
compositorAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
compositorSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
compositorAnnounced
);
QVERIFY
(
compositorSpy
.
isValid
());
QVERIFY
(
!
registry
.
eventQueue
());
registry
.
setEventQueue
(
m_queue
);
...
...
@@ -117,7 +117,7 @@ void TestDataDevice::init()
m_seat
=
registry
.
createSeat
(
seatSpy
.
first
().
first
().
value
<
quint32
>
(),
seatSpy
.
first
().
last
().
value
<
quint32
>
(),
this
);
QVERIFY
(
m_seat
->
isValid
());
QSignalSpy
pointerChangedSpy
(
m_seat
,
SIGNAL
(
hasPointerChanged
(
bool
))
);
QSignalSpy
pointerChangedSpy
(
m_seat
,
&
KWayland
::
Client
::
Seat
::
hasPointerChanged
);
QVERIFY
(
pointerChangedSpy
.
isValid
());
QVERIFY
(
pointerChangedSpy
.
wait
());
...
...
@@ -164,7 +164,7 @@ void TestDataDevice::testCreate()
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataDeviceCreated
(
KWaylandServer
::
DataDeviceInterface
*
))
);
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDevice
Manager
Interface
::
dataDeviceCreated
);
QVERIFY
(
dataDeviceCreatedSpy
.
isValid
());
QScopedPointer
<
DataDevice
>
dataDevice
(
m_dataDeviceManager
->
getDataDevice
(
m_seat
));
...
...
@@ -211,7 +211,7 @@ void TestDataDevice::testDrag()
using
namespace
KWaylandServer
;
QScopedPointer
<
Pointer
>
pointer
(
m_seat
->
createPointer
());
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataDeviceCreated
(
KWaylandServer
::
DataDeviceInterface
*
))
);
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDevice
Manager
Interface
::
dataDeviceCreated
);
QVERIFY
(
dataDeviceCreatedSpy
.
isValid
());
QScopedPointer
<
DataDevice
>
dataDevice
(
m_dataDeviceManager
->
getDataDevice
(
m_seat
));
...
...
@@ -222,7 +222,7 @@ void TestDataDevice::testDrag()
auto
deviceInterface
=
dataDeviceCreatedSpy
.
first
().
first
().
value
<
DataDeviceInterface
*>
();
QVERIFY
(
deviceInterface
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataDeviceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
...
...
@@ -233,7 +233,7 @@ void TestDataDevice::testDrag()
auto
sourceInterface
=
dataSourceCreatedSpy
.
first
().
first
().
value
<
DataSourceInterface
*>
();
QVERIFY
(
sourceInterface
);
QSignalSpy
surfaceCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
surfaceCreated
(
KWaylandServer
::
SurfaceInterface
*
))
);
QSignalSpy
surfaceCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
surfaceCreated
);
QVERIFY
(
surfaceCreatedSpy
.
isValid
());
QScopedPointer
<
Surface
>
surface
(
m_compositor
->
createSurface
());
...
...
@@ -244,7 +244,7 @@ void TestDataDevice::testDrag()
auto
surfaceInterface
=
surfaceCreatedSpy
.
first
().
first
().
value
<
SurfaceInterface
*>
();
// now we have all we need to start a drag operation
QSignalSpy
dragStartedSpy
(
deviceInterface
,
SIGNAL
(
dragStarted
())
);
QSignalSpy
dragStartedSpy
(
deviceInterface
,
&
KWaylandServer
::
DataDeviceInterface
::
dragStarted
);
QVERIFY
(
dragStartedSpy
.
isValid
());
// first we need to fake the pointer enter
...
...
@@ -294,7 +294,7 @@ void TestDataDevice::testDragInternally()
using
namespace
KWaylandServer
;
QScopedPointer
<
Pointer
>
pointer
(
m_seat
->
createPointer
());
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataDeviceCreated
(
KWaylandServer
::
DataDeviceInterface
*
))
);
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDevice
Manager
Interface
::
dataDeviceCreated
);
QVERIFY
(
dataDeviceCreatedSpy
.
isValid
());
QScopedPointer
<
DataDevice
>
dataDevice
(
m_dataDeviceManager
->
getDataDevice
(
m_seat
));
...
...
@@ -305,7 +305,7 @@ void TestDataDevice::testDragInternally()
auto
deviceInterface
=
dataDeviceCreatedSpy
.
first
().
first
().
value
<
DataDeviceInterface
*>
();
QVERIFY
(
deviceInterface
);
QSignalSpy
surfaceCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
surfaceCreated
(
KWaylandServer
::
SurfaceInterface
*
))
);
QSignalSpy
surfaceCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
surfaceCreated
);
QVERIFY
(
surfaceCreatedSpy
.
isValid
());
QScopedPointer
<
Surface
>
surface
(
m_compositor
->
createSurface
());
...
...
@@ -323,7 +323,7 @@ void TestDataDevice::testDragInternally()
auto
iconSurfaceInterface
=
surfaceCreatedSpy
.
last
().
first
().
value
<
SurfaceInterface
*>
();
// now we have all we need to start a drag operation
QSignalSpy
dragStartedSpy
(
deviceInterface
,
SIGNAL
(
dragStarted
())
);
QSignalSpy
dragStartedSpy
(
deviceInterface
,
&
KWaylandServer
::
DataDeviceInterface
::
dragStarted
);
QVERIFY
(
dragStartedSpy
.
isValid
());
// first we need to fake the pointer enter
...
...
@@ -366,7 +366,7 @@ void TestDataDevice::testSetSelection()
using
namespace
KWaylandServer
;
QScopedPointer
<
Pointer
>
pointer
(
m_seat
->
createPointer
());
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataDeviceCreated
(
KWaylandServer
::
DataDeviceInterface
*
))
);
QSignalSpy
dataDeviceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDevice
Manager
Interface
::
dataDeviceCreated
);
QVERIFY
(
dataDeviceCreatedSpy
.
isValid
());
QScopedPointer
<
DataDevice
>
dataDevice
(
m_dataDeviceManager
->
getDataDevice
(
m_seat
));
...
...
@@ -377,7 +377,7 @@ void TestDataDevice::testSetSelection()
auto
deviceInterface
=
dataDeviceCreatedSpy
.
first
().
first
().
value
<
DataDeviceInterface
*>
();
QVERIFY
(
deviceInterface
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataDeviceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
...
...
@@ -390,9 +390,9 @@ void TestDataDevice::testSetSelection()
QVERIFY
(
sourceInterface
);
// everything setup, now we can test setting the selection
QSignalSpy
selectionChangedSpy
(
deviceInterface
,
SIGNAL
(
selectionChanged
(
KWaylandServer
::
Data
Sour
ceInterface
*
))
);
QSignalSpy
selectionChangedSpy
(
deviceInterface
,
&
KWaylandServer
::
Data
Devi
ceInterface
::
selectionChanged
);
QVERIFY
(
selectionChangedSpy
.
isValid
());
QSignalSpy
selectionClearedSpy
(
deviceInterface
,
SIGNAL
(
selectionCleared
())
);
QSignalSpy
selectionClearedSpy
(
deviceInterface
,
&
KWaylandServer
::
DataDeviceInterface
::
selectionCleared
);
QVERIFY
(
selectionClearedSpy
.
isValid
());
QVERIFY
(
!
deviceInterface
->
selection
());
...
...
@@ -404,7 +404,7 @@ void TestDataDevice::testSetSelection()
QCOMPARE
(
deviceInterface
->
selection
(),
sourceInterface
);
// send selection to datadevice
QSignalSpy
selectionOfferedSpy
(
dataDevice
.
data
(),
SIGNAL
(
selectionOffered
(
KWayland
::
Client
::
DataOffer
*
))
);
QSignalSpy
selectionOfferedSpy
(
dataDevice
.
data
(),
&
KWayland
::
Client
::
Data
Device
::
selection
Offer
ed
);
QVERIFY
(
selectionOfferedSpy
.
isValid
());
deviceInterface
->
sendSelection
(
deviceInterface
->
selection
());
QVERIFY
(
selectionOfferedSpy
.
wait
());
...
...
@@ -415,7 +415,7 @@ void TestDataDevice::testSetSelection()
QCOMPARE
(
dataOffer
->
offeredMimeTypes
().
first
().
name
(),
QStringLiteral
(
"text/plain"
));
// sending a new mimetype to the selection, should be announced in the offer
QSignalSpy
mimeTypeAddedSpy
(
dataOffer
,
SIGNAL
(
mimeTypeOffered
(
QString
))
);
QSignalSpy
mimeTypeAddedSpy
(
dataOffer
,
&
KWayland
::
Client
::
DataOffer
::
mimeTypeOffered
);
QVERIFY
(
mimeTypeAddedSpy
.
isValid
());
dataSource
->
offer
(
QStringLiteral
(
"text/html"
));
QVERIFY
(
mimeTypeAddedSpy
.
wait
());
...
...
@@ -606,7 +606,7 @@ void TestDataDevice::testDestroy()
connect
(
m_connection
,
&
ConnectionThread
::
connectionDied
,
dataDevice
.
data
(),
&
DataDevice
::
destroy
);
connect
(
m_connection
,
&
ConnectionThread
::
connectionDied
,
m_queue
,
&
EventQueue
::
destroy
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
SIGNAL
(
connectionDied
())
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connectionDied
);
QVERIFY
(
connectionDiedSpy
.
isValid
());
delete
m_display
;
m_display
=
nullptr
;
...
...
autotests/client/test_datasource.cpp
View file @
50df14d4
...
...
@@ -55,7 +55,7 @@ void TestDataSource::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -71,7 +71,7 @@ void TestDataSource::init()
QVERIFY
(
m_queue
->
isValid
());
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
dataDeviceManagerSpy
(
&
registry
,
SIGNAL
(
dataDeviceManagerAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
dataDeviceManagerSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
dataDeviceManagerAnnounced
);
QVERIFY
(
dataDeviceManagerSpy
.
isValid
());
QVERIFY
(
!
registry
.
eventQueue
());
registry
.
setEventQueue
(
m_queue
);
...
...
@@ -116,7 +116,7 @@ void TestDataSource::testOffer()
using
namespace
KWaylandServer
;
qRegisterMetaType
<
KWaylandServer
::
DataSourceInterface
*>
();
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataSourceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
...
...
@@ -129,7 +129,7 @@ void TestDataSource::testOffer()
QVERIFY
(
!
serverDataSource
.
isNull
());
QCOMPARE
(
serverDataSource
->
mimeTypes
().
count
(),
0
);
QSignalSpy
offeredSpy
(
serverDataSource
.
data
(),
SIGNAL
(
mimeTypeOffered
(
QString
))
);
QSignalSpy
offeredSpy
(
serverDataSource
.
data
(),
&
KWaylandServer
::
AbstractDataSource
::
mimeTypeOffered
);
QVERIFY
(
offeredSpy
.
isValid
());
const
QString
plain
=
QStringLiteral
(
"text/plain"
);
...
...
@@ -174,13 +174,13 @@ void TestDataSource::testTargetAccepts()
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataSourceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
QVERIFY
(
dataSource
->
isValid
());
QSignalSpy
targetAcceptsSpy
(
dataSource
.
data
(),
SIGNAL
(
targetAccepts
(
QString
))
);
QSignalSpy
targetAcceptsSpy
(
dataSource
.
data
(),
&
KWayland
::
Client
::
DataSource
::
targetAccepts
);
QVERIFY
(
targetAcceptsSpy
.
isValid
());
QVERIFY
(
dataSourceCreatedSpy
.
wait
());
...
...
@@ -199,12 +199,12 @@ void TestDataSource::testRequestSend()
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataSourceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
QVERIFY
(
dataSource
->
isValid
());
QSignalSpy
sendRequestedSpy
(
dataSource
.
data
(),
SIGNAL
(
sendDataRequested
(
QString
,
qint32
))
);
QSignalSpy
sendRequestedSpy
(
dataSource
.
data
(),
&
KWayland
::
Client
::
DataSource
::
sendDataRequested
);
QVERIFY
(
sendRequestedSpy
.
isValid
());
const
QString
plain
=
QStringLiteral
(
"text/plain"
);
...
...
@@ -230,12 +230,12 @@ void TestDataSource::testCancel()
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataSourceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
QVERIFY
(
dataSource
->
isValid
());
QSignalSpy
cancelledSpy
(
dataSource
.
data
(),
SIGNAL
(
cancelled
())
);
QSignalSpy
cancelledSpy
(
dataSource
.
data
(),
&
KWayland
::
Client
::
DataSource
::
cancelled
);
QVERIFY
(
cancelledSpy
.
isValid
());
QVERIFY
(
dataSourceCreatedSpy
.
wait
());
...
...
@@ -252,7 +252,7 @@ void TestDataSource::testServerGet()
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
SIGNAL
(
dataSourceCreated
(
KWaylandServer
::
DataSourceInterface
*
))
);
QSignalSpy
dataSourceCreatedSpy
(
m_dataDeviceManagerInterface
,
&
KWaylandServer
::
DataDeviceManagerInterface
::
dataSourceCreated
);
QVERIFY
(
dataSourceCreatedSpy
.
isValid
());
QScopedPointer
<
DataSource
>
dataSource
(
m_dataDeviceManager
->
createDataSource
());
...
...
@@ -277,7 +277,7 @@ void TestDataSource::testDestroy()
connect
(
m_connection
,
&
ConnectionThread
::
connectionDied
,
m_queue
,
&
EventQueue
::
destroy
);
connect
(
m_connection
,
&
ConnectionThread
::
connectionDied
,
dataSource
.
data
(),
&
DataSource
::
destroy
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
SIGNAL
(
connectionDied
())
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connectionDied
);
QVERIFY
(
connectionDiedSpy
.
isValid
());
delete
m_display
;
m_display
=
nullptr
;
...
...
autotests/client/test_plasma_virtual_desktop.cpp
View file @
50df14d4
...
...
@@ -106,7 +106,7 @@ void TestVirtualDesktop::init()
QSignalSpy
plasmaVirtualDesktopManagementSpy
(
&
registry
,
&
Registry
::
plasmaVirtualDesktopManagementAnnounced
);
QVERIFY
(
plasmaVirtualDesktopManagementSpy
.
isValid
());
QSignalSpy
windowManagementSpy
(
&
registry
,
SIGNAL
(
plasmaWindowManagementAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
windowManagementSpy
(
&
registry
,
&
Registry
::
plasmaWindowManagementAnnounced
);
QVERIFY
(
windowManagementSpy
.
isValid
());
QVERIFY
(
!
registry
.
eventQueue
());
...
...
@@ -131,13 +131,13 @@ void TestVirtualDesktop::init()
QVERIFY
(
windowManagementSpy
.
wait
());
m_windowManagement
=
registry
.
createPlasmaWindowManagement
(
windowManagementSpy
.
first
().
first
().
value
<
quint32
>
(),
windowManagementSpy
.
first
().
last
().
value
<
quint32
>
(),
this
);
QSignalSpy
windowSpy
(
m_windowManagement
,
SIGNAL
(
windowCreated
(
KWayland
::
Client
::
PlasmaWindow
*
))
);
QSignalSpy
windowSpy
(
m_windowManagement
,
&
PlasmaWindowManagement
::
windowCreated
);
QVERIFY
(
windowSpy
.
isValid
());
m_windowInterface
=
m_windowManagementInterface
->
createWindow
(
this
,
QUuid
::
createUuid
());
m_windowInterface
->
setPid
(
1337
);
QVERIFY
(
windowSpy
.
wait
());
m_window
=
windowSpy
.
first
().
first
().
value
<
KWayland
::
Client
::
PlasmaWindow
*>
();
m_window
=
windowSpy
.
first
().
first
().
value
<
PlasmaWindow
*>
();
}
void
TestVirtualDesktop
::
cleanup
()
...
...
autotests/client/test_server_side_decoration_palette.cpp
View file @
50df14d4
...
...
@@ -135,7 +135,7 @@ void TestServerSideDecorationPalette::cleanup()
void
TestServerSideDecorationPalette
::
testCreateAndSet
()
{
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
SIGNAL
(
surfaceCreated
(
KWaylandServer
::
SurfaceInterface
*
))
);
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
surfaceCreated
);
QVERIFY
(
serverSurfaceCreated
.
isValid
());
QScopedPointer
<
KWayland
::
Client
::
Surface
>
surface
(
m_compositor
->
createSurface
());
...
...
autotests/client/test_shm_pool.cpp
View file @
50df14d4
...
...
@@ -66,7 +66,7 @@ void TestShmPool::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -77,7 +77,7 @@ void TestShmPool::init()
QVERIFY
(
connectedSpy
.
wait
());
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
shmSpy
(
&
registry
,
SIGNAL
(
shmAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
shmSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
shmAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
@@ -215,7 +215,7 @@ void TestShmPool::testDestroy()
// let's create one Buffer
m_shmPool
->
getBuffer
(
QSize
(
10
,
10
),
8
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
SIGNAL
(
connectionDied
())
);
QSignalSpy
connectionDiedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connectionDied
);
QVERIFY
(
connectionDiedSpy
.
isValid
());
delete
m_display
;
m_display
=
nullptr
;
...
...
autotests/client/test_wayland_appmenu.cpp
View file @
50df14d4
...
...
@@ -138,7 +138,7 @@ void TestAppmenu::cleanup()
void
TestAppmenu
::
testCreateAndSet
()
{
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
SIGNAL
(
surfaceCreated
(
KWaylandServer
::
SurfaceInterface
*
))
);
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
surfaceCreated
);
QVERIFY
(
serverSurfaceCreated
.
isValid
());
QScopedPointer
<
KWayland
::
Client
::
Surface
>
surface
(
m_compositor
->
createSurface
());
...
...
autotests/client/test_wayland_blur.cpp
View file @
50df14d4
...
...
@@ -136,14 +136,14 @@ void TestBlur::cleanup()
void
TestBlur
::
testCreate
()
{
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
SIGNAL
(
surfaceCreated
(
KWaylandServer
::
SurfaceInterface
*
))
);
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
surfaceCreated
);
QVERIFY
(
serverSurfaceCreated
.
isValid
());
QScopedPointer
<
KWayland
::
Client
::
Surface
>
surface
(
m_compositor
->
createSurface
());
QVERIFY
(
serverSurfaceCreated
.
wait
());
auto
serverSurface
=
serverSurfaceCreated
.
first
().
first
().
value
<
KWaylandServer
::
SurfaceInterface
*>
();
QSignalSpy
blurChanged
(
serverSurface
,
SIGNAL
(
blurChanged
())
);
QSignalSpy
blurChanged
(
serverSurface
,
&
KWaylandServer
::
SurfaceInterface
::
blurChanged
);
auto
blur
=
m_blurManager
->
createBlur
(
surface
.
data
(),
surface
.
data
());
blur
->
setRegion
(
m_compositor
->
createRegion
(
QRegion
(
0
,
0
,
10
,
20
),
nullptr
));
...
...
autotests/client/test_wayland_contrast.cpp
View file @
50df14d4
...
...
@@ -70,7 +70,7 @@ void TestContrast::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -139,14 +139,14 @@ void TestContrast::cleanup()
void
TestContrast
::
testCreate
()
{
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
SIGNAL
(
surfaceCreated
(
KWaylandServer
::
SurfaceInterface
*
))
);
QSignalSpy
serverSurfaceCreated
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
surfaceCreated
);
QVERIFY
(
serverSurfaceCreated
.
isValid
());
QScopedPointer
<
KWayland
::
Client
::
Surface
>
surface
(
m_compositor
->
createSurface
());
QVERIFY
(
serverSurfaceCreated
.
wait
());
auto
serverSurface
=
serverSurfaceCreated
.
first
().
first
().
value
<
KWaylandServer
::
SurfaceInterface
*>
();
QSignalSpy
contrastChanged
(
serverSurface
,
SIGNAL
(
contrastChanged
())
);
QSignalSpy
contrastChanged
(
serverSurface
,
&
KWaylandServer
::
SurfaceInterface
::
contrastChanged
);
auto
contrast
=
m_contrastManager
->
createContrast
(
surface
.
data
(),
surface
.
data
());
contrast
->
setRegion
(
m_compositor
->
createRegion
(
QRegion
(
0
,
0
,
10
,
20
),
nullptr
));
...
...
autotests/client/test_wayland_output.cpp
View file @
50df14d4
...
...
@@ -87,7 +87,7 @@ void TestWaylandOutput::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -148,7 +148,7 @@ void TestWaylandOutput::testRegistry()
QCOMPARE
(
physicalSizeChangedSpy
.
count
(),
1
);
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
announced
(
&
registry
,
SIGNAL
(
outputAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
announced
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
outputAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
@@ -168,7 +168,7 @@ void TestWaylandOutput::testRegistry()
QCOMPARE
(
output
.
subPixel
(),
KWayland
::
Client
::
Output
::
SubPixel
::
Unknown
);
QCOMPARE
(
output
.
transform
(),
KWayland
::
Client
::
Output
::
Transform
::
Normal
);
QSignalSpy
outputChanged
(
&
output
,
SIGNAL
(
changed
())
);
QSignalSpy
outputChanged
(
&
output
,
&
KWayland
::
Client
::
Output
::
changed
);
QVERIFY
(
outputChanged
.
isValid
());
auto
o
=
registry
.
bindOutput
(
announced
.
first
().
first
().
value
<
quint32
>
(),
announced
.
first
().
last
().
value
<
quint32
>
());
...
...
@@ -210,7 +210,7 @@ void TestWaylandOutput::testModeChanges()
using
namespace
KWayland
::
Client
;
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
announced
(
&
registry
,
SIGNAL
(
outputAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
announced
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
outputAnnounced
);
registry
.
setEventQueue
(
m_queue
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
...
...
@@ -219,9 +219,9 @@ void TestWaylandOutput::testModeChanges()
QVERIFY
(
announced
.
wait
());
KWayland
::
Client
::
Output
output
;
QSignalSpy
outputChanged
(
&
output
,
SIGNAL
(
changed
())
);
QSignalSpy
outputChanged
(
&
output
,
&
KWayland
::
Client
::
Output
::
changed
);
QVERIFY
(
outputChanged
.
isValid
());
QSignalSpy
modeAddedSpy
(
&
output
,
SIGNAL
(
modeAdded
(
KWayland
::
Client
::
Output
::
M
ode
))
);
QSignalSpy
modeAddedSpy
(
&
output
,
&
KWayland
::
Client
::
Output
::
m
ode
Added
);
QVERIFY
(
modeAddedSpy
.
isValid
());
output
.
setup
(
registry
.
bindOutput
(
announced
.
first
().
first
().
value
<
quint32
>
(),
announced
.
first
().
last
().
value
<
quint32
>
()));
wl_display_flush
(
m_connection
->
display
());
...
...
@@ -303,7 +303,7 @@ void TestWaylandOutput::testModeChanges()
void
TestWaylandOutput
::
testScaleChange
()
{
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
announced
(
&
registry
,
SIGNAL
(
outputAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
announced
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
outputAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
@@ -311,7 +311,7 @@ void TestWaylandOutput::testScaleChange()
QVERIFY
(
announced
.
wait
());
KWayland
::
Client
::
Output
output
;
QSignalSpy
outputChanged
(
&
output
,
SIGNAL
(
changed
())
);
QSignalSpy
outputChanged
(
&
output
,
&
KWayland
::
Client
::
Output
::
changed
);
QVERIFY
(
outputChanged
.
isValid
());
output
.
setup
(
registry
.
bindOutput
(
announced
.
first
().
first
().
value
<
quint32
>
(),
announced
.
first
().
last
().
value
<
quint32
>
()));
wl_display_flush
(
m_connection
->
display
());
...
...
@@ -370,7 +370,7 @@ void TestWaylandOutput::testSubPixel()
QCOMPARE
(
serverSubPixelChangedSpy
.
count
(),
1
);
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
announced
(
&
registry
,
SIGNAL
(
outputAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
announced
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
outputAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
@@ -378,7 +378,7 @@ void TestWaylandOutput::testSubPixel()
QVERIFY
(
announced
.
wait
());
KWayland
::
Client
::
Output
output
;
QSignalSpy
outputChanged
(
&
output
,
SIGNAL
(
changed
())
);
QSignalSpy
outputChanged
(
&
output
,
&
KWayland
::
Client
::
Output
::
changed
);
QVERIFY
(
outputChanged
.
isValid
());
output
.
setup
(
registry
.
bindOutput
(
announced
.
first
().
first
().
value
<
quint32
>
(),
announced
.
first
().
last
().
value
<
quint32
>
()));
wl_display_flush
(
m_connection
->
display
());
...
...
@@ -431,7 +431,7 @@ void TestWaylandOutput::testTransform()
QCOMPARE
(
serverTransformChangedSpy
.
count
(),
1
);
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
announced
(
&
registry
,
SIGNAL
(
outputAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
announced
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
outputAnnounced
);
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
...
...
@@ -439,7 +439,7 @@ void TestWaylandOutput::testTransform()
QVERIFY
(
announced
.
wait
());
KWayland
::
Client
::
Output
*
output
=
registry
.
createOutput
(
announced
.
first
().
first
().
value
<
quint32
>
(),
announced
.
first
().
last
().
value
<
quint32
>
(),
&
registry
);
QSignalSpy
outputChanged
(
output
,
SIGNAL
(
changed
())
);
QSignalSpy
outputChanged
(
output
,
&
KWayland
::
Client
::
Output
::
changed
);
QVERIFY
(
outputChanged
.
isValid
());
wl_display_flush
(
m_connection
->
display
());
if
(
outputChanged
.
isEmpty
())
{
...
...
autotests/client/test_wayland_region.cpp
View file @
50df14d4
...
...
@@ -65,7 +65,7 @@ void TestRegion::init()
// setup connection
m_connection
=
new
KWayland
::
Client
::
ConnectionThread
;
QSignalSpy
connectedSpy
(
m_connection
,
SIGNAL
(
connected
())
);
QSignalSpy
connectedSpy
(
m_connection
,
&
KWayland
::
Client
::
ConnectionThread
::
connected
);
m_connection
->
setSocketName
(
s_socketName
);
m_thread
=
new
QThread
(
this
);
...
...
@@ -81,7 +81,7 @@ void TestRegion::init()
QVERIFY
(
m_queue
->
isValid
());
KWayland
::
Client
::
Registry
registry
;
QSignalSpy
compositorSpy
(
&
registry
,
SIGNAL
(
compositorAnnounced
(
quint32
,
quint32
))
);
QSignalSpy
compositorSpy
(
&
registry
,
&
KWayland
::
Client
::
Registry
::
compositorAnnounced
);
QVERIFY
(
compositorSpy
.
isValid
());
QVERIFY
(
!
registry
.
eventQueue
());
registry
.
setEventQueue
(
m_queue
);
...
...
@@ -122,7 +122,7 @@ void TestRegion::testCreate()
{
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
regionCreated
(
KWaylandServer
::
RegionInterface
*
))
);
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
regionCreated
);
QVERIFY
(
regionCreatedSpy
.
isValid
());
QScopedPointer
<
Region
>
region
(
m_compositor
->
createRegion
());
...
...
@@ -139,7 +139,7 @@ void TestRegion::testCreateWithRegion()
{
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
regionCreated
(
KWaylandServer
::
RegionInterface
*
))
);
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
regionCreated
);
QVERIFY
(
regionCreatedSpy
.
isValid
());
QScopedPointer
<
Region
>
region
(
m_compositor
->
createRegion
(
QRegion
(
0
,
0
,
10
,
20
),
nullptr
));
...
...
@@ -156,7 +156,7 @@ void TestRegion::testCreateUniquePtr()
{
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
regionCreated
(
KWaylandServer
::
RegionInterface
*
))
);
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
regionCreated
);
QVERIFY
(
regionCreatedSpy
.
isValid
());
std
::
unique_ptr
<
Region
>
region
(
m_compositor
->
createRegion
(
QRegion
(
0
,
0
,
10
,
20
)));
...
...
@@ -173,14 +173,14 @@ void TestRegion::testAdd()
{
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
regionCreated
(
KWaylandServer
::
RegionInterface
*
))
);
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
regionCreated
);
QVERIFY
(
regionCreatedSpy
.
isValid
());
QScopedPointer
<
Region
>
region
(
m_compositor
->
createRegion
());
QVERIFY
(
regionCreatedSpy
.
wait
());
auto
serverRegion
=
regionCreatedSpy
.
first
().
first
().
value
<
KWaylandServer
::
RegionInterface
*>
();
QSignalSpy
regionChangedSpy
(
serverRegion
,
SIGNAL
(
regionChanged
(
QRegion
))
);
QSignalSpy
regionChangedSpy
(
serverRegion
,
&
KWaylandServer
::
RegionInterface
::
regionChanged
);
QVERIFY
(
regionChangedSpy
.
isValid
());
// adding a QRect
...
...
@@ -208,14 +208,14 @@ void TestRegion::testRemove()
{
using
namespace
KWayland
::
Client
;
using
namespace
KWaylandServer
;
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
SIGNAL
(
regionCreated
(
KWaylandServer
::
RegionInterface
*
))
);
QSignalSpy
regionCreatedSpy
(
m_compositorInterface
,
&
KWaylandServer
::
CompositorInterface
::
regionCreated
);
QVERIFY
(
regionCreatedSpy
.
isValid
());