From 9f880ebea5cc169e3f8e5695a4827b6bd67d08db Mon Sep 17 00:00:00 2001 From: TheUnrealDragon Date: Tue, 28 Oct 2025 09:47:44 +0530 Subject: [PATCH] minor fixes --- .gitignore | 3 +++ CMakeLists.txt | 1 - main.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a007fea..5982d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ build/* +*.sh +*.json + diff --git a/CMakeLists.txt b/CMakeLists.txt index 71ba5fb..09bc533 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ project(helloworld VERSION 1.0.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(Qt6_DIR "/home/ud/Qt/6.9.2/gcc_64/lib/cmake/Qt6") find_package(Boost CONFIG) find_package(Qt6 REQUIRED COMPONENTS Core) diff --git a/main.cpp b/main.cpp index 38aaf63..ddce7ff 100644 --- a/main.cpp +++ b/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);