diff options
| author | Tannin <devnull@localhost> | 2015-03-01 11:28:49 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-03-01 11:28:49 +0100 |
| commit | d08e0ebab09b0a71c3042cd20b8994ec1c10a525 (patch) | |
| tree | 326a75bae849f2e2ed42cba0914933437bb92f89 /src/profile.h | |
| parent | 6479f972dccaabb3afadb570583a4269e8a785e4 (diff) | |
- some fixes to how file changes are signaled and delayed
Diffstat (limited to 'src/profile.h')
| -rw-r--r-- | src/profile.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/profile.h b/src/profile.h index 5eaa1ea1..342b6fa0 100644 --- a/src/profile.h +++ b/src/profile.h @@ -23,6 +23,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "modinfo.h" #include <iprofile.h> +#include <delayedfilewriter.h> #include <QString> #include <QDir> #include <QMetaType> @@ -89,16 +90,7 @@ public: **/ static Profile *createPtrFrom(const QString &name, const Profile &reference, MOBase::IPluginGame *gamePlugin); - /** - * @brief write out the modlist.txt - **/ - void writeModlist() const; - - /** - * cancel any potential request to write modlist.txt. This is used to ensure no invalid modlist is - * saved while it's being modified - */ - void cancelWriteModlist() const; + MOBase::DelayedFileWriter &modlistWriter() { return m_ModListWriter; } /** * @brief test if this profile uses archive invalidation @@ -283,7 +275,7 @@ signals: public slots: - void writeModlistNow(bool onlyOnTimer = false) const; + void writeModlistNow(); private: @@ -310,6 +302,7 @@ private: void mergeTweak(const QString &tweakName, const QString &tweakedIni) const; void mergeTweaks(ModInfo::Ptr modInfo, const QString &tweakedIni) const; void touchFile(QString fileName); + void finishChangeStatus() const; private: @@ -322,7 +315,7 @@ private: std::vector<unsigned int> m_ModIndexByPriority; unsigned int m_NumRegularMods; - QTimer *m_SaveTimer; + MOBase::DelayedFileWriter m_ModListWriter; }; |
