summaryrefslogtreecommitdiff
authorzecke <zecke>2004-11-15 15:37:47 (UTC)
committer zecke <zecke>2004-11-15 15:37:47 (UTC)
commit0d5b9141a5bda1406c513d174dbce95eb5ed0a97 (patch) (side-by-side diff)
treeb15b19e2b7e5bec80d7570d10545b51bac9a9a36
parentef26112d97cd5573642a0f00fd54347229857402 (diff)
downloadopie-0d5b9141a5bda1406c513d174dbce95eb5ed0a97.zip
opie-0d5b9141a5bda1406c513d174dbce95eb5ed0a97.tar.gz
opie-0d5b9141a5bda1406c513d174dbce95eb5ed0a97.tar.bz2
Move the method out
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sshkeys/sshkeys.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp
index d8b1014..57118c9 100644
--- a/noncore/settings/sshkeys/sshkeys.cpp
+++ b/noncore/settings/sshkeys/sshkeys.cpp
@@ -37,20 +37,27 @@
#include <stdio.h>
#include <ctype.h>
using namespace Opie::Core;
-static char *keynames[] = { "identity", "id_rsa", "id_dsa" };
+static const char *keynames[] = { "identity", "id_rsa", "id_dsa" };
-SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
- : SSHKeysBase( parent, name, fl )
-{
+
+static void detachTerminal() {
/* If we had a controlling TTY, detach from it.
This is to ensure that SSH uses ssh-askpass */
int fd = open("/dev/tty", O_RDONLY);
if (fd != -1) {
ioctl(fd, TIOCNOTTY, NULL);
close(fd);
}
+}
+
+
+SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
+ : SSHKeysBase( parent, name, fl )
+{
+ detachTerminal();
+
QCString home = QFile::encodeName( QDir::homeDirPath() );
unsigned i;