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
K
KScreen
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
1
Merge Requests
1
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
KScreen
Commits
cd306648
Commit
cd306648
authored
Oct 23, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Const'ify
parent
a87cec0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
kded/daemon.cpp
kded/daemon.cpp
+1
-1
kded/generator.cpp
kded/generator.cpp
+3
-3
kded/generator.h
kded/generator.h
+3
-3
kded/serializer.cpp
kded/serializer.cpp
+3
-2
No files found.
kded/daemon.cpp
View file @
cd306648
...
...
@@ -186,7 +186,7 @@ void KScreenDaemon::applyIdealConfig()
doApplyConfig
(
Generator
::
self
()
->
idealConfig
(
m_monitoredConfig
));
}
void
logConfig
(
const
KScreen
::
ConfigPtr
config
)
{
void
logConfig
(
const
KScreen
::
ConfigPtr
&
config
)
{
if
(
config
)
{
foreach
(
auto
o
,
config
->
outputs
())
{
if
(
o
->
isConnected
())
{
...
...
kded/generator.cpp
View file @
cd306648
...
...
@@ -625,7 +625,7 @@ KScreen::OutputPtr Generator::embeddedOutput(const KScreen::OutputList &outputs)
return
KScreen
::
OutputPtr
();
}
bool
Generator
::
isLaptop
()
bool
Generator
::
isLaptop
()
const
{
if
(
m_forceLaptop
)
{
return
true
;
...
...
@@ -637,7 +637,7 @@ bool Generator::isLaptop()
return
Device
::
self
()
->
isLaptop
();
}
bool
Generator
::
isLidClosed
()
bool
Generator
::
isLidClosed
()
const
{
if
(
m_forceLidClosed
)
{
return
true
;
...
...
@@ -649,7 +649,7 @@ bool Generator::isLidClosed()
return
Device
::
self
()
->
isLidClosed
();
}
bool
Generator
::
isDocked
()
bool
Generator
::
isDocked
()
const
{
if
(
m_forceDocked
)
{
return
true
;
...
...
kded/generator.h
View file @
cd306648
...
...
@@ -79,9 +79,9 @@ class Generator : public QObject
KScreen
::
OutputPtr
embeddedOutput
(
const
KScreen
::
OutputList
&
connectedOutputs
);
void
disableAllDisconnectedOutputs
(
const
KScreen
::
OutputList
&
connectedOutputs
);
bool
isLaptop
();
bool
isLidClosed
();
bool
isDocked
();
bool
isLaptop
()
const
;
bool
isLidClosed
()
const
;
bool
isDocked
()
const
;
bool
m_forceLaptop
;
bool
m_forceLidClosed
;
...
...
kded/serializer.cpp
View file @
cd306648
...
...
@@ -217,11 +217,12 @@ bool Serializer::moveConfig(const QString &srcId, const QString &destId)
KScreen
::
OutputPtr
Serializer
::
findOutput
(
const
KScreen
::
ConfigPtr
&
config
,
const
QVariantMap
&
info
)
{
KScreen
::
OutputList
outputs
=
config
->
outputs
();
// As individual outputs are indexed by a hash of their edid, which is not unique,
const
KScreen
::
OutputList
outputs
=
config
->
outputs
();
// As individual outputs are indexed by a hash of their edid, which is not unique,
// to be able to tell apart multiple identical outputs, these need special treatment
QStringList
duplicateIds
;
QStringList
allIds
;
Q_FOREACH
(
KScreen
::
OutputPtr
output
,
outputs
)
{
allIds
.
reserve
(
outputs
.
count
());
Q_FOREACH
(
const
KScreen
::
OutputPtr
&
output
,
outputs
)
{
const
auto
outputId
=
Serializer
::
outputId
(
output
);
if
(
allIds
.
contains
(
outputId
)
&&
!
duplicateIds
.
contains
(
outputId
))
{
duplicateIds
<<
outputId
;
...
...
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