summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sshkeys/sshkeys.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp
index 88acf94..c5e1170 100644
--- a/noncore/settings/sshkeys/sshkeys.cpp
+++ b/noncore/settings/sshkeys/sshkeys.cpp
@@ -47,8 +47,10 @@ SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
connect(RemoveAllButton, SIGNAL(clicked()), this, SLOT(doRemoveAllButton()));
connect(&addprocess, SIGNAL(receivedStdout(OProcess*,char*,int)),
this, SLOT(log_sshadd_output(OProcess*,char*,int)));
+ connect(&addprocess, SIGNAL(receivedStderr(OProcess*,char*,int)),
+ this, SLOT(log_sshadd_output(OProcess*,char*,int)));
connect(&addprocess, SIGNAL(processExited(OProcess*)),
this, SLOT(ssh_add_exited(OProcess*)));
connect(KeyFileName, SIGNAL(textChanged(const QString&)),
@@ -86,8 +88,10 @@ void SSHKeysApp::doRefreshListButton()
}
connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)),
this, SLOT(get_list_keys_output(OProcess*,char*,int)));
+ connect(&sshadd_process, SIGNAL(receivedStderr(OProcess*,char*,int)),
+ this, SLOT(log_sshadd_output(OProcess*,char*,int)));
keystate = KeySize;
incoming_keyname="";
incoming_keysize="";
@@ -100,9 +104,8 @@ void SSHKeysApp::doRefreshListButton()
log_text(tr("Error running ssh-add"));
return;
}
if (sshadd_process.exitStatus() == 2) {
- log_text(tr("Connection to ssh-agent failed"));
setEnabled(FALSE);
}
}
@@ -187,11 +190,10 @@ void SSHKeysApp::ssh_add_exited(OProcess *proc)
(void)proc;
doRefreshListButton();
setEnabled(TRUE);
- if (proc->exitStatus()) {
-
- log_text(QString(tr("ssh-add failed")));
+ if (proc->exitStatus() == 2) {
+ setEnabled(FALSE);
}
}
void SSHKeysApp::add_text_changed(const QString &text)
@@ -238,8 +240,10 @@ void SSHKeysApp::doRemoveAllButton()
OProcess sshadd_process;
connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)),
this, SLOT(log_sshadd_output(OProcess*,char*,int)));
+ connect(&sshadd_process, SIGNAL(receivedStderr(OProcess*,char*,int)),
+ this, SLOT(log_sshadd_output(OProcess*,char*,int)));
log_text(tr("Running ssh-add -D"));
sshadd_process << "ssh-add" << "-D";
bool ret = sshadd_process.start(OProcess::Block, OProcess::AllOutput);