[pim/kmail] src: Rename class

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 5c0e11e623ebbcb369d8368b30886dc2923069ae by Laurent Montel.
Committed on 22/07/2026 at 20:42.
Pushed by mlaurent into branch 'master'.

Rename class

M  +4    -4    src/undostack.cpp
M  +4    -4    src/undostack.h

https://invent.kde.org/pim/kmail/-/commit/5c0e11e623ebbcb369d8368b30886dc2923069ae

diff --git a/src/undostack.cpp b/src/undostack.cpp
index 1d6cec02c..61beaa78b 100644
--- a/src/undostack.cpp
+++ b/src/undostack.cpp
@@ -38,7 +38,7 @@ void UndoStack::clear()
 QString UndoStack::undoInfo() const
 {
     if (!mStack.isEmpty()) {
-        UndoInfo *info = mStack.first();
+        UndoInfoMoveItems *info = mStack.first();
         return info->moveToTrash ? i18n("Move To Trash") : i18np("Move Message", "Move Messages", info->items.count());
     } else {
         return {};
@@ -47,7 +47,7 @@ QString UndoStack::undoInfo() const
 
 int UndoStack::newUndoAction(const Akonadi::Collection &srcFolder, const Akonadi::Collection &destFolder)
 {
-    auto info = new UndoInfo;
+    auto info = new UndoInfoMoveItems;
     info->id = ++mLastId;
     info->srcFolder = srcFolder;
     info->destFolder = destFolder;
@@ -64,7 +64,7 @@ int UndoStack::newUndoAction(const Akonadi::Collection &srcFolder, const Akonadi
 void UndoStack::addMsgToAction(int undoId, const Akonadi::Item &item)
 {
     if (!mCachedInfo || mCachedInfo->id != undoId) {
-        QList<UndoInfo *>::const_iterator itr = mStack.constBegin();
+        QList<UndoInfoMoveItems *>::const_iterator itr = mStack.constBegin();
         while (itr != mStack.constEnd()) {
             if ((*itr)->id == undoId) {
                 mCachedInfo = (*itr);
@@ -86,7 +86,7 @@ bool UndoStack::isEmpty() const
 void UndoStack::undo()
 {
     if (!mStack.isEmpty()) {
-        UndoInfo *info = mStack.takeFirst();
+        UndoInfoMoveItems *info = mStack.takeFirst();
         Q_EMIT undoStackChanged();
         auto job = new Akonadi::ItemMoveJob(info->items, info->srcFolder, this);
         connect(job, &Akonadi::ItemMoveJob::result, this, &UndoStack::slotMoveResult);
diff --git a/src/undostack.h b/src/undostack.h
index b4073b275..317184b50 100644
--- a/src/undostack.h
+++ b/src/undostack.h
@@ -29,10 +29,10 @@ public:
 };
 
 /** A class for storing Undo information. */
-class UndoInfo
+class UndoInfoMoveItems
 {
 public:
-    UndoInfo() = default;
+    UndoInfoMoveItems() = default;
 
     int id = -1;
     Akonadi::Item::List items;
@@ -62,9 +62,9 @@ Q_SIGNALS:
 private:
     KMAIL_NO_EXPORT void clear();
     KMAIL_NO_EXPORT void slotMoveResult(KJob *);
-    QList<UndoInfo *> mStack;
+    QList<UndoInfoMoveItems *> mStack;
     const int mSize = 0;
     int mLastId = 0;
-    UndoInfo *mCachedInfo = nullptr;
+    UndoInfoMoveItems *mCachedInfo = nullptr;
 };
 }
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.