Diffstat (limited to 'core/tools/quicklauncher/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/tools/quicklauncher/main.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index fbed5a1..59dd17e 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp | |||
@@ -96,50 +96,49 @@ void setproctitle (const char *fmt,...) { | |||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | 98 | ||
99 | class QuickLauncher : public QObject | 99 | class QuickLauncher : public QObject |
100 | { | 100 | { |
101 | Q_OBJECT | 101 | Q_OBJECT |
102 | public: | 102 | public: |
103 | QuickLauncher() : QObject() | 103 | QuickLauncher() : QObject() |
104 | { | 104 | { |
105 | QCString ch("QPE/QuickLauncher-"); | 105 | QCString ch("QPE/QuickLauncher-"); |
106 | ch += QString::number(getpid()); | 106 | ch += QString::number(getpid()); |
107 | qlChannel = new QCopChannel( ch, this); | 107 | qlChannel = new QCopChannel( ch, this); |
108 | connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)), | 108 | connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
109 | this, SLOT(message(const QCString&,const QByteArray&)) ); | 109 | this, SLOT(message(const QCString&,const QByteArray&)) ); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void exec( int /*argc*/, char **argv ) | 112 | static void exec( int /*argc*/, char **argv ) |
113 | { | 113 | { |
114 | QString appName = argv[0]; | 114 | QString appName = argv[0]; |
115 | int sep = appName.findRev( '/' ); | 115 | int sep = appName.findRev( '/' ); |
116 | if ( sep > 0 ) | 116 | if ( sep > 0 ) |
117 | appName = appName.mid( sep+1 ); | 117 | appName = appName.mid( sep+1 ); |
118 | 118 | ||
119 | appIface = 0; | 119 | appIface = 0; |
120 | if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) != QS_OK ) { | 120 | if ( ! ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) ) { |
121 | owarn << "Plugin does not support QuickLauncher interface" << oendl; | ||
122 | exit(-1); | 121 | exit(-1); |
123 | } | 122 | } |
124 | 123 | ||
125 | mainWindow = appIface->createMainWindow( appName ); | 124 | mainWindow = appIface->createMainWindow( appName ); |
126 | 125 | ||
127 | if ( mainWindow ) { | 126 | if ( mainWindow ) { |
128 | if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { | 127 | if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { |
129 | app->showMainDocumentWidget( mainWindow ); | 128 | app->showMainDocumentWidget( mainWindow ); |
130 | } else { | 129 | } else { |
131 | app->showMainWidget( mainWindow ); | 130 | app->showMainWidget( mainWindow ); |
132 | } | 131 | } |
133 | } else { | 132 | } else { |
134 | owarn << "Could not create application main window" << oendl; | 133 | owarn << "Could not create application main window" << oendl; |
135 | exit(-1); | 134 | exit(-1); |
136 | } | 135 | } |
137 | } | 136 | } |
138 | 137 | ||
139 | private slots: | 138 | private slots: |
140 | void message(const QCString &msg, const QByteArray & data) | 139 | void message(const QCString &msg, const QByteArray & data) |
141 | { | 140 | { |
142 | QStrList argList; | 141 | QStrList argList; |
143 | 142 | ||
144 | if ( msg == "execute(QStrList)" ) { | 143 | if ( msg == "execute(QStrList)" ) { |
145 | delete qlChannel; | 144 | delete qlChannel; |