aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-06-29 14:20:07 +0200
committerEike Ziller <eike.ziller@qt.io>2022-06-29 12:27:18 +0000
commit005741dcbf04e15491fa711941f4abc6ab8de355 (patch)
tree3b95a912700fc88a2742f44b08eb9f2c14532161 /plugins
parent6e8331c51f1558b924fdebf7e182f74815301a4e (diff)
Adapt to upstream changes
QtcProcess::errorOccurred has been merged into ::done. Change-Id: I4e84203d052bdfe6f7eb827ea83c90441a0c86d3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/haskell/haskellmanager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/haskell/haskellmanager.cpp b/plugins/haskell/haskellmanager.cpp
index 2604341..dd6a371 100644
--- a/plugins/haskell/haskellmanager.cpp
+++ b/plugins/haskell/haskellmanager.cpp
@@ -111,11 +111,13 @@ void HaskellManager::openGhci(const FilePath &haskellFile)
p->setTerminalMode(TerminalMode::On);
p->setCommand({stackExecutable(), args});
p->setWorkingDirectory(haskellFile.absolutePath());
- connect(p, &QtcProcess::errorOccurred, p, [p] {
- Core::MessageManager::writeDisrupting(tr("Failed to run GHCi: \"%1\".").arg(p->errorString()));
+ connect(p, &QtcProcess::done, p, [p] {
+ if (p->result() != ProcessResult::FinishedWithSuccess) {
+ Core::MessageManager::writeDisrupting(
+ tr("Failed to run GHCi: \"%1\".").arg(p->errorString()));
+ }
p->deleteLater();
});
- connect(p, &QtcProcess::finished, p, &QObject::deleteLater);
p->start();
}