Files
RRJClient/Core/externalexecuter.cpp
2024-08-19 11:57:33 +03:00

40 lines
708 B
C++

#include "externalexecuter.h"
ExternalExecuter::ExternalExecuter()
{
}
ExternalExecuter::~ExternalExecuter()
{
}
void ExternalExecuter::CallApp()
{
QProcess myProcess(this);
QStringList args;
args << "1";
myProcess.start(programPath,args);
myProcess.waitForFinished(-1);
}
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;
}