View | Details | Raw Unified | Return to bug 28507
Collapse All | Expand All

(-)a/packageinstall/dialog.cpp (-5 / +10 lines)
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
}
(-)a/packageinstall/dialog.h (-2 / +1 lines)
Lines 64-70 private slots: Link Here
64
    void readOutput();
64
    void readOutput();
65
    void readError();
65
    void readError();
66
    void windowClose();
66
    void windowClose();
67
    void processStop();
67
    void processStop(int, QProcess::ExitStatus);
68
68
69
    // Button actions
69
    // Button actions
70
    void detailPressed();
70
    void detailPressed();
71
- 

Return to bug 28507