Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libkscreen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
libkscreen
Commits
7d30357b
Commit
7d30357b
authored
Sep 19, 2017
by
Sebastian Kügler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test only changing the scale
parent
49503702
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
autotests/testkwaylandconfig.cpp
autotests/testkwaylandconfig.cpp
+36
-0
No files found.
autotests/testkwaylandconfig.cpp
View file @
7d30357b
...
...
@@ -51,6 +51,7 @@ private Q_SLOTS:
void
testPositionChange
();
void
testRotationChange
();
void
testRotationChange_data
();
void
testScaleChange
();
void
testModeChange
();
private:
...
...
@@ -197,6 +198,41 @@ void TestKWaylandConfig::testRotationChange()
}
void
TestKWaylandConfig
::
testScaleChange
()
{
auto
op
=
new
GetConfigOperation
();
QVERIFY
(
op
->
exec
());
auto
config
=
op
->
config
();
QVERIFY
(
config
);
auto
op2
=
new
GetConfigOperation
();
QVERIFY
(
op2
->
exec
());
auto
config2
=
op2
->
config
();
QVERIFY
(
config2
);
// Prepare monitor & spy
KScreen
::
ConfigMonitor
*
monitor
=
KScreen
::
ConfigMonitor
::
instance
();
monitor
->
addConfig
(
config
);
QSignalSpy
configSpy
(
monitor
,
&
KScreen
::
ConfigMonitor
::
configurationChanged
);
auto
output2
=
config2
->
outputs
()[
2
];
// is this id stable enough?
QCOMPARE
(
output2
->
scale
(),
1.0
);
auto
output
=
config
->
outputs
()[
2
];
// is this id stable enough?
output
->
setScale
(
2
);
QSignalSpy
serverSpy
(
m_server
,
&
WaylandTestServer
::
configChanged
);
auto
sop
=
new
SetConfigOperation
(
config
,
this
);
sop
->
exec
();
// fire and forget...
QVERIFY
(
configSpy
.
wait
());
// check if the server changed
QCOMPARE
(
serverSpy
.
count
(),
1
);
QCOMPARE
(
configSpy
.
count
(),
1
);
QCOMPARE
(
output2
->
scale
(),
2.0
);
}
void
TestKWaylandConfig
::
testModeChange
()
{
auto
op
=
new
GetConfigOperation
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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