File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#include " commandrunner.h"
2+
23#include < QProcess>
34
45CommandRunner::CommandRunner (QObject *parent) : QObject(parent) {}
@@ -8,7 +9,7 @@ CommandRunner::Result CommandRunner::run(const QString &program,
89 QProcess process;
910 QByteArray stdoutBuffer;
1011
11- // Stdout'u anlık olarak sinyal olarak ilet
12+ // Stdout'u anlik olarak yayinla ve sonucu korumak icin buffer'a biriktir.
1213 connect (&process, &QProcess::readyReadStandardOutput, this , [&]() {
1314 const QByteArray chunk = process.readAllStandardOutput ();
1415 stdoutBuffer.append (chunk);
@@ -29,7 +30,6 @@ CommandRunner::Result CommandRunner::run(const QString &program,
2930 }
3031
3132 process.waitForFinished (-1 );
32-
3333 stdoutBuffer.append (process.readAllStandardOutput ());
3434
3535 return Result{
@@ -41,7 +41,6 @@ CommandRunner::Result CommandRunner::run(const QString &program,
4141
4242CommandRunner::Result CommandRunner::runAsRoot (const QString &program,
4343 const QStringList &args) {
44- // pkexec ile privilege escalation — sudo yerine PolicyKit kullanıyoruz
4544 QStringList pkexecArgs;
4645 pkexecArgs << program << args;
4746 return run (QStringLiteral (" pkexec" ), pkexecArgs);
You can’t perform that action at this time.
0 commit comments