{
// If process is still running, it means timeout!
if( status_ == Running)
- {
- // Read output
- QByteArray bytes = qprocess_.readAllStandardOutput();
- QString string(bytes);
- sendDebugMessage(string);
-
- if(string.contains("'s password:") || string.contains("passphrase:"))
- {
- // Try to ask password
- if( storedPassword_.isEmpty())
- {
- if( string.contains("'s password:") )
- storedPassword_ = QInputDialog::getText( 0, tr("Server ask password"), tr("Password:"), QLineEdit::PasswordEchoOnEdit );
- else
- storedPassword_ = QInputDialog::getText( 0, tr("Server ask passphrase"), tr("Passphrase:"), QLineEdit::PasswordEchoOnEdit );
- }
- qprocess_.write(storedPassword_.toAscii());
- qprocess_.write("\n");
-
- QTimer::singleShot( getTimeout(), this, SLOT(timeout()) );
- status_ = PasswdRunning;
- }
- else
- fail( Timeout );
- }
- else if( status_ == PasswdRunning )
fail(Timeout); // FAILS !!!
}