summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sshkeys/main.cpp26
-rw-r--r--noncore/settings/sshkeys/opie-sshkeys.control2
-rw-r--r--noncore/settings/sshkeys/sshkeys.cpp16
-rw-r--r--noncore/settings/sshkeys/sshkeys.h1
-rw-r--r--noncore/settings/sshkeys/sshkeys.pro4
5 files changed, 19 insertions, 30 deletions
diff --git a/noncore/settings/sshkeys/main.cpp b/noncore/settings/sshkeys/main.cpp
index 9f19d0f..d0c0e2b 100644
--- a/noncore/settings/sshkeys/main.cpp
+++ b/noncore/settings/sshkeys/main.cpp
@@ -21,29 +21,7 @@
-#include <qpe/qpeapplication.h>
+#include <opie2/oapplicationfactory.h>
#include "sshkeys.h"
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-int main(int argc, char *argv[])
-{
- QPEApplication a(argc, argv);
- SSHKeysApp app;
- int fd;
+OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<SSHKeysApp> )
- /* If we had a controlling TTY, detach from it.
- This is to ensure that SSH uses ssh-askpass */
- fd = open("/dev/tty", O_RDONLY);
- if (fd != -1) {
- ioctl(fd, TIOCNOTTY, NULL);
- close(fd);
- }
-
- a.showMainWidget(&app);
-
- return a.exec();
-}
diff --git a/noncore/settings/sshkeys/opie-sshkeys.control b/noncore/settings/sshkeys/opie-sshkeys.control
index 08e3508..1f2a1fc 100644
--- a/noncore/settings/sshkeys/opie-sshkeys.control
+++ b/noncore/settings/sshkeys/opie-sshkeys.control
@@ -1,3 +1,3 @@
Package: opie-sshkeys
-Files: bin/sshkeys apps/Settings/sshkeys.desktop pics/sshkeys/sshkeys.png
+Files: plugins/applications/libsshkeys.so* bin/sshkeys apps/Settings/sshkeys.desktop pics/sshkeys/sshkeys.png
Priority: optional
diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp
index cebc845..d8b1014 100644
--- a/noncore/settings/sshkeys/sshkeys.cpp
+++ b/noncore/settings/sshkeys/sshkeys.cpp
@@ -23,2 +23,4 @@
#include <qpe/qpeapplication.h>
+#include <qdir.h>
+#include <qfile.h>
#include <qmultilineedit.h>
@@ -30,2 +32,4 @@
#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
#include <stdlib.h>
@@ -41,3 +45,11 @@ SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
{
- char *home = getenv("HOME");
+ /* 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);
+ }
+
+ QCString home = QFile::encodeName( QDir::homeDirPath() );
unsigned i;
@@ -63,3 +75,3 @@ SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
thiskeyname[31] = 0;
- snprintf(thiskeyname, 31, "%s/.ssh/%s", home, keynames[i]);
+ snprintf(thiskeyname, 31, "%s/.ssh/%s", home.data(), keynames[i]);
if (!access(thiskeyname, R_OK)) {
diff --git a/noncore/settings/sshkeys/sshkeys.h b/noncore/settings/sshkeys/sshkeys.h
index 519f540..0807f74 100644
--- a/noncore/settings/sshkeys/sshkeys.h
+++ b/noncore/settings/sshkeys/sshkeys.h
@@ -35,2 +35,3 @@ class SSHKeysApp : public SSHKeysBase
~SSHKeysApp();
+ static QString appName() { return QString::fromLatin1( QUICKAPP_NAME); }
diff --git a/noncore/settings/sshkeys/sshkeys.pro b/noncore/settings/sshkeys/sshkeys.pro
index 87d5ce9..0910d29 100644
--- a/noncore/settings/sshkeys/sshkeys.pro
+++ b/noncore/settings/sshkeys/sshkeys.pro
@@ -1,3 +1,2 @@
-TEMPLATE = app
-CONFIG += qt warn_on
+CONFIG += qt quick-app
HEADERS = sshkeys.h
@@ -9,3 +8,2 @@ DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopiecore2
-DESTDIR = $(OPIEDIR)/bin