Commit 190d72b1 authored by ivan tkachenko's avatar ivan tkachenko Committed by Nate Graham
Browse files

[dataengines/powermanagement] Rename batteryType method

...to clarify its purpose and return type.
parent a523e107
......@@ -231,7 +231,7 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name)
setData(source, QStringLiteral("Vendor"), deviceBattery.vendor());
setData(source, QStringLiteral("Product"), deviceBattery.product());
setData(source, QStringLiteral("Capacity"), battery->capacity());
setData(source, QStringLiteral("Type"), batteryType(battery));
setData(source, QStringLiteral("Type"), batteryTypeToString(battery));
}
updateBatteryNames();
......@@ -474,7 +474,7 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name)
return true;
}
QString PowermanagementEngine::batteryType(const Solid::Battery *battery) const
QString PowermanagementEngine::batteryTypeToString(const Solid::Battery *battery) const
{
switch (battery->type()) {
case Solid::Battery::PrimaryBattery:
......@@ -752,7 +752,7 @@ void PowermanagementEngine::deviceAdded(const QString &udi)
setData(source, QStringLiteral("Vendor"), device.vendor());
setData(source, QStringLiteral("Product"), device.product());
setData(source, QStringLiteral("Capacity"), battery->capacity());
setData(source, QStringLiteral("Type"), batteryType(battery));
setData(source, QStringLiteral("Type"), batteryTypeToString(battery));
setData(QStringLiteral("Battery"), QStringLiteral("Sources"), sourceNames);
setData(QStringLiteral("Battery"), QStringLiteral("Has Battery"), !sourceNames.isEmpty());
......
......@@ -68,7 +68,7 @@ private Q_SLOTS:
private:
void populateApplicationData(const QString &name, QString *prettyName, QString *icon);
QString batteryType(const Solid::Battery *battery) const;
QString batteryTypeToString(const Solid::Battery *battery) const;
QStringList basicSourceNames() const;
QString batteryStateToString(int newState) const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment