diff options
| author | Tannin <devnull@localhost> | 2014-04-05 15:36:42 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-04-05 15:36:42 +0200 |
| commit | cabed9b268c9f095d5e3b98a6797b0bcdcd38b1f (patch) | |
| tree | 454b03b0c5664e90fe586e7b39603e34a526d35b /src/installationmanager.h | |
| parent | 98e5e57a845541acddf519a81957261f58008cb9 (diff) | |
| parent | c017f4a0d50b67a44e276bd5ae8929ed3990c62c (diff) | |
Merge with branch1.1
Diffstat (limited to 'src/installationmanager.h')
| -rw-r--r-- | src/installationmanager.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/installationmanager.h b/src/installationmanager.h index 0e43a15d..3478fecf 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -65,6 +65,12 @@ public: void setModsDirectory(const QString &modsDirectory) { m_ModsDirectory = modsDirectory; } /** + * @brief update the directory where downloads are stored + * @param downloadDirectory the download directory + */ + void setDownloadDirectory(const QString &downloadDirectory) { m_DownloadsDirectory = downloadDirectory; } + + /** * @brief install a mod from an archive * * @param fileName absolute file name of the archive to install @@ -132,9 +138,10 @@ public: /** * @brief test if the specified mod name is free. If not, query the user how to proceed * @param modName current possible names for the mod + * @param merge if this value is not null, the value will be set to whether the use chose to merge or replace * @return true if we can proceed with the installation, false if the user canceled or in case of an unrecoverable error */ - virtual bool testOverwrite(MOBase::GuessedValue<QString> &modName) const; + virtual bool testOverwrite(MOBase::GuessedValue<QString> &modName, bool *merge = NULL) const; private: @@ -159,7 +166,7 @@ private: bool isSimpleArchiveTopLayer(const MOBase::DirectoryTree::Node *node, bool bainStyle); MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree); - bool testOverwrite(const QString &modsDirectory, MOBase::GuessedValue<QString> &modName); + //bool testOverwrite(const QString &modsDirectory, MOBase::GuessedValue<QString> &modName, bool *merge = NULL); bool doInstall(MOBase::GuessedValue<QString> &modName, int modID, const QString &version, const QString &newestVersion, int categoryID); @@ -168,9 +175,7 @@ private: bool ensureValidModName(MOBase::GuessedValue<QString> &name) const; -private slots: - - void openFile(const QString &fileName); + void postInstallCleanup() const; private: @@ -193,6 +198,7 @@ private: QWidget *m_ParentWidget; QString m_ModsDirectory; + QString m_DownloadsDirectory; std::vector<MOBase::IPluginInstaller*> m_Installers; std::set<QString, CaseInsensitive> m_SupportedExtensions; @@ -202,7 +208,6 @@ private: QProgressDialog m_InstallationProgress; - std::set<QString> m_FilesToDelete; std::set<QString> m_TempFilesToDelete; }; |
