Lines 59-65
Dialog::Dialog( QStringList *p, QWidget *parent, Qt::WFlags flags )
Link Here
|
59 |
env.replaceInStrings( QRegExp("^LC_ALL=(.*)", Qt::CaseInsensitive), "LC_ALL=C" ); |
59 |
env.replaceInStrings( QRegExp("^LC_ALL=(.*)", Qt::CaseInsensitive), "LC_ALL=C" ); |
60 |
process->setEnvironment( env ); |
60 |
process->setEnvironment( env ); |
61 |
|
61 |
|
62 |
connect( process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processStop()) ); |
62 |
connect( process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processStop(int, QProcess::ExitStatus)) ); |
63 |
connect( process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutput()) ); |
63 |
connect( process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutput()) ); |
64 |
connect( process, SIGNAL(readyReadStandardError()), this, SLOT(readError()) ); |
64 |
connect( process, SIGNAL(readyReadStandardError()), this, SLOT(readError()) ); |
65 |
//connect( dlg, SIGNAL(rejected()), this, SLOT(cancelPressed()) ); |
65 |
//connect( dlg, SIGNAL(rejected()), this, SLOT(cancelPressed()) ); |
Lines 148-160
void Dialog::processStart() {
Link Here
|
148 |
|
148 |
|
149 |
|
149 |
|
150 |
// On finish process |
150 |
// On finish process |
151 |
void Dialog::processStop() { |
151 |
void Dialog::processStop(int exitCode, QProcess::ExitStatus) { |
152 |
//qDebug( "processStop" ); |
152 |
//qDebug( "processStop" ); |
153 |
|
153 |
|
154 |
if( d ) { |
154 |
if( d ) { |
155 |
setStatus( tr("Installation is finished successful"), 100, QString( "" ) ); |
155 |
if ( exitCode != 0 ){ |
156 |
d->bInstall->hide(); |
156 |
setStatus( tr("ERROR: Something went wrong. Please click on the \"Show details\"!"), 0,""); |
157 |
d->bCancel->setText( tr("&Exit") ); |
157 |
} |
|
|
158 |
else { |
159 |
setStatus( tr("Installation is finished successful"), 100, QString( "" ) ); |
160 |
} |
161 |
d->bInstall->hide(); |
162 |
d->bCancel->setText( tr("&Exit") ); |
158 |
state = 5; |
163 |
state = 5; |
159 |
} |
164 |
} |
160 |
} |
165 |
} |