diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-10-30 23:42:59 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-06 07:44:57 -0500 |
| commit | db0b92776b5c9a34ebb1a5ce5c3f0b105844ee16 (patch) | |
| tree | 4024b434840a21d37cac3c43f229fb2c3ce5a91a /src/organizerproxy.cpp | |
| parent | 2aa70de49e89245467299d94d76825bad31c63a2 (diff) | |
added lockwidget to replace all the other dialogs
rewrote ProcessRunner to have a bunch of setters and then a run()
fixed bad exit code when waiting on a process that's already completed
removed lock()/unlock() from main window, ProcessRunner is in charge of that now
Diffstat (limited to 'src/organizerproxy.cpp')
| -rw-r--r-- | src/organizerproxy.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp index 75b3ea41..3ee35fe2 100644 --- a/src/organizerproxy.cpp +++ b/src/organizerproxy.cpp @@ -119,7 +119,24 @@ HANDLE OrganizerProxy::startApplication( bool OrganizerProxy::waitForApplication(HANDLE handle, LPDWORD exitCode) const
{
- return m_Proxied->processRunner().waitForApplication(handle, exitCode);
+ const auto r = m_Proxied->processRunner().waitForApplication(
+ handle, exitCode, LockWidget::OutputRequired);
+
+ switch (r)
+ {
+ case ProcessRunner::Completed:
+ return true;
+
+ case ProcessRunner::Cancelled: // fall-through
+ case ProcessRunner::ForceUnlocked:
+ // this is always an error because the application should have run to
+ // completion
+ return false;
+
+ case ProcessRunner::Error: // fall-through
+ default:
+ return false;
+ }
}
bool OrganizerProxy::onAboutToRun(const std::function<bool (const QString &)> &func)
|
