-rw-r--r-- | core/tools/quicklauncher/dropins.h | 9 | ||||
-rw-r--r-- | core/tools/quicklauncher/main.cpp | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/core/tools/quicklauncher/dropins.h b/core/tools/quicklauncher/dropins.h index 7acace9..a9664f8 100644 --- a/core/tools/quicklauncher/dropins.h +++ b/core/tools/quicklauncher/dropins.h @@ -1,23 +1,26 @@ +/* OPIE */ +#include <opie2/owait.h> +using namespace Opie::Ui; -#include <qstring.h> #include <qtopia/qcom.h> #include <qtopia/qlibrary.h> +#include <qtopia/qpeapplication.h> #include <qtopia/applicationinterface.h> #include <qtopia/resource.h> -#include <opie2/owait.h> - +/* QT */ #include <qmetaobject.h> #include <qmap.h> +#include <qstring.h> namespace QuickPrivate { struct PluginLoader { PluginLoader( const char* ) { } QRESULT queryInterface( const QString& app, const QUuid&, QUnknownInterface** ); void releaseInterface( QUnknownInterface* ); QMap<QUnknownInterface*, QLibrary*> libs; }; diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index c2467fb..b1befce 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp @@ -9,36 +9,37 @@ ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ +#define QTOPIA_INTERNAL_INITAPP #include "dropins.h" /* OPIE */ #include <opie2/odebug.h> +using namespace Opie::Core; /* QT */ #include <qpainter.h> #include <qstrlist.h> #include <qtimer.h> #include <qguardedptr.h> #include <qcopchannel_qws.h> -#define QTOPIA_INTERNAL_INITAPP #ifdef private # undef private #endif #define private public #include <qtopia/qpeapplication.h> #undef private /* STD */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> @@ -52,25 +53,24 @@ static QPEApplication *app = 0; static PluginLoader *loader = 0; static ApplicationInterface *appIface = 0; static QGuardedPtr<QWidget> mainWindow; #ifdef _OS_LINUX_ static char **argv0 = 0; static int argv_lth; extern char **environ; #ifndef SPT_BUFSIZE #define SPT_BUFSIZE 2048 #endif #include <stdarg.h> -using namespace Opie::Ui; void setproctitle (const char *fmt,...) { int i; char buf[SPT_BUFSIZE]; va_list ap; if (!argv0) return; va_start(ap, fmt); (void) vsnprintf(buf, SPT_BUFSIZE, fmt, ap); va_end(ap); @@ -124,33 +124,33 @@ public: } private slots: void message(const QCString &msg, const QByteArray & data) { QStrList argList; if ( msg == "execute(QStrList)" ) { delete qlChannel; QDataStream stream( data, IO_ReadOnly ); QStrList argList; stream >> argList; - odebug << "QuickLauncher execute: " << argList.at(0) << "" << oendl; + odebug << "QuickLauncher execute: " << argList.at(0) << oendl; doQuickLaunch( argList ); delete this; } else if ( msg == "execute(QString)" ) { delete qlChannel; QDataStream stream( data, IO_ReadOnly ); QString arg; stream >> arg; - odebug << "QuickLauncher execute: " << arg << "" << oendl; + odebug << "QuickLauncher execute: " << arg << oendl; QStrList argList; argList.append( arg.utf8() ); doQuickLaunch( argList ); delete this; } } private: void doQuickLaunch( QStrList &argList ) { static int myargc = argList.count(); static char **myargv = new char *[myargc + 1]; @@ -178,25 +178,25 @@ int main( int argc, char** argv ) { app = new QPEApplication( argc, argv ); loader = new PluginLoader( "application" ); unsetenv( "LD_BIND_NOW" ); QCString arg0 = argv[0]; int sep = arg0.findRev( '/' ); if ( sep > 0 ) arg0 = arg0.mid( sep+1 ); if ( arg0 != "quicklauncher" ) { - odebug << "QuickLauncher invoked as: " << arg0.data() << "" << oendl; + odebug << "QuickLauncher invoked as: " << arg0.data() << oendl; QuickLauncher::exec( argc, argv ); } else { #ifdef _OS_LINUX_ // Setup to change proc title int i; char **envp = environ; /* Move the environment so we can reuse the memory. * (Code borrowed from sendmail.) */ for (i = 0; envp[i] != NULL; i++) continue; environ = (char **) malloc(sizeof(char *) * (i + 1)); if (environ == NULL) |