Skip to content

Commit

Permalink
detect after connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Abel You committed Mar 3, 2025
1 parent acfbb99 commit e1e85d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions toonz/sources/common/tipc/tipc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,17 @@ bool tipc::startBackgroundProcess(QString cmdlineProgram,
QProcess *proc = new QProcess;

proc->start(cmdlineProgram, cmdlineArguments);
if (proc->waitForStarted() && proc->error() != QProcess::FailedToStart) {
delete proc;
return false;
}

QObject::connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), proc,
SLOT(deleteLater()));
QObject::connect(proc, SIGNAL(error(QProcess::ProcessError)), proc,
SLOT(deleteLater()));

if (proc->waitForStarted() && proc->error() != QProcess::FailedToStart) {
delete proc;
return false;
}

return true;
#else
return QProcess::startDetached(cmdlineProgram, cmdlineArguments);
Expand Down

0 comments on commit e1e85d0

Please sign in to comment.