initial commit
This commit is contained in:
21
client/gui/main_window/RecentProjectHistory.h
Normal file
21
client/gui/main_window/RecentProjectHistory.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
class RecentProjectHistory {
|
||||
public:
|
||||
static constexpr int kMaxEntries = 15;
|
||||
|
||||
static QString cacheFilePath();
|
||||
|
||||
QStringList load() const;
|
||||
bool save(const QStringList& paths) const;
|
||||
void addAndSave(const QString& projectDir);
|
||||
void removeAndSave(const QString& projectDir);
|
||||
|
||||
static QString normalizePath(const QString& path);
|
||||
|
||||
private:
|
||||
static QStringList dedupeNewestFirst(const QStringList& paths);
|
||||
};
|
||||
Reference in New Issue
Block a user