mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
34 lines
764 B
C++
34 lines
764 B
C++
#include "externalexecuter.h"
|
|
|
|
ExternalExecuter::ExternalExecuter() {}
|
|
|
|
ExternalExecuter::~ExternalExecuter() {}
|
|
|
|
void ExternalExecuter::callApp()
|
|
{
|
|
QProcess *myProcess = new QProcess(this);
|
|
QStringList args;
|
|
args << "1";
|
|
|
|
myProcess->start(programPath,args);
|
|
myProcess->waitForStarted();
|
|
QCoreApplication::exit();
|
|
}
|
|
|
|
bool ExternalExecuter::findApp()
|
|
{
|
|
QString localPath = QDir::currentPath() + applicationFolderName;
|
|
QDirIterator iterator(localPath,QDirIterator::Subdirectories);
|
|
|
|
while(iterator.hasNext()){
|
|
iterator.next();
|
|
|
|
if(iterator.fileInfo().fileName() == applicationEXEName){
|
|
programPath = iterator.fileInfo().absoluteFilePath();
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|