summaryrefslogtreecommitdiff
authorzecke <zecke>2002-11-08 18:09:37 (UTC)
committer zecke <zecke>2002-11-08 18:09:37 (UTC)
commit028753a6a3857cdcf7476e537de1cd5c471424c4 (patch) (side-by-side diff)
tree29ea6ac56b0a0310d74096101b37cce6ec9430ef
parent24da3ab5dd821dd552f13fa7b22f5b3c2986eecd (diff)
downloadopie-028753a6a3857cdcf7476e537de1cd5c471424c4.zip
opie-028753a6a3857cdcf7476e537de1cd5c471424c4.tar.gz
opie-028753a6a3857cdcf7476e537de1cd5c471424c4.tar.bz2
qwsServer belongs to QWS
and not to !QT_NO_COP
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/global.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/global.cpp b/library/global.cpp
index d02e711..9b3c51e 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -61,101 +61,101 @@ namespace {
if( (*it).startsWith("autocheck = 0" ) ){
return false;
}else if( (*it).startsWith("autocheck = 1" ) ){
return true;
}
}
return true;
}
}
//#include "quickexec_p.h"
class Emitter : public QObject {
Q_OBJECT
public:
Emitter( QWidget* receiver, const QString& document )
{
connect(this, SIGNAL(setDocument(const QString&)),
receiver, SLOT(setDocument(const QString&)));
emit setDocument(document);
disconnect(this, SIGNAL(setDocument(const QString&)),
receiver, SLOT(setDocument(const QString&)));
}
signals:
void setDocument(const QString&);
};
class StartingAppList : public QObject {
Q_OBJECT
public:
static void add( const QString& name );
static bool isStarting( const QString name );
private slots:
void handleNewChannel( const QString &);
private:
StartingAppList( QObject *parent=0, const char* name=0 ) ;
QDict<QTime> dict;
static StartingAppList *appl;
};
StartingAppList* StartingAppList::appl = 0;
StartingAppList::StartingAppList( QObject *parent, const char* name )
:QObject( parent, name )
{
-#if QT_VERSION >= 232 && !defined(QT_NO_COP)
+#if QT_VERSION >= 232 && defined(QWS)
connect( qwsServer, SIGNAL( newChannel(const QString&)),
this, SLOT( handleNewChannel(const QString&)) );
+#endif
dict.setAutoDelete( TRUE );
-#endif
}
void StartingAppList::add( const QString& name )
{
#if QT_VERSION >= 232 && !defined(QT_NO_COP)
if ( !appl )
appl = new StartingAppList;
QTime *t = new QTime;
t->start();
appl->dict.insert( "QPE/Application/" + name, t );
#endif
}
bool StartingAppList::isStarting( const QString name )
{
#if QT_VERSION >= 232 && !defined(QT_NO_COP)
if ( appl ) {
QTime *t = appl->dict.find( "QPE/Application/" + name );
if ( !t )
return FALSE;
if ( t->elapsed() > 10000 ) {
// timeout in case of crash or something
appl->dict.remove( "QPE/Application/" + name );
return FALSE;
}
return TRUE;
}
#endif
return FALSE;
}
void StartingAppList::handleNewChannel( const QString & name )
{
#if QT_VERSION >= 232 && !defined(QT_NO_COP)
dict.remove( name );
#endif
}
static bool docDirCreated = FALSE;
static QDawg* fixed_dawg = 0;
static QDict<QDawg> *named_dawg = 0;
static QString qpeDir()
{
QString dir = getenv("OPIEDIR");
if ( dir.isEmpty() ) dir = "..";
return dir;
}