diff src/main/qtopia/SDL_qtopia_main.cc @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents 623b453a3219
children
line wrap: on
line diff
--- a/src/main/qtopia/SDL_qtopia_main.cc	Thu Jul 06 18:01:37 2006 +0000
+++ b/src/main/qtopia/SDL_qtopia_main.cc	Mon Jul 10 21:04:37 2006 +0000
@@ -16,14 +16,20 @@
 // some issues in Qtopia where there are left-over qcop files in /tmp/.
 // I'm guessing this will also clean up the taskbar in the Sharp version
 // of Qtopia.
-static inline void cleanupQCop() {
-  QString appname(qApp->argv()[0]);
-  int slash = appname.findRev("/");
-  if(slash != -1) {  appname = appname.mid(slash+1); }
-  QString cmd = QPEApplication::qpeDir() + "bin/qcop QPE/System 'closing(QString)' '"+appname+"'";
-  system(cmd.latin1());
-  cmd = "/tmp/qcop-msg-"+appname;
-  unlink(cmd.latin1());
+static inline void
+cleanupQCop()
+{
+    QString appname(qApp->argv()[0]);
+    int slash = appname.findRev("/");
+    if (slash != -1) {
+        appname = appname.mid(slash + 1);
+    }
+    QString cmd =
+        QPEApplication::qpeDir() +
+        "bin/qcop QPE/System 'closing(QString)' '" + appname + "'";
+    system(cmd.latin1());
+    cmd = "/tmp/qcop-msg-" + appname;
+    unlink(cmd.latin1());
 }
 
 static QPEApplication *app;
@@ -31,17 +37,20 @@
 
 extern int SDL_main(int argc, char *argv[]);
 
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
 {
 #ifdef QWS
-  // This initializes the Qtopia application. It needs to be done here
-  // because it parses command line options.
-  app = new QPEApplication(argc, argv);
-  QWidget dummy;
-  app->showMainWidget(&dummy);
-  atexit(cleanupQCop);
+    // This initializes the Qtopia application. It needs to be done here
+    // because it parses command line options.
+    app = new QPEApplication(argc, argv);
+    QWidget dummy;
+    app->showMainWidget(&dummy);
+    atexit(cleanupQCop);
 #endif
-  // Exit here because if return is used, the application
-  // doesn't seem to quit correctly.
-  exit(SDL_main(argc, argv));
+    // Exit here because if return is used, the application
+    // doesn't seem to quit correctly.
+    exit(SDL_main(argc, argv));
 }
+
+/* vi: set ts=4 sw=4 expandtab: */