summaryrefslogtreecommitdiff
authorwimpie <wimpie>2005-01-08 03:06:55 (UTC)
committer wimpie <wimpie>2005-01-08 03:06:55 (UTC)
commitb1b5db12d357898311d67089c94e07f03f2bcf86 (patch) (unidiff)
tree0e854083cf30eb23c720ffed2435c7f0e5bcaaad
parent51413c5e05da7a0b233e2456d2e3f111ea20fbf6 (diff)
downloadopie-b1b5db12d357898311d67089c94e07f03f2bcf86.zip
opie-b1b5db12d357898311d67089c94e07f03f2bcf86.tar.gz
opie-b1b5db12d357898311d67089c94e07f03f2bcf86.tar.bz2
Added error message to make difference between plug loading error
or plugin initialization error
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/quicklauncher/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp
index 5f0d80b..fbed5a1 100644
--- a/core/tools/quicklauncher/main.cpp
+++ b/core/tools/quicklauncher/main.cpp
@@ -96,52 +96,55 @@ void setproctitle (const char *fmt,...) {
96#endif 96#endif
97 97
98 98
99class QuickLauncher : public QObject 99class QuickLauncher : public QObject
100{ 100{
101 Q_OBJECT 101 Q_OBJECT
102public: 102public:
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 mainWindow = appIface->createMainWindow( appName ); 121 owarn << "Plugin does not support QuickLauncher interface" << oendl;
122 exit(-1);
122 } 123 }
123 124
125 mainWindow = appIface->createMainWindow( appName );
126
124 if ( mainWindow ) { 127 if ( mainWindow ) {
125 if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { 128 if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) {
126 app->showMainDocumentWidget( mainWindow ); 129 app->showMainDocumentWidget( mainWindow );
127 } else { 130 } else {
128 app->showMainWidget( mainWindow ); 131 app->showMainWidget( mainWindow );
129 } 132 }
130 } else { 133 } else {
131 owarn << "Could not create application main window" << oendl; 134 owarn << "Could not create application main window" << oendl;
132 exit(-1); 135 exit(-1);
133 } 136 }
134 } 137 }
135 138
136private slots: 139private slots:
137 void message(const QCString &msg, const QByteArray & data) 140 void message(const QCString &msg, const QByteArray & data)
138 { 141 {
139 QStrList argList; 142 QStrList argList;
140 143
141 if ( msg == "execute(QStrList)" ) { 144 if ( msg == "execute(QStrList)" ) {
142 delete qlChannel; 145 delete qlChannel;
143 QDataStream stream( data, IO_ReadOnly ); 146 QDataStream stream( data, IO_ReadOnly );
144 QStrList argList; 147 QStrList argList;
145 stream >> argList; 148 stream >> argList;
146 odebug << "QuickLauncher execute: " << argList.at(0) << oendl; 149 odebug << "QuickLauncher execute: " << argList.at(0) << oendl;
147 doQuickLaunch( argList ); 150 doQuickLaunch( argList );