summaryrefslogtreecommitdiff
path: root/src/processrunner.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2021-01-17 18:29:17 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2021-01-18 08:21:41 -0500
commit181acfe832bef26228e33ac3a021d39528b1a4a9 (patch)
tree8d72ee70536e85361c6ebaf95cb97eef87bef0ea /src/processrunner.h
parent1c4d09d9e13571cf7cd7f1ed502bc069d27ed399 (diff)
renamed Refresh to TriggerRefresh, added WaitForRefresh
removed duplicate refreshDirectoryStructure() call that could never work added --logs to output logs to stdout, added final "mod organizer done" log added -i with no arguments to output the current instance name `run -e` now does an additional, case insensitive check for names fixed error being output along with --help
Diffstat (limited to 'src/processrunner.h')
-rw-r--r--src/processrunner.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/processrunner.h b/src/processrunner.h
index d8ff0227..b8c8935c 100644
--- a/src/processrunner.h
+++ b/src/processrunner.h
@@ -39,12 +39,30 @@ public:
{
NoFlags = 0x00,
- // the ui will be refreshed once the process has completed
- Refresh = 0x01,
+ // the directory structure will be refreshed once the process has completed
+ TriggerRefresh = 0x01,
// the process will be waited for even if locking is disabled or the
// process is not hooked
ForceWait = 0x02,
+
+ // only valid with TriggerRefresh; run() will block until the refresh has
+ // completed
+ WaitForRefresh = 0x04,
+
+ // combination of flags used to run programs from the command line
+ //
+ // 1) TriggerRefresh: MO must refresh after running the program because
+ // programs can modify files behind its back; for example, external
+ // LOOT will modify loadorder.txt, so MO must read it back or it will
+ // write back the old order when exiting
+ //
+ // 2) WaitForRefresh: refreshing is asynchronous, so the refresh must
+ // complete before MO exits or stale data might be written to disk
+ //
+ // 3) ForceWait: MO must wait for the program to finish even if locking the
+ // ui is disabled
+ ForCommandLine = TriggerRefresh | WaitForRefresh | ForceWait
};
using WaitFlags = QFlags<WaitFlag>;