|
@@ -4,7 +4,7 @@
|
|
#include <QFile>
|
|
#include <QFile>
|
|
#include <QTextStream>
|
|
#include <QTextStream>
|
|
|
|
|
|
-Application::Application(QObject *parent) :
|
|
|
|
|
|
+ApplicationLaunch::ApplicationLaunch(QObject *parent) :
|
|
QObject(parent),
|
|
QObject(parent),
|
|
m_process(new QProcess(this))
|
|
m_process(new QProcess(this))
|
|
{
|
|
{
|
|
@@ -21,73 +21,73 @@ Application::Application(QObject *parent) :
|
|
SLOT(process_error(QProcess::ProcessError)));
|
|
SLOT(process_error(QProcess::ProcessError)));
|
|
}
|
|
}
|
|
|
|
|
|
-QString Application::appName() const
|
|
|
|
|
|
+QString ApplicationLaunch::appName() const
|
|
{
|
|
{
|
|
return m_AppName;
|
|
return m_AppName;
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::setAppName(const QString &appName)
|
|
|
|
|
|
+void ApplicationLaunch::setAppName(const QString &appName)
|
|
{
|
|
{
|
|
m_AppName = appName;
|
|
m_AppName = appName;
|
|
}
|
|
}
|
|
|
|
|
|
-QString Application::outFName() const
|
|
|
|
|
|
+QString ApplicationLaunch::outFName() const
|
|
{
|
|
{
|
|
return m_outFName;
|
|
return m_outFName;
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::setoutFName(const QString &outFName)
|
|
|
|
|
|
+void ApplicationLaunch::setoutFName(const QString &outFName)
|
|
{
|
|
{
|
|
m_outFName = outFName;
|
|
m_outFName = outFName;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-QString Application::stdERR() const
|
|
|
|
|
|
+QString ApplicationLaunch::stdERR() const
|
|
{
|
|
{
|
|
return m_stdERR;
|
|
return m_stdERR;
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::setstdERR(const QString &stdERR)
|
|
|
|
|
|
+void ApplicationLaunch::setstdERR(const QString &stdERR)
|
|
{
|
|
{
|
|
m_stdERR = stdERR;
|
|
m_stdERR = stdERR;
|
|
}
|
|
}
|
|
|
|
|
|
-QString Application::stdOUT() const
|
|
|
|
|
|
+QString ApplicationLaunch::stdOUT() const
|
|
{
|
|
{
|
|
return m_stdOUT;
|
|
return m_stdOUT;
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::setstdOUT(const QString &stdOUT)
|
|
|
|
|
|
+void ApplicationLaunch::setstdOUT(const QString &stdOUT)
|
|
{
|
|
{
|
|
m_stdOUT = stdOUT;
|
|
m_stdOUT = stdOUT;
|
|
}
|
|
}
|
|
|
|
|
|
-int Application::exitCode()
|
|
|
|
|
|
+int ApplicationLaunch::exitCode()
|
|
{
|
|
{
|
|
return m_exitCode;
|
|
return m_exitCode;
|
|
}
|
|
}
|
|
|
|
|
|
-int Application::exitStatus()
|
|
|
|
|
|
+int ApplicationLaunch::exitStatus()
|
|
{
|
|
{
|
|
return m_exitStatus;
|
|
return m_exitStatus;
|
|
}
|
|
}
|
|
|
|
|
|
-int Application::exitError()
|
|
|
|
|
|
+int ApplicationLaunch::exitError()
|
|
{
|
|
{
|
|
return m_error;
|
|
return m_error;
|
|
}
|
|
}
|
|
|
|
|
|
-QString Application::arguments() const
|
|
|
|
|
|
+QString ApplicationLaunch::arguments() const
|
|
{
|
|
{
|
|
return m_Arguments;
|
|
return m_Arguments;
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::setArguments(const QString &arguments)
|
|
|
|
|
|
+void ApplicationLaunch::setArguments(const QString &arguments)
|
|
{
|
|
{
|
|
m_Arguments = arguments;
|
|
m_Arguments = arguments;
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::launchScript()
|
|
|
|
|
|
+void ApplicationLaunch::launchScript()
|
|
{
|
|
{
|
|
m_stdERR.clear();
|
|
m_stdERR.clear();
|
|
m_stdOUT.clear();
|
|
m_stdOUT.clear();
|
|
@@ -102,7 +102,7 @@ void Application::launchScript()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-void Application::finished(int exitCode, QProcess::ExitStatus status)
|
|
|
|
|
|
+void ApplicationLaunch::finished(int exitCode, QProcess::ExitStatus status)
|
|
{
|
|
{
|
|
m_stdOUT = QString(m_process->readAllStandardOutput());
|
|
m_stdOUT = QString(m_process->readAllStandardOutput());
|
|
m_stdERR = QString(m_process->readAllStandardError());
|
|
m_stdERR = QString(m_process->readAllStandardError());
|
|
@@ -123,13 +123,13 @@ void Application::finished(int exitCode, QProcess::ExitStatus status)
|
|
emit this->appFinished();
|
|
emit this->appFinished();
|
|
}
|
|
}
|
|
|
|
|
|
-void Application::process_started(void)
|
|
|
|
|
|
+void ApplicationLaunch::process_started(void)
|
|
{
|
|
{
|
|
emit this->appStarted();
|
|
emit this->appStarted();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-void Application::process_error(QProcess::ProcessError app_error)
|
|
|
|
|
|
+void ApplicationLaunch::process_error(QProcess::ProcessError app_error)
|
|
{
|
|
{
|
|
m_error = app_error;
|
|
m_error = app_error;
|
|
emit this->appError();
|
|
emit this->appError();
|