We will use notification for undoing send

wilder
Laurent Montel 6 years ago
parent 3655f6b8ed
commit e1fb1331a3
  1. 5
      src/data/kmail2.notifyrc
  2. 1
      src/undosend/undosendcreatejob.cpp
  3. 14
      src/undosend/undosendmanager.cpp
  4. 1
      src/undosend/undosendmanager.h

@ -468,3 +468,8 @@ Name[x-test]=xxFolder Archive Errorxx
Name[zh_CN]=文件夹归档错误
Name[zh_TW]=資料夾封存錯誤
Action=Popup
[Event/undosend]
Name=An email can be undo send
Action=Popup
Urgency=Normal

@ -20,6 +20,7 @@
#include "undosendcreatejob.h"
#include "kmail_debug.h"
//TODO add notification
UndoSendCreateJob::UndoSendCreateJob(QObject *parent)
: QObject(parent)

@ -19,6 +19,7 @@
#include "undosendmanager.h"
#include "undosendcreatejob.h"
#include "kmail_debug.h"
UndoSendManager::UndoSendManager(QObject *parent)
: QObject(parent)
@ -35,12 +36,13 @@ UndoSendManager *UndoSendManager::self()
return &s_self;
}
void UndoSendManager::removeItem(qint64 index)
{
}
void UndoSendManager::addItem(qint64 index, const QString &subject, int delay)
{
//TODO
UndoSendCreateJob *job = new UndoSendCreateJob(this);
job->setAkonadiIndex(index);
job->setSubject(subject);
job->setDelay(delay);
if (!job->start()) {
qCWarning(KMAIL_LOG) << " Impossible to create job";
}
}

@ -29,7 +29,6 @@ public:
explicit UndoSendManager(QObject *parent = nullptr);
~UndoSendManager();
static UndoSendManager *self();
void removeItem(qint64 index);
void addItem(qint64 index, const QString &subject, int delay);
};

Loading…
Cancel
Save