summaryrefslogtreecommitdiff
path: root/src/installationmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/installationmanager.h')
-rw-r--r--src/installationmanager.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/installationmanager.h b/src/installationmanager.h
index cb355641..1d94151f 100644
--- a/src/installationmanager.h
+++ b/src/installationmanager.h
@@ -189,14 +189,6 @@ public:
private:
- void queryPassword(QString *password);
- void updateProgress(float percentage);
- void updateProgressFile(const QString &fileName);
- void report7ZipError(const QString &errorMessage);
-
- // Recursive worker function for mapToArchive (takes raw reference for "speed").
- bool unpackSingleFile(const QString &fileName);
-
MOBase::IPluginInstaller::EInstallResult doInstall(MOBase::GuessedValue<QString> &modName, QString gameName,
int modID, const QString &version, const QString &newestVersion, int categoryID, int fileCategoryID, const QString &repository);
@@ -212,10 +204,29 @@ private:
void postInstallCleanup();
+private slots:
+
+ /**
+ * @brief Query user for password and update the m_Password field.
+ */
+ void queryPassword();
+
signals:
- void progressUpdate(float percentage);
- void progressUpdate(QString const fileName);
+ /**
+ * @brief Emitted when a password is requested from the archive wrapper.
+ */
+ void passwordRequested();
+
+ /**
+ * @brief Progress update from the extraction.
+ */
+ void progressUpdate(int percentage);
+
+ /**
+ * @brief File change update from the extraction.
+ */
+ void progressFileChange(QString const& value);
private:
@@ -244,7 +255,7 @@ private:
* @return true if the extraction was successful, false if the extraciton was
* cancelled. If an error occured, an exception is thrown.
*/
- bool extractFiles(QDir extractPath);
+ bool extractFiles(QString extractPath, QString title, bool showFilenames);
private:
@@ -258,18 +269,14 @@ private:
std::vector<MOBase::IPluginInstaller*> m_Installers;
std::set<QString, CaseInsensitive> m_SupportedExtensions;
- Archive *m_ArchiveHandler;
+ // Archive management:
+ std::unique_ptr<Archive> m_ArchiveHandler;
QString m_CurrentFile;
- QString m_ErrorMessage;
+ QString m_Password;
// Map from entries in the tree that is used by the installer and absolute
// paths to temporary files:
std::map<std::shared_ptr<const MOBase::FileTreeEntry>, QString> m_CreatedFiles;
-
- QProgressDialog *m_InstallationProgress { nullptr };
- int m_Progress;
- QString m_ProgressFile;
-
std::set<QString> m_TempFilesToDelete;
QString m_URL;