[pim/kmail] src: Prepare to implement change status support

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 80f02a03872f1263d72a42a89b28b2b861597fe1 by Laurent Montel.
Committed on 23/07/2026 at 11:24.
Pushed by mlaurent into branch 'master'.

Prepare to implement change status support

M  +19   -4    src/undostack.cpp
M  +10   -0    src/undostack.h

https://invent.kde.org/pim/kmail/-/commit/80f02a03872f1263d72a42a89b28b2b861597fe1

diff --git a/src/undostack.cpp b/src/undostack.cpp
index 794a30f02..f81b6ada0 100644
--- a/src/undostack.cpp
+++ b/src/undostack.cpp
@@ -97,6 +97,10 @@ void UndoStack::undo()
     }
 }
 
+UndoInfoMoveItems::UndoInfoMoveItems() = default;
+
+UndoInfoMoveItems::~UndoInfoMoveItems() = default;
+
 void UndoInfoMoveItems::slotMoveResult(KJob *job)
 {
     if (job->error()) {
@@ -105,10 +109,6 @@ void UndoInfoMoveItems::slotMoveResult(KJob *job)
     deleteLater();
 }
 
-UndoInfoMoveItems::UndoInfoMoveItems() = default;
-
-UndoInfoMoveItems::~UndoInfoMoveItems() = default;
-
 QString UndoInfoMoveItems::undoInfo() const
 {
     return moveToTrash ? i18n("Move To Trash") : i18np("Move Message", "Move Messages", items.count());
@@ -120,4 +120,19 @@ void UndoInfoMoveItems::undo()
     connect(job, &Akonadi::ItemMoveJob::result, this, &UndoInfoMoveItems::slotMoveResult);
 }
 
+UndoInfoChangeStatusItems::UndoInfoChangeStatusItems() = default;
+
+UndoInfoChangeStatusItems::~UndoInfoChangeStatusItems() = default;
+
+QString UndoInfoChangeStatusItems::undoInfo() const
+{
+    // TODO
+    return {};
+}
+
+void UndoInfoChangeStatusItems::undo()
+{
+    // TODO
+}
+
 #include "moc_undostack.cpp"
diff --git a/src/undostack.h b/src/undostack.h
index f5b4a3400..4c0ae6619 100644
--- a/src/undostack.h
+++ b/src/undostack.h
@@ -30,6 +30,16 @@ public:
     int id = -1;
 };
 
+class UndoInfoChangeStatusItems : public QObject, public UndoInfoBase
+{
+    Q_OBJECT
+public:
+    UndoInfoChangeStatusItems();
+    ~UndoInfoChangeStatusItems() override;
+    [[nodiscard]] QString undoInfo() const override;
+    void undo() override;
+};
+
 /** A class for storing Undo information. */
 class UndoInfoMoveItems : public QObject, public UndoInfoBase
 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.