minor fixes
This commit is contained in:
parent
f3b7ba811e
commit
9f880ebea5
1 changed files with 7 additions and 5 deletions
8
main.cpp
8
main.cpp
|
|
@ -70,10 +70,10 @@ int main(int argc, char *argv[]) {
|
|||
command = std::format("{} {} > {}", name, args, log_file_name);
|
||||
else
|
||||
command = std::format("{} {}", name, args);
|
||||
log_file << "Running: " << command << "\n";
|
||||
log_file << "Running: " << command << " with working dir: " << working_dir.toStdString() << "\n";
|
||||
QProcess *proc = new QProcess();
|
||||
QObject::connect(proc, &QProcess::started, [&, command, proc] () {
|
||||
log_file << "Started process: " << command << " with pid: " << QString::number(proc->processId()).toStdString() << std::endl;
|
||||
QObject::connect(proc, &QProcess::started, [&, command, proc, working_dir] () {
|
||||
log_file << "Started process: " << command << " with pid: " << QString::number(proc->processId()).toStdString() << " with working directory as: " << working_dir.toStdString() << std::endl;
|
||||
});
|
||||
if (mode == "wait") {
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ int main(int argc, char *argv[]) {
|
|||
active_process_list.push_back(proc);
|
||||
}
|
||||
if(!working_dir.isEmpty())
|
||||
proc->setWorkingDirectory(working_dir);
|
||||
proc->setWorkingDirectory(working_dir);
|
||||
proc->setStandardOutputFile(QString::fromStdString(log_file_name));
|
||||
proc->setProgram(QString::fromStdString(name));
|
||||
proc->setArguments(sargs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue