mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
Init commit
This commit is contained in:
37
Core/externalexecuter.cpp
Normal file
37
Core/externalexecuter.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "externalexecuter.h"
|
||||
|
||||
|
||||
ExternalExecuter::ExternalExecuter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ExternalExecuter::~ExternalExecuter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ExternalExecuter::CallApp()
|
||||
{
|
||||
QProcess myProcess(this);
|
||||
QStringList args;
|
||||
args << "1";
|
||||
|
||||
myProcess.start(programPath,args);
|
||||
myProcess.waitForFinished(-1);
|
||||
}
|
||||
|
||||
void 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();
|
||||
qDebug() << "Bin found: " << programPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user