-rw-r--r-- | x11/libqpe-x11/qpe/qpeapplication.cpp | 8 | ||||
-rw-r--r-- | x11/libqpe-x11/qt/qcopchannel_qws.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp index 0fce355..3cb8faf 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.cpp +++ b/x11/libqpe-x11/qpe/qpeapplication.cpp @@ -246,107 +246,107 @@ QPEApplication::QPEApplication(int &arg, char** argv, Type t) atoms[n] = &d->wm_take_focus; names[n++] = "WM_TAKE_FOCUS"; atoms[n] = &d->wm_context_help; names[n++] = "_NET_WM_CONTEXT_HELP"; atoms[n] = &d->wm_context_accept; names[n++] = "_NET_WM_CONTEXT_ACCEPT"; atoms[n] = &d->wm_protocols; names[n++] = "WM_PROTOCOLS"; XInternAtoms( qt_xdisplay(), names, n, FALSE, atoms_re); // now copy the values over to the properties for (int i = 0; i < n; i++ ) *atoms[i] = atoms_re[i]; // done with X11 Stuff int dw = desktop()->width(); if ( dw < 200 ) { setFont( QFont( "helvetica", 8 ) ); AppLnk::setSmallIconSize( 10 ); AppLnk::setBigIconSize( 28 ); }else if ( dw > 600 ) { setFont( QFont( "helvetica", 12 ) ); AppLnk::setSmallIconSize( 24 ); AppLnk::setBigIconSize( 48 ); }else if ( dw > 200 ) { setFont( QFont( "helvetica", 10 ) ); AppLnk::setSmallIconSize( 16 ); AppLnk::setBigIconSize( 32 ); } QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory ); connect( this, SIGNAL( lastWindowClosed() ), this, SLOT(hideOrQuit() ) ); QString qcopfn( "/tmp/qcop-msg-" ); qcopfn += QString( argv[0] ); // append command name to the QCOP name QFile file( qcopfn ); if (file.open(IO_ReadOnly ) ) { flock( file.handle(), LOCK_EX ); } /* Hmmm damn we need to make the parent 0l otherwise it get's deleted * past the QApplication */ m_sys = new QCopChannel( "QPE/System", 0l); - connect(m_sys, SIGNAL( received( const QCString&, const QByteArray& ) ), - this, SLOT(systemMessage( const QCString&, const QByteArray& ) ) ); + connect(m_sys, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT(systemMessage(const QCString&,const QByteArray&) ) ); // private channel QPE/Application/appname QCString channel = QCString( argv[0] ); channel.replace( QRegExp( ".*/"), "" ); d->appName = channel; channel = "QPE/Application/"+ channel; m_pid = new QCopChannel( channel, 0l ); - connect(m_pid, SIGNAL( received( const QCString&, const QByteArray& ) ), - this, SLOT( pidMessage( const QCString&, const QByteArray& ) ) ); + connect(m_pid, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT( pidMessage(const QCString&,const QByteArray&) ) ); // read the Pre QCOP Stuff from the file if ( file.isOpen() ) { d->keep_running = FALSE; QDataStream ds( &file ); QCString chanel, message; QByteArray data; while (!ds.atEnd() ) { ds >> chanel >> message >> data; d->enqueueQCop( chanel, message, data ); } flock( file.handle(), LOCK_UN ); file.close(); file.remove(); } // read in some stuff from the command line // we do not have setArgs so we need to take // care of that for ( int a = 0; a < arg; a++ ) { if ( qstrcmp( argv[a], "-preload" ) == 0 ) { d->preloaded = TRUE; }else if ( qstrcmp( argv[a ] , "-preload-show" ) == 0 ) { d->preloaded = TRUE; d->forceshow = TRUE; } } initTranslations(); applyStyle(); if ( type() == GuiServer ) ; installEventFilter( this ); QPEMenuToolFocusManager::initialize(); } void QPEApplication::initTranslations() { // Translations add it QStringList langs = Global::languageList(); for ( QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) { QString lang = *it; QTranslator * trans; QString tfn; trans = new QTranslator( this ); tfn = qpeDir() + "/i18n/" + lang + "/libqpe.qm"; if ( trans->load( tfn ) ) diff --git a/x11/libqpe-x11/qt/qcopchannel_qws.cpp b/x11/libqpe-x11/qt/qcopchannel_qws.cpp index 706756e..a82ba4d 100644 --- a/x11/libqpe-x11/qt/qcopchannel_qws.cpp +++ b/x11/libqpe-x11/qt/qcopchannel_qws.cpp @@ -1,64 +1,64 @@ #include "../../ipc/client/ocopclient.h" #include <qcopchannel_qws.h> QList<QCopChannel>* QCopChannel::m_list = 0; QMap<QCString, int> QCopChannel::m_refCount; QCopChannel::QCopChannel( const QCString& channel, QObject* parent, const char* name ) : QObject( parent, name ),m_chan(channel) { if (!m_list ) { m_list = new QList<QCopChannel>; /* only connect once */ - connect(OCOPClient::self(), SIGNAL(called(const QCString&, const QCString&, const QByteArray& ) ), - this, SLOT(rev(const QCString&, const QCString&, const QByteArray&) ) ); + connect(OCOPClient::self(), SIGNAL(called(const QCString&,const QCString&,const QByteArray&) ), + this, SLOT(rev(const QCString&,const QCString&,const QByteArray&) ) ); } /* first registration or ref count is 0 for m_chan*/ if (!m_refCount.contains( m_chan ) || !m_refCount[m_chan] ) { qWarning("adding channel %s", m_chan.data() ); m_refCount[m_chan] = 1; OCOPClient::self()->addChannel( m_chan ); }else{ qWarning("reffing up for %s %d", m_chan.data(), m_refCount[m_chan] ); m_refCount[m_chan]++; } m_list->append(this); } void QCopChannel::receive( const QCString& msg, const QByteArray& ar ) { emit received( msg, ar ); } QCopChannel::~QCopChannel() { if (m_refCount[m_chan] == 1 ) { OCOPClient::self()->delChannel( m_chan ); m_refCount[m_chan] = 0; }else m_refCount[m_chan]--; m_list->remove(this); if (m_list->count() == 0 ) { delete m_list; m_list = 0; } } QCString QCopChannel::channel()const { return m_chan; } bool QCopChannel::isRegistered( const QCString& chan) { if (m_refCount.contains(chan) ) { qDebug("Client:locally contains"); return true; } return OCOPClient::self()->isRegistered( chan ); } bool QCopChannel::send( const QCString& chan, const QCString& msg ) { QByteArray ar; return send(chan, msg, ar ); } bool QCopChannel::send( const QCString& chan, const QCString& msg, const QByteArray& ar ) { OCOPClient::self()->send( chan, msg, ar ); |