mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kfreespace: use the static KNotification::event() method for notification
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2053a185ef
commit
242c0539cf
1 changed files with 5 additions and 4 deletions
|
@ -81,10 +81,11 @@ void KFreeSpaceImpl::timerEvent(QTimerEvent *event)
|
|||
kDebug() << "Current" << m_soliddevice.udi()
|
||||
<< "space is" << freespacestring;
|
||||
if (freespace <= m_freespace) {
|
||||
KNotification *knotification = new KNotification();
|
||||
knotification->setEventID("kfreespace/WatchLow");
|
||||
knotification->setText(i18n("%1 has %2 free space", m_soliddevice.description(), freespacestring));
|
||||
knotification->send();
|
||||
KNotification::event(
|
||||
"kfreespace/WatchLow",
|
||||
QString(),
|
||||
i18n("%1 has %2 free space", m_soliddevice.description(), freespacestring)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
event->ignore();
|
||||
|
|
Loading…
Add table
Reference in a new issue