diff --git a/src/lockwidget.cpp b/src/lockwidget.cpp index 1f02d85..cafeb59 100644 --- a/src/lockwidget.cpp +++ b/src/lockwidget.cpp @@ -1909,29 +1909,6 @@ QString LockWidget::getBatteryIconName() return QString(); } -QString LockWidget::getBatteryIconName() -{ - if (iface->isValid() && dface->isValid()) { - bool batteryState = false; - QDBusReply reply = batInterface->call("Get", UPOWER_SERVICE, "OnBattery"); - if (reply.isValid()) { - batteryState = reply.value().toBool(); - } - double percentage = -1.0; - QDBusReply percentage_reply = iface->call("Get", UPOWER_DIVICES_SERVICE, "Percentage"); - if (percentage_reply.isValid()) { - percentage = percentage_reply.value().toDouble(); - } - - if (true == batteryState) { - return QString("battery-level-%1-symbolic").arg((int)percentage / 10 * 10); - } else { - return QString("battery-level-%1-charging-symbolic").arg((int)percentage / 10 * 10); - } - } - return QString(); -} - int LockWidget::getLoginedNum() { if(loginedNum != 0)