Show Transfer failed instead of Transfer finished when it fails.

REVIEW: 123199
This commit is contained in:
Ashish Bansal 2015-03-31 20:02:19 -07:00 committed by Albert Vaca
parent cda092d2bb
commit 5322bf45cb

View file

@ -168,7 +168,7 @@ void SharePlugin::finished(KJob* job)
KNotification* notification = new KNotification("transferReceived"); KNotification* notification = new KNotification("transferReceived");
notification->setIconName(error ? QStringLiteral("dialog-error") : QStringLiteral("dialog-ok")); notification->setIconName(error ? QStringLiteral("dialog-error") : QStringLiteral("dialog-ok"));
notification->setComponentName("kdeconnect"); notification->setComponentName("kdeconnect");
notification->setTitle(i18n("Transfer Finished")); notification->setTitle(error ? i18n("Transfer Failed") : i18n("Transfer Finished"));
notification->setText(transferJob->destination().fileName()); notification->setText(transferJob->destination().fileName());
notification->setActions(QStringList(i18n("Open"))); notification->setActions(QStringList(i18n("Open")));
connect(notification, &KNotification::action1Activated, this, &SharePlugin::openDestinationFolder); connect(notification, &KNotification::action1Activated, this, &SharePlugin::openDestinationFolder);