/
NeoChapay
/
telegraf
Обзор
Документация
Войти
/
NeoChapay
/
telegraf
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/processlauncher.cpp
23 строки
667 B
Slava Monich
Take logging categories into use
22 ноя 2020, 17:40
22 ноя 2020, 17:40
162e1ca
Код
Авторство
О чём код?
#include "processlauncher.h" #include <QProcess> #include <QStandardPaths> #define DEBUG_MODULE ProcessLauncher #include "debuglog.h" ProcessLauncher::ProcessLauncher(QObject *parent) : QObject(parent) { } bool ProcessLauncher::launchProgram(const QString &program, const QStringList &arguments) { const QString executablePath(QStandardPaths::findExecutable(program)); if (executablePath.isEmpty()) { LOG("Program" << program << "not found"); return false; } QProcess *process = new QProcess(this); connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater())); return process->startDetached(program, arguments); }