Files
RRJClient/Core/externalexecuter.cpp
2025-01-20 10:58:43 +03:00

43 lines
787 B
C++

#include "externalexecuter.h"
#include <QCoreApplication>
ExternalExecuter::ExternalExecuter()
{
}
ExternalExecuter::~ExternalExecuter()
{
}
void ExternalExecuter::CallApp()
{
QProcess *myProcess = new QProcess(this);
QStringList args;
args << "1";
myProcess->start(programPath,args);
myProcess->waitForFinished(3000);
QCoreApplication::exit();
}
bool ExternalExecuter::FindApp()
{
QString localPath = QDir::currentPath() + "/Application";
QDirIterator iterator(localPath,QDirIterator::Subdirectories);
while(iterator.hasNext()){
iterator.next();
if(iterator.fileInfo().fileName() == "RRJ.exe"){
programPath = iterator.fileInfo().absoluteFilePath();
return true;
}
}
return false;
}