-rw-r--r-- | core/tools/quicklauncher/config.in | 2 | ||||
-rw-r--r-- | core/tools/quicklauncher/dropins.h | 6 | ||||
-rw-r--r-- | core/tools/quicklauncher/main.cpp | 3 | ||||
-rw-r--r-- | core/tools/quicklauncher/quicklauncher.pro | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/core/tools/quicklauncher/config.in b/core/tools/quicklauncher/config.in index c105e94..eacbcf6 100644 --- a/core/tools/quicklauncher/config.in +++ b/core/tools/quicklauncher/config.in @@ -1,4 +1,4 @@ config QUICKLAUNCHER boolean "The Quick Launcher Loader" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIEUI2 && LIBOPIECORE2 diff --git a/core/tools/quicklauncher/dropins.h b/core/tools/quicklauncher/dropins.h index 3e2b5fd..7acace9 100644 --- a/core/tools/quicklauncher/dropins.h +++ b/core/tools/quicklauncher/dropins.h @@ -1,37 +1,37 @@ #include <qstring.h> #include <qtopia/qcom.h> #include <qtopia/qlibrary.h> #include <qtopia/applicationinterface.h> #include <qtopia/resource.h> -#include <opie/owait.h> +#include <opie2/owait.h> #include <qmetaobject.h> #include <qmap.h> -namespace Opie { +namespace QuickPrivate { struct PluginLoader { PluginLoader( const char* ) { } QRESULT queryInterface( const QString& app, const QUuid&, QUnknownInterface** ); void releaseInterface( QUnknownInterface* ); QMap<QUnknownInterface*, QLibrary*> libs; }; /* * We can skip installing a Translator here because Opies QPEApplication * will do that in initApp for us as well */ QRESULT PluginLoader::queryInterface( const QString& libFile, const QUuid& uuid, QUnknownInterface** iface ) { QRESULT res = QS_FALSE; *iface = 0; // This code is very platform specific.. We should find better // solutions to handle names.. Maybe one central function would be // better than checking this ".so" stuff all around in the sources.. // (eilers) // Below lines from TT then mine again @@ -45,26 +45,24 @@ namespace Opie { QString path = QPEApplication::qpeDir() + "/plugins/application/lib"+name+".dylib"; #else QString path = QPEApplication::qpeDir() + "/plugins/application/lib"+name+".so"; #endif QLibrary *lib = new QLibrary( path ); if ( lib->queryInterface( uuid, iface ) == QS_OK && iface ) { libs.insert( *iface, lib ); res = QS_OK; } return res; } void PluginLoader::releaseInterface( QUnknownInterface* iface ) { if ( libs.contains( iface ) ) { iface->release(); delete libs[iface]; libs.remove( iface ); // we only handle pointers so even if the object is not valid the address-space is } } } -/* small hack ;) */ -using namespace Opie; diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index 1d6774c..f3055cc 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp @@ -18,61 +18,64 @@ ** **********************************************************************/ #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 #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include "dropins.h" +using QuickPrivate::PluginLoader; + 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); i = strlen (buf); if (i > argv_lth - 2) { i = argv_lth - 2; buf[i] = '\0'; } memset(argv0[0], '\0', argv_lth); /* clear the memory area */ (void) strcpy (argv0[0], buf); argv0[1] = NULL; } #endif diff --git a/core/tools/quicklauncher/quicklauncher.pro b/core/tools/quicklauncher/quicklauncher.pro index 6ab5fc8..ae390e5 100644 --- a/core/tools/quicklauncher/quicklauncher.pro +++ b/core/tools/quicklauncher/quicklauncher.pro @@ -1,15 +1,15 @@ TEMPLATE = app CONFIG += qtopia warn_on release DESTDIR = $(OPIEDIR)/bin HEADERS = dropins.h SOURCES = main.cpp INTERFACES = INCLUDEPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 -lopieui2 TARGET = quicklauncher include ( $(OPIEDIR)/include.pro )
\ No newline at end of file |