Commit a796d786 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Remove critical error notification

None of the backends emit it the signal anymore.
It is unlikely for the connect() to Battery's signals to fail.
No plugin being present is likely just a broken setup, it will still print to console.

Differential Revision: https://phabricator.kde.org/D20157
parent 806c4c07
......@@ -88,8 +88,6 @@ Core::~Core()
void Core::loadCore(BackendInterface* backend)
{
if (!backend) {
onBackendError(i18n("No valid Power Management backend plugins available. "
"A new installation might solve this problem."));
return;
}
......@@ -98,7 +96,6 @@ void Core::loadCore(BackendInterface* backend)
// Async backend init - so that KDED gets a bit of a speed up
qCDebug(POWERDEVIL) << "Core loaded, initializing backend";
connect(m_backend, SIGNAL(backendReady()), this, SLOT(onBackendReady()));
connect(m_backend, SIGNAL(backendError(QString)), this, SLOT(onBackendError(QString)));
m_backend->init();
}
......@@ -326,9 +323,7 @@ void Core::loadProfile(bool force)
}
if (!config.isValid()) {
emitNotification(QStringLiteral("powerdevilerror"), i18n("Profile \"%1\" has been selected "
"but does not exist.\nPlease check your PowerDevil configuration.",
profileId));
qCWarning(POWERDEVIL) << "Profile " << profileId << "has been selected but does not exist.";
return;
}
......@@ -431,12 +426,6 @@ void Core::onDeviceAdded(const QString &udi)
return;
}
if (!connect(b, &Battery::chargePercentChanged, this, &Core::onBatteryChargePercentChanged) ||
!connect(b, &Battery::chargeStateChanged, this, &Core::onBatteryChargeStateChanged)) {
emitNotification(QStringLiteral("powerdevilerror"), i18n("Could not connect to battery interface.\n"
"Please check your system configuration"));
}
qCDebug(POWERDEVIL) << "Battery with UDI" << udi << "was detected";
if (b->isPowerSupply()) {
......@@ -647,13 +636,6 @@ void Core::onAcAdapterStateChanged(PowerDevil::BackendInterface::AcAdapterState
}
}
void Core::onBackendError(const QString& error)
{
emitNotification(QStringLiteral("powerdevilerror"), i18n("The KDE Power Management System could not be initialized. "
"The backend reported the following error: %1\n"
"Please check your system configuration", error));
}
void Core::onBatteryChargePercentChanged(int percent, const QString &udi)
{
if (m_peripheralBatteriesPercent.contains(udi)) {
......
......@@ -141,7 +141,6 @@ private:
private Q_SLOTS:
void onBackendReady();
void onBackendError(const QString &error);
void onAcAdapterStateChanged(PowerDevil::BackendInterface::AcAdapterState);
void onBatteryChargePercentChanged(int,const QString&);
void onBatteryChargeStateChanged(int,const QString&);
......
[Global]
Name=KDE Power Management System
Name=Power Management
Name[ar]=نظام إدارة طاقة كدي
Name[bs]=KDE‑ov sistem za upravljanje napajanjem
Name[ca]=Sistema de gestió d'energia del KDE
......@@ -954,101 +954,3 @@ Contexts=stdnot
Sound=Oxygen-Sys-App-Negative.ogg
Action=Sound
IconName=battery-low
[Event/powerdevilerror]
Name=Internal Error
Name[ar]=خطأ داخليّ
Name[bs]=Unutrašnja greška
Name[ca]=Error intern
Name[ca@valencia]=Error intern
Name[cs]=Vnitřní chyba
Name[da]=Intern fejl
Name[de]=Interner Fehler
Name[el]=Εσωτερικό σφάλμα
Name[en_GB]=Internal Error
Name[es]=Error interno
Name[et]=Sisemine tõrge
Name[eu]=Barne-errorea
Name[fi]=Sisäinen virhe
Name[fr]=Erreur interne
Name[gl]=Erro interno
Name[he]=שגיאה פנימית
Name[hu]=Belső hiba
Name[ia]=Error Interne
Name[id]=Error Internal
Name[it]=Errore interno
Name[ja]=内部エラー
Name[ko]=내부 오류
Name[lt]=Vidinė klaida
Name[nb]=Intern feil
Name[nds]=Intern Fehler
Name[nl]=Interne fout
Name[nn]=Intern feil
Name[pa]=ਅੰਦਰੂਨੀ ਗਲਤੀ
Name[pl]=Błąd wewnętrzny
Name[pt]=Erro Interno
Name[pt_BR]=Erro interno
Name[ro]=Eroare internă
Name[ru]=Внутренняя ошибка
Name[sk]=Interná chyba
Name[sl]=Notranja napaka
Name[sr]=Унутрашња грешка
Name[sr@ijekavian]=Унутрашња грешка
Name[sr@ijekavianlatin]=Unutrašnja greška
Name[sr@latin]=Unutrašnja greška
Name[sv]=Internt fel
Name[tr]=İç Hata
Name[uk]=Внутрішня помилка
Name[x-test]=xxInternal Errorxx
Name[zh_CN]=内部错误
Name[zh_TW]=內部錯誤
Comment=The KDE Power Management System has triggered an internal error
Comment[ar]=حدث خطأ داخليّ في مدير طاقة كدي
Comment[bs]=Unutrašnja greška u KDE‑ovom sistemu za upravljanje napajanjem
Comment[ca]=El sistema de gestió d'energia del KDE ha activat un error intern
Comment[ca@valencia]=El sistema de gestió d'energia del KDE ha activat un error intern
Comment[cs]=Systém správy napájení KDE vyvolal interní chybu
Comment[da]=KDE's strømstyringssystem har udløst en intern fejl
Comment[de]=Das KDE-Energieverwaltungssystem hat einen internen Fehler ausgelöst.
Comment[el]=Ο διαχειριστής ενέργειας συστήματος του KDE προκάλεσε ένα εσωτερικό σφάλμα
Comment[en_GB]=The KDE Power Management System has triggered an internal error
Comment[es]=El sistema de gestión de energía de KDE ha desencadenado un error interno
Comment[et]=KDE toitehalduse süsteemi tabas sisemine tõrge
Comment[eu]=KDEren energia kudeatzeko sistemak barne-errore bat eragin du
Comment[fi]=KDE:n virranhallintajärjestelmä on kohdannut sisäisen virheen
Comment[fr]=Le système de gestion de l'énergie de KDE a déclenché une erreur interne
Comment[gl]=O sistema de xestión da enerxía de KDE disparou un erro interno
Comment[he]=קרתה שגיאה פנימית במערכת לניהול צריכת החשמל של KDE
Comment[hu]=A KDE Energiakezelő rendszere belső hibát okozott
Comment[ia]=Le systema de gestion de energia de KDE ha generate un error interne
Comment[id]=Sistem Pengelolaan Daya KDE telah dipicu oleh sebuah error internal
Comment[it]=Il sistema di gestione energetica di KDE ha innescato un errore interno
Comment[ja]=KDE 電源管理に内部エラーが発生しました
Comment[ko]=KDE 전원 관리 시스템에서 내부 오류가 발생했습니다
Comment[lt]=KDE energijos valdymo sistema sužadino vidinę klaidą
Comment[nb]=KDE strømstyringssystem har utløst en intern feil
Comment[nds]=Dat KDE-Stroomkuntrullsysteem hett en intern Fehler hatt.
Comment[nl]=Het KDE-energiebeheersysteem activeerde een interne fout
Comment[nn]=Det oppstod ein internfeil i KDE-straumstyringa
Comment[pa]=KDE ਪਾਵਰ ਮੈਨਜੇਮੈਂਟ ਸਿਸਟਮ ਨੇ ਅੰਦਰੂਨੀ ਗਲਤੀ
Comment[pl]=Wystąpił wewnętrzny błąd systemu zarządzania energią KDE
Comment[pt]=O Sistema de Gestão de Energia do KDE despoletou um erro interno
Comment[pt_BR]=Ocorreu um erro interno no Sistema de Gerenciamento de Energia do KDE
Comment[ro]=Sistemul KDE de gestiune a alimentării a declanșat o eroare internă
Comment[ru]=Произошла внутренняя ошибка системы управления питанием KDE
Comment[sk]=Systém správy napájania KDE vyvolal internú chybu
Comment[sl]=V KDE-jevem sistemu za upravljanje z energijo je prišlo do notranje napake
Comment[sr]=Унутрашња грешка у КДЕ‑овом систему за управљање напајањем
Comment[sr@ijekavian]=Унутрашња грешка у КДЕ‑овом систему за управљање напајањем
Comment[sr@ijekavianlatin]=Unutrašnja greška u KDE‑ovom sistemu za upravljanje napajanjem
Comment[sr@latin]=Unutrašnja greška u KDE‑ovom sistemu za upravljanje napajanjem
Comment[sv]=KDE:s strömsparhanteringssystem har orsakat ett internt fel
Comment[tr]=KDE Güç Yönetimi Sistemi bir iç hata ile karşılaştı
Comment[uk]=У системі керування живленням KDE сталася внутрішня помилка
Comment[x-test]=xxThe KDE Power Management System has triggered an internal errorxx
Comment[zh_CN]=KDE 电源管理系统触发了内部错误
Comment[zh_TW]=KDE 電源管理系統觸發了一個內部錯誤
Contexts=criticalnot
Sound=Oxygen-Sys-App-Error-Critical.ogg
Action=Sound|Popup
IconName=dialog-error
Markdown is supported
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