aboutsummaryrefslogtreecommitdiff
path: root/launcher/FileSystem.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-10 16:25:15 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-10 16:25:15 +0300
commit35ccfdb7996ba727039ad2c0ab2974a49eecb6cc (patch)
tree2ef737788a9a0d5c6e810373371c2497f6e1c59c /launcher/FileSystem.h
parent6d758795af8a414d13db4951e3e9ed60af7091fd (diff)
parent91c9082d19b957c3295e7a0b5bc6add71e6459b8 (diff)
downloadPrismLauncher-35ccfdb7996ba727039ad2c0ab2974a49eecb6cc.tar.gz
PrismLauncher-35ccfdb7996ba727039ad2c0ab2974a49eecb6cc.tar.bz2
PrismLauncher-35ccfdb7996ba727039ad2c0ab2974a49eecb6cc.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into catpacks
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/FileSystem.h')
-rw-r--r--launcher/FileSystem.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/launcher/FileSystem.h b/launcher/FileSystem.h
index cb581d0c..f8a82bae 100644
--- a/launcher/FileSystem.h
+++ b/launcher/FileSystem.h
@@ -43,6 +43,7 @@
#include <system_error>
#include <QDir>
+#include <QPair>
#include <QFlags>
#include <QLocalServer>
#include <QObject>
@@ -112,9 +113,12 @@ class copy : public QObject {
bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); }
int totalCopied() { return m_copied; }
+ int totalFailed() { return m_failedPaths.length(); }
+ QStringList failed() { return m_failedPaths; }
signals:
void fileCopied(const QString& relativeName);
+ void copyFailed(const QString& relativeName);
// TODO: maybe add a "shouldCopy" signal in the future?
private:
@@ -127,6 +131,7 @@ class copy : public QObject {
QDir m_src;
QDir m_dst;
int m_copied;
+ QStringList m_failedPaths;
};
struct LinkPair {
@@ -471,6 +476,9 @@ class clone : public QObject {
bool operator()(bool dryRun = false) { return operator()(QString(), dryRun); }
int totalCloned() { return m_cloned; }
+ int totalFailed() { return m_failedClones.length(); }
+
+ QList<QPair<QString, QString>> failed() { return m_failedClones; }
signals:
void fileCloned(const QString& src, const QString& dst);
@@ -485,6 +493,7 @@ class clone : public QObject {
QDir m_src;
QDir m_dst;
int m_cloned;
+ QList<QPair<QString, QString>> m_failedClones;
};
/**