ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/manualcommands.cpp
(Generate patch)

Comparing Vago/trunk/Vago/manualcommands.cpp (file contents):
Revision 771 by s10k, Sun Mar 31 19:02:16 2013 UTC vs.
Revision 1035 by s10k, Thu Mar 24 22:28:41 2016 UTC

# Line 1 | Line 1
1   #include "manualcommands.h"
2   #include "ui_manualcommands.h"
3 + #include <QDebug>
4  
5   ManualCommands::ManualCommands(QWidget *parent) :
6      QMainWindow(parent),
# Line 9 | Line 10 | ManualCommands::ManualCommands(QWidget *
10      this->setAttribute(Qt::WA_DeleteOnClose,true); //destroy itself once finished.
11      this->myProcess = new QProcess();
12      this->myProcess->setProcessChannelMode(QProcess::MergedChannels);
13 +    this->myProcess->setWorkingDirectory(Util::getAppPath());
14      ui->leManualCommand->installEventFilter(this);
15  
16      this->nextInsertHistoryIdx=0;
# Line 59 | Line 61 | void ManualCommands::executeCommand(){
61          }
62      }
63  
64 <    this->myProcess->start(GlobalVars::OniSplitExeName+" "+ui->leManualCommand->text());
64 >    QString var = Util::getOniSplitExeName() +" "+ui->leManualCommand->text();
65 >
66 >    this->myProcess->start(Util::getOniSplitExeName()+" "+ui->leManualCommand->text());
67      this->myProcess->waitForFinished(120000); //wait 2 minutes at maximum
68      ui->ptOutput->appendPlainText("> "+command);
69      ui->ptOutput->appendPlainText(this->myProcess->readAll());
# Line 134 | Line 138 | bool ManualCommands::eventFilter(QObject
138                  if(this->searchHistoryIdx!=this->nextInsertHistoryIdx-1 && //for when it didn't the round
139                          !(this->nextInsertHistoryIdx==0 && this->searchHistoryIdx==this->limHistory-1)){ //for when it did the round
140                      this->searchHistoryIdx++;
141 <                 }
141 >                }
142  
143                  //rotate
144                  if(this->searchHistoryIdx < 0){

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)