2 /* Include the SDL main definition header */
10 #include <qpe/qpeapplication.h>
11 #include <qapplication.h>
12 #include <qpe/qpeapplication.h>
15 // Workaround for OPIE to remove taskbar icon. Also fixes
16 // some issues in Qtopia where there are left-over qcop files in /tmp/.
17 // I'm guessing this will also clean up the taskbar in the Sharp version
19 static inline void cleanupQCop() {
20 QString appname(qApp->argv()[0]);
21 int slash = appname.findRev("/");
22 if(slash != -1) { appname = appname.mid(slash+1); }
23 QString cmd = QPEApplication::qpeDir() + "bin/qcop QPE/System 'closing(QString)' '"+appname+"'";
25 cmd = "/tmp/qcop-msg-"+appname;
29 static QPEApplication *app;
32 extern int SDL_main(int argc, char *argv[]);
34 int main(int argc, char *argv[])
37 // This initializes the Qtopia application. It needs to be done here
38 // because it parses command line options.
39 app = new QPEApplication(argc, argv);
41 app->showMainWidget(&dummy);
44 // Exit here because if return is used, the application
45 // doesn't seem to quit correctly.
46 exit(SDL_main(argc, argv));