summaryrefslogtreecommitdiff
path: root/core/tools
authorwimpie <wimpie>2005-01-09 03:02:21 (UTC)
committer wimpie <wimpie>2005-01-09 03:02:21 (UTC)
commit67d1d0b292553af550219d770cbd5c00987d8b8b (patch) (side-by-side diff)
tree517759c7fbda44a40ff733e3b5d5667d90558caa /core/tools
parent987bc9a2c5b39ddd4dc2a665cea65688bfd2179e (diff)
downloadopie-67d1d0b292553af550219d770cbd5c00987d8b8b.zip
opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.gz
opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.bz2
CONTROL files : reset version to 'standard' format
(partly rolls back my drastic all-applicatoins-same-version change) now format is x.y(.z)$EXTRAVERSION where x.y (and aptionally .z) are x : major version y : minor version z : application patch and extra version is seconds-since-epoch this value can be used to automatically upgrade versions with minor changes (without manual update of the control file)
Diffstat (limited to 'core/tools') (more/less context) (ignore whitespace changes)
-rw-r--r--core/tools/quicklauncher/main.cpp3
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
@@ -72,98 +72,97 @@ extern char **environ;
#include <stdarg.h>
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
class QuickLauncher : public QObject
{
Q_OBJECT
public:
QuickLauncher() : QObject()
{
QCString ch("QPE/QuickLauncher-");
ch += QString::number(getpid());
qlChannel = new QCopChannel( ch, this);
connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(message(const QCString&,const QByteArray&)) );
}
static void exec( int /*argc*/, char **argv )
{
QString appName = argv[0];
int sep = appName.findRev( '/' );
if ( sep > 0 )
appName = appName.mid( sep+1 );
appIface = 0;
- if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) != QS_OK ) {
- owarn << "Plugin does not support QuickLauncher interface" << oendl;
+ if ( ! ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) ) {
exit(-1);
}
mainWindow = appIface->createMainWindow( appName );
if ( mainWindow ) {
if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) {
app->showMainDocumentWidget( mainWindow );
} else {
app->showMainWidget( mainWindow );
}
} else {
owarn << "Could not create application main window" << oendl;
exit(-1);
}
}
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;
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;
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];