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
PowerDevil
Commits
94f81868
Commit
94f81868
authored
Apr 08, 2022
by
Serhii Hatsan
Browse files
Fix Commit
761fc8a4
parent
04815f45
Pipeline
#162808
passed with stage
in 1 minute and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
daemon/backends/upower/backlighthelper.cpp
View file @
94f81868
...
...
@@ -139,11 +139,11 @@ QStringList BacklightHelper::getBacklightTypeDevices() const
platform
.
append
(
BACKLIGHT_SYSFS_PATH
+
interface
);
}
else
if
(
buffer
==
"raw"
)
{
QFile
enabled
(
BACKLIGHT_SYSFS_PATH
+
interface
+
"/device/enabled"
);
rawAll
.
append
(
interface
);
rawAll
.
append
(
BACKLIGHT_SYSFS_PATH
+
interface
);
if
(
enabled
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
)
&&
enabled
.
readLine
().
trimmed
()
==
"enabled"
)
{
// this backlight device is connected to a display, so append
// it to rawEnabled list
rawEnabled
.
append
(
interface
);
rawEnabled
.
append
(
BACKLIGHT_SYSFS_PATH
+
interface
);
}
}
else
{
qCWarning
(
POWERDEVIL
)
<<
"Interface type not handled"
<<
buffer
;
...
...
@@ -173,8 +173,8 @@ void BacklightHelper::initUsingBacklightType()
QStringList
devices
=
getBacklightTypeDevices
();
for
(
const
QString
&
interface
:
devices
)
{
int
max_brightness
=
readFromDevice
(
BACKLIGHT_SYSFS_PATH
+
interface
,
"max_brightness"
);
m_devices
.
append
(
qMakePair
(
BACKLIGHT_SYSFS_PATH
+
interface
,
max_brightness
));
int
max_brightness
=
readFromDevice
(
interface
,
"max_brightness"
);
m_devices
.
append
(
qMakePair
(
interface
,
max_brightness
));
}
return
;
...
...
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