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
S
Solid
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
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
Frameworks
Solid
Commits
ce9e93cc
Commit
ce9e93cc
authored
Jul 04, 2014
by
Kai Uwe Broulik
🍇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build on OSX
parent
182b27de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
src/solid/devices/backends/iokit/iokitbattery.cpp
src/solid/devices/backends/iokit/iokitbattery.cpp
+1
-1
src/solid/devices/backends/iokit/iokitbattery.h
src/solid/devices/backends/iokit/iokitbattery.h
+14
-2
No files found.
src/solid/devices/backends/iokit/iokitbattery.cpp
View file @
ce9e93cc
...
...
@@ -37,7 +37,7 @@ Battery::~Battery()
}
bool
Battery
::
isP
lugged
()
const
bool
Battery
::
isP
resent
()
const
{
return
m_device
->
property
(
QLatin1String
(
"ExternalConnected"
)).
toBool
();
}
...
...
src/solid/devices/backends/iokit/iokitbattery.h
View file @
ce9e93cc
...
...
@@ -41,7 +41,7 @@ public:
Battery
(
IOKitDevice
*
device
);
virtual
~
Battery
();
bool
isP
lugged
()
const
;
bool
isP
resent
()
const
;
Solid
::
Battery
::
BatteryType
type
()
const
;
int
chargePercent
()
const
;
...
...
@@ -53,10 +53,18 @@ public:
Solid
::
Battery
::
ChargeState
chargeState
()
const
;
// ### the ones below are TODO
qlonglong
timeToEmpty
()
const
{
return
0
;
}
qlonglong
timeToFull
()
const
{
return
0
;
}
Solid
::
Battery
::
Technology
technology
()
const
{
return
Solid
::
Battery
::
UnknownTechnology
;
}
double
energy
()
const
{
return
0.0
;
}
double
energyRate
()
const
{
return
0.0
;
}
double
voltage
()
const
{
return
0.0
;
}
double
temperature
()
const
{
return
0.0
;
}
bool
isRecalled
()
const
{
return
false
;
}
QString
recallVendor
()
const
{
return
QString
();
}
QString
recallUrl
()
const
{
return
QString
();
}
QString
serial
()
const
{
return
QString
();
}
Q_SIGNALS:
void
energyChanged
(
double
energy
,
const
QString
&
udi
);
...
...
@@ -64,8 +72,12 @@ Q_SIGNALS:
void
chargePercentChanged
(
int
value
,
const
QString
&
udi
);
void
capacityChanged
(
int
value
,
const
QString
&
udi
);
void
chargeStateChanged
(
int
newState
,
const
QString
&
udi
);
void
p
lug
StateChanged
(
bool
newState
,
const
QString
&
udi
);
void
p
resent
StateChanged
(
bool
newState
,
const
QString
&
udi
);
void
powerSupplyStateChanged
(
bool
newState
,
const
QString
&
udi
);
void
timeToEmptyChanged
(
qlonglong
time
,
const
QString
&
udi
);
void
timeToFullChanged
(
qlonglong
time
,
const
QString
&
udi
);
void
temperatureChanged
(
double
temperature
,
const
QString
&
udi
);
void
voltageChanged
(
double
voltage
,
const
QString
&
udi
);
};
}
}
...
...
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