summaryrefslogtreecommitdiff
path: root/core/tools
authoralwin <alwin>2004-03-02 12:14:15 (UTC)
committer alwin <alwin>2004-03-02 12:14:15 (UTC)
commit0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff)
tree503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/tools
parenta0981652d61776d70f25980f035748b21339e946 (diff)
downloadopie-0d59c780513da78033f4d9040475dee9db0256d4.zip
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/tools') (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/quicklauncher/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp
index cc411fd..1d6774c 100644
--- a/core/tools/quicklauncher/main.cpp
+++ b/core/tools/quicklauncher/main.cpp
@@ -65,50 +65,50 @@ void setproctitle (const char *fmt,...) {
65 va_end(ap); 65 va_end(ap);
66 66
67 i = strlen (buf); 67 i = strlen (buf);
68 if (i > argv_lth - 2) { 68 if (i > argv_lth - 2) {
69 i = argv_lth - 2; 69 i = argv_lth - 2;
70 buf[i] = '\0'; 70 buf[i] = '\0';
71 } 71 }
72 memset(argv0[0], '\0', argv_lth); /* clear the memory area */ 72 memset(argv0[0], '\0', argv_lth); /* clear the memory area */
73 (void) strcpy (argv0[0], buf); 73 (void) strcpy (argv0[0], buf);
74 74
75 argv0[1] = NULL; 75 argv0[1] = NULL;
76} 76}
77#endif 77#endif
78 78
79 79
80class QuickLauncher : public QObject 80class QuickLauncher : public QObject
81{ 81{
82 Q_OBJECT 82 Q_OBJECT
83public: 83public:
84 QuickLauncher() : QObject() 84 QuickLauncher() : QObject()
85 { 85 {
86 QCString ch("QPE/QuickLauncher-"); 86 QCString ch("QPE/QuickLauncher-");
87 ch += QString::number(getpid()); 87 ch += QString::number(getpid());
88 qlChannel = new QCopChannel( ch, this); 88 qlChannel = new QCopChannel( ch, this);
89 connect( qlChannel, SIGNAL(received(const QCString&, const QByteArray&)), 89 connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)),
90 this, SLOT(message(const QCString&, const QByteArray&)) ); 90 this, SLOT(message(const QCString&,const QByteArray&)) );
91 } 91 }
92 92
93 static void exec( int /*argc*/, char **argv ) 93 static void exec( int /*argc*/, char **argv )
94 { 94 {
95 QString appName = argv[0]; 95 QString appName = argv[0];
96 int sep = appName.findRev( '/' ); 96 int sep = appName.findRev( '/' );
97 if ( sep > 0 ) 97 if ( sep > 0 )
98 appName = appName.mid( sep+1 ); 98 appName = appName.mid( sep+1 );
99 99
100 appIface = 0; 100 appIface = 0;
101 if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) { 101 if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) {
102 mainWindow = appIface->createMainWindow( appName ); 102 mainWindow = appIface->createMainWindow( appName );
103 } 103 }
104 if ( mainWindow ) { 104 if ( mainWindow ) {
105 if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { 105 if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) {
106 app->showMainDocumentWidget( mainWindow ); 106 app->showMainDocumentWidget( mainWindow );
107 } else { 107 } else {
108 app->showMainWidget( mainWindow ); 108 app->showMainWidget( mainWindow );
109 } 109 }
110 } else { 110 } else {
111 qWarning( "Could not create application main window" ); 111 qWarning( "Could not create application main window" );
112 exit(-1); 112 exit(-1);
113 } 113 }
114 } 114 }