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 1052 by s10k, Sat Sep 17 13:32:34 2016 UTC vs.
Revision 1058 by s10k, Sun Oct 30 14:42:39 2016 UTC

# Line 1 | Line 1
1   #include "manualcommands.h"
2   #include "ui_manualcommands.h"
3 #include <QDebug>
3  
4   ManualCommands::ManualCommands(QWidget *parent) :
5      QMainWindow(parent),
6      ui(new Ui::ManualCommands)
7   {
8      ui->setupUi(this);
9 <    this->setAttribute(Qt::WA_DeleteOnClose,true); //destroy itself once finished.
9 >    this->setAttribute(Qt::WA_DeleteOnClose, true); //destroy itself once finished.
10      this->myProcess = new QProcess();
11      this->myProcess->setProcessChannelMode(QProcess::MergedChannels);
12      this->myProcess->setWorkingDirectory(UtilVago::getAppPath());
# Line 33 | Line 32 | void ManualCommands::on_pbInput_clicked(
32  
33   void ManualCommands::executeCommand(){
34  
35 +    QString toolExecutable;
36 +
37 +    if(ui->cbTargetTool->currentText() == "OniSplit"){
38 +        toolExecutable = UtilVago::getOniSplitExecutable();
39 +    }
40 +    else{
41 +        toolExecutable = UtilVago::getXmlToolsExecutable();
42 +    }
43 +
44      QString command=ui->leManualCommand->text().trimmed();
45  
46      if(command.isEmpty()){
# Line 61 | Line 69 | void ManualCommands::executeCommand(){
69          }
70      }
71  
72 <    QString var = UtilVago::getOniSplitExecutable() +" "+ui->leManualCommand->text();
65 <
66 <    this->myProcess->start(UtilVago::getOniSplitExecutable()+" "+ui->leManualCommand->text());
72 >    this->myProcess->start(toolExecutable+" "+ui->leManualCommand->text());
73      this->myProcess->waitForFinished(120000); //wait 2 minutes at maximum
74 <    ui->ptOutput->appendPlainText("> "+command);
74 >    ui->ptOutput->appendPlainText("> " + ui->cbTargetTool->currentText() + " " + command);
75      ui->ptOutput->appendPlainText(this->myProcess->readAll());
76      ui->ptOutput->ensureCursorVisible();
77      ui->ptOutput->verticalScrollBar()->setValue( ui->ptOutput->verticalScrollBar()->maximum() );

Diff Legend

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