Commit 984130ba authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to store fullpath

parent ebcf9081
Pipeline #96102 canceled with stage
......@@ -19,10 +19,10 @@ HistorySwitchFolderManager::~HistorySwitchFolderManager()
{
}
void HistorySwitchFolderManager::addHistory(const Akonadi::Collection &currentCol, const Akonadi::Collection &col)
void HistorySwitchFolderManager::addHistory(const Akonadi::Collection &currentCol, const Akonadi::Collection &col, const QString &fullPath)
{
if (col.isValid()) {
mUndoStack->push(new HistorySwitchFolderCommand(this, currentCol, col));
mUndoStack->push(new HistorySwitchFolderCommand(this, currentCol, col, fullPath));
}
}
......@@ -57,7 +57,8 @@ void HistorySwitchFolderManager::redo()
HistorySwitchFolderCommand::HistorySwitchFolderCommand(HistorySwitchFolderManager *manager,
const Akonadi::Collection &currentCol,
const Akonadi::Collection &col)
const Akonadi::Collection &col,
const QString &realPath)
: mCurrentCollection(currentCol)
, mNewCollection(col)
, mManager(manager)
......
......@@ -19,7 +19,7 @@ public:
~HistorySwitchFolderManager() override;
// Add static method
void clear();
void addHistory(const Akonadi::Collection &currentCol, const Akonadi::Collection &col);
void addHistory(const Akonadi::Collection &currentCol, const Akonadi::Collection &col, const QString &fullPath = {});
void changeCollection(const Akonadi::Collection &currentCol);
......@@ -36,7 +36,10 @@ private:
class HistorySwitchFolderCommand : public QUndoCommand
{
public:
explicit HistorySwitchFolderCommand(HistorySwitchFolderManager *manager, const Akonadi::Collection &currentCol, const Akonadi::Collection &col);
explicit HistorySwitchFolderCommand(HistorySwitchFolderManager *manager,
const Akonadi::Collection &currentCol,
const Akonadi::Collection &col,
const QString &realPath);
void undo() override;
void redo() override;
......@@ -44,5 +47,6 @@ public:
private:
const Akonadi::Collection mCurrentCollection;
const Akonadi::Collection mNewCollection;
QString mFullPath;
HistorySwitchFolderManager *const mManager;
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment