From 6516a6b7c19713de28db7142612f1c095e541317 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 17 Feb 2013 09:26:29 +0100 Subject: - moved shared and uibase libraries to namespaces - bugfix: the "fix mods" function was accessing the save game data incorrectly, causing a crash --- src/directoryrefresher.h | 174 +++++++++++++++++++++++------------------------ 1 file changed, 87 insertions(+), 87 deletions(-) (limited to 'src/directoryrefresher.h') diff --git a/src/directoryrefresher.h b/src/directoryrefresher.h index 47259fdd..5b785b2f 100644 --- a/src/directoryrefresher.h +++ b/src/directoryrefresher.h @@ -17,90 +17,90 @@ You should have received a copy of the GNU General Public License along with Mod Organizer. If not, see . */ -#ifndef DIRECTORYREFRESHER_H -#define DIRECTORYREFRESHER_H - -#include -#include -#include -#include -#include - - -/** - * @brief used to asynchronously generate the virtual view of the combined data directory - **/ -class DirectoryRefresher : public QObject -{ - - Q_OBJECT - -public: - - /** - * @brief constructor - * - **/ - DirectoryRefresher(); - - /** - * @brief retrieve the updated directory structure - * - * returns a pointer to the updated directory structure. DirectoryRefresher - * deletes its own pointer and the caller takes custody of the pointer - * - * @return updated directory structure - **/ - DirectoryEntry *getDirectoryStructure(); - - /** - * @brief sets up the mods to be included in the directory structure - * - * @param mods list of the mods to include - **/ - void setMods(const std::vector > &mods); - - /** - * @brief sets up the directory where mods are stored - * @param modDirectory the mod directory - * @note this function could be obsoleted easily by storing absolute paths in the parameter to setMods. This is legacy - */ - void setModDirectory(const QString &modDirectory); - - /** - * @brief remove files from the directory structure that are known to be irrelevant to the game - * @param the structure to clean - */ - static void cleanStructure(DirectoryEntry *structure); - - /** - * @brief add files for a mod to the directory structure, including bsas - * @param modName - * @param priorityBSA - * @param directory - * @param priorityDir - */ - static void addModToStructure(DirectoryEntry *directoryStructure, const QString &modName, int priority, const QString &directory); - -public slots: - - /** - * @brief generate a directory structure from the mods set earlier - **/ - void refresh(); - -signals: - - void progress(int progress); - void error(const QString &error); - void refreshed(); - -private: - - std::vector > m_Mods; - DirectoryEntry *m_DirectoryStructure; - QMutex m_RefreshLock; - -}; - -#endif // DIRECTORYREFRESHER_H +#ifndef DIRECTORYREFRESHER_H +#define DIRECTORYREFRESHER_H + +#include +#include +#include +#include +#include + + +/** + * @brief used to asynchronously generate the virtual view of the combined data directory + **/ +class DirectoryRefresher : public QObject +{ + + Q_OBJECT + +public: + + /** + * @brief constructor + * + **/ + DirectoryRefresher(); + + /** + * @brief retrieve the updated directory structure + * + * returns a pointer to the updated directory structure. DirectoryRefresher + * deletes its own pointer and the caller takes custody of the pointer + * + * @return updated directory structure + **/ + MOShared::DirectoryEntry *getDirectoryStructure(); + + /** + * @brief sets up the mods to be included in the directory structure + * + * @param mods list of the mods to include + **/ + void setMods(const std::vector > &mods); + + /** + * @brief sets up the directory where mods are stored + * @param modDirectory the mod directory + * @note this function could be obsoleted easily by storing absolute paths in the parameter to setMods. This is legacy + */ + void setModDirectory(const QString &modDirectory); + + /** + * @brief remove files from the directory structure that are known to be irrelevant to the game + * @param the structure to clean + */ + static void cleanStructure(MOShared::DirectoryEntry *structure); + + /** + * @brief add files for a mod to the directory structure, including bsas + * @param modName + * @param priorityBSA + * @param directory + * @param priorityDir + */ + static void addModToStructure(MOShared::DirectoryEntry *directoryStructure, const QString &modName, int priority, const QString &directory); + +public slots: + + /** + * @brief generate a directory structure from the mods set earlier + **/ + void refresh(); + +signals: + + void progress(int progress); + void error(const QString &error); + void refreshed(); + +private: + + std::vector > m_Mods; + MOShared::DirectoryEntry *m_DirectoryStructure; + QMutex m_RefreshLock; + +}; + +#endif // DIRECTORYREFRESHER_H -- cgit v1.3.1