diff options
Diffstat (limited to 'src/libs/installer/extractarchiveoperation.h')
-rw-r--r-- | src/libs/installer/extractarchiveoperation.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/libs/installer/extractarchiveoperation.h b/src/libs/installer/extractarchiveoperation.h index fa05d403a..b1a696788 100644 --- a/src/libs/installer/extractarchiveoperation.h +++ b/src/libs/installer/extractarchiveoperation.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -43,10 +43,12 @@ class INSTALLER_EXPORT ExtractArchiveOperation : public QObject, public Operatio public: explicit ExtractArchiveOperation(PackageManagerCore *core); - void backup(); - bool performOperation(); - bool undoOperation(); - bool testOperation(); + void backup() override; + bool performOperation() override; + bool undoOperation() override; + bool testOperation() override; + + quint64 sizeHint() override; bool readDataFileContents(QString &targetDir, QStringList *resultList); @@ -58,13 +60,21 @@ private: void startUndoProcess(const QStringList &files); void deleteDataFile(const QString &fileName); -private: - QString m_relocatedDataFileName; + QString generateBackupName(const QString &fn); + bool prepareForFile(const QString &filename); private: + typedef QPair<QString, QString> Backup; + typedef QVector<Backup> BackupFiles; + class Callback; - class Runnable; + class Worker; class Receiver; + +private: + QString m_relocatedDataFileName; + BackupFiles m_backupFiles; + quint64 m_totalEntries; }; } |