summaryrefslogtreecommitdiff
path: root/x11
Unidiff
Diffstat (limited to 'x11') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp8
-rw-r--r--x11/libqpe-x11/qt/qcopchannel_qws.cpp4
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
@@ -270,59 +270,59 @@ QPEApplication::QPEApplication(int &arg, char** argv, Type t)
270 }else if ( dw > 600 ) { 270 }else if ( dw > 600 ) {
271 setFont( QFont( "helvetica", 12 ) ); 271 setFont( QFont( "helvetica", 12 ) );
272 AppLnk::setSmallIconSize( 24 ); 272 AppLnk::setSmallIconSize( 24 );
273 AppLnk::setBigIconSize( 48 ); 273 AppLnk::setBigIconSize( 48 );
274 }else if ( dw > 200 ) { 274 }else if ( dw > 200 ) {
275 setFont( QFont( "helvetica", 10 ) ); 275 setFont( QFont( "helvetica", 10 ) );
276 AppLnk::setSmallIconSize( 16 ); 276 AppLnk::setSmallIconSize( 16 );
277 AppLnk::setBigIconSize( 32 ); 277 AppLnk::setBigIconSize( 32 );
278 } 278 }
279 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory ); 279 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory );
280 280
281 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT(hideOrQuit() ) ); 281 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT(hideOrQuit() ) );
282 282
283 QString qcopfn( "/tmp/qcop-msg-" ); 283 QString qcopfn( "/tmp/qcop-msg-" );
284 qcopfn += QString( argv[0] ); // append command name to the QCOP name 284 qcopfn += QString( argv[0] ); // append command name to the QCOP name
285 QFile file( qcopfn ); 285 QFile file( qcopfn );
286 if (file.open(IO_ReadOnly ) ) { 286 if (file.open(IO_ReadOnly ) ) {
287 flock( file.handle(), LOCK_EX ); 287 flock( file.handle(), LOCK_EX );
288 } 288 }
289 289
290 /* Hmmm damn we need to make the parent 0l otherwise it get's deleted 290 /* Hmmm damn we need to make the parent 0l otherwise it get's deleted
291 * past the QApplication 291 * past the QApplication
292 */ 292 */
293 m_sys = new QCopChannel( "QPE/System", 0l); 293 m_sys = new QCopChannel( "QPE/System", 0l);
294 connect(m_sys, SIGNAL( received( const QCString&, const QByteArray& ) ), 294 connect(m_sys, SIGNAL( received(const QCString&,const QByteArray&) ),
295 this, SLOT(systemMessage( const QCString&, const QByteArray& ) ) ); 295 this, SLOT(systemMessage(const QCString&,const QByteArray&) ) );
296 296
297 // private channel QPE/Application/appname 297 // private channel QPE/Application/appname
298 QCString channel = QCString( argv[0] ); 298 QCString channel = QCString( argv[0] );
299 channel.replace( QRegExp( ".*/"), "" ); 299 channel.replace( QRegExp( ".*/"), "" );
300 d->appName = channel; 300 d->appName = channel;
301 channel = "QPE/Application/"+ channel; 301 channel = "QPE/Application/"+ channel;
302 m_pid = new QCopChannel( channel, 0l ); 302 m_pid = new QCopChannel( channel, 0l );
303 connect(m_pid, SIGNAL( received( const QCString&, const QByteArray& ) ), 303 connect(m_pid, SIGNAL( received(const QCString&,const QByteArray&) ),
304 this, SLOT( pidMessage( const QCString&, const QByteArray& ) ) ); 304 this, SLOT( pidMessage(const QCString&,const QByteArray&) ) );
305 305
306 // read the Pre QCOP Stuff from the file 306 // read the Pre QCOP Stuff from the file
307 if ( file.isOpen() ) { 307 if ( file.isOpen() ) {
308 d->keep_running = FALSE; 308 d->keep_running = FALSE;
309 QDataStream ds( &file ); 309 QDataStream ds( &file );
310 QCString chanel, message; 310 QCString chanel, message;
311 QByteArray data; 311 QByteArray data;
312 while (!ds.atEnd() ) { 312 while (!ds.atEnd() ) {
313 ds >> chanel >> message >> data; 313 ds >> chanel >> message >> data;
314 d->enqueueQCop( chanel, message, data ); 314 d->enqueueQCop( chanel, message, data );
315 } 315 }
316 flock( file.handle(), LOCK_UN ); 316 flock( file.handle(), LOCK_UN );
317 file.close(); 317 file.close();
318 file.remove(); 318 file.remove();
319 } 319 }
320 320
321 // read in some stuff from the command line 321 // read in some stuff from the command line
322 // we do not have setArgs so we need to take 322 // we do not have setArgs so we need to take
323 // care of that 323 // care of that
324 for ( int a = 0; a < arg; a++ ) { 324 for ( int a = 0; a < arg; a++ ) {
325 if ( qstrcmp( argv[a], "-preload" ) == 0 ) { 325 if ( qstrcmp( argv[a], "-preload" ) == 0 ) {
326 d->preloaded = TRUE; 326 d->preloaded = TRUE;
327 }else if ( qstrcmp( argv[a ] , "-preload-show" ) == 0 ) { 327 }else if ( qstrcmp( argv[a ] , "-preload-show" ) == 0 ) {
328 d->preloaded = TRUE; 328 d->preloaded = TRUE;
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,40 +1,40 @@
1 1
2#include "../../ipc/client/ocopclient.h" 2#include "../../ipc/client/ocopclient.h"
3 3
4#include <qcopchannel_qws.h> 4#include <qcopchannel_qws.h>
5 5
6QList<QCopChannel>* QCopChannel::m_list = 0; 6QList<QCopChannel>* QCopChannel::m_list = 0;
7QMap<QCString, int> QCopChannel::m_refCount; 7QMap<QCString, int> QCopChannel::m_refCount;
8 8
9QCopChannel::QCopChannel( const QCString& channel, QObject* parent, 9QCopChannel::QCopChannel( const QCString& channel, QObject* parent,
10 const char* name ) 10 const char* name )
11 : QObject( parent, name ),m_chan(channel) { 11 : QObject( parent, name ),m_chan(channel) {
12 if (!m_list ) { 12 if (!m_list ) {
13 m_list = new QList<QCopChannel>; 13 m_list = new QList<QCopChannel>;
14 /* only connect once */ 14 /* only connect once */
15 connect(OCOPClient::self(), SIGNAL(called(const QCString&, const QCString&, const QByteArray& ) ), 15 connect(OCOPClient::self(), SIGNAL(called(const QCString&,const QCString&,const QByteArray&) ),
16 this, SLOT(rev(const QCString&, const QCString&, const QByteArray&) ) ); 16 this, SLOT(rev(const QCString&,const QCString&,const QByteArray&) ) );
17 } 17 }
18 /* first registration or ref count is 0 for m_chan*/ 18 /* first registration or ref count is 0 for m_chan*/
19 if (!m_refCount.contains( m_chan ) || !m_refCount[m_chan] ) { 19 if (!m_refCount.contains( m_chan ) || !m_refCount[m_chan] ) {
20 qWarning("adding channel %s", m_chan.data() ); 20 qWarning("adding channel %s", m_chan.data() );
21 m_refCount[m_chan] = 1; 21 m_refCount[m_chan] = 1;
22 OCOPClient::self()->addChannel( m_chan ); 22 OCOPClient::self()->addChannel( m_chan );
23 }else{ 23 }else{
24 qWarning("reffing up for %s %d", m_chan.data(), m_refCount[m_chan] ); 24 qWarning("reffing up for %s %d", m_chan.data(), m_refCount[m_chan] );
25 m_refCount[m_chan]++; 25 m_refCount[m_chan]++;
26 } 26 }
27 27
28 m_list->append(this); 28 m_list->append(this);
29} 29}
30void QCopChannel::receive( const QCString& msg, const QByteArray& ar ) { 30void QCopChannel::receive( const QCString& msg, const QByteArray& ar ) {
31 emit received( msg, ar ); 31 emit received( msg, ar );
32} 32}
33QCopChannel::~QCopChannel() { 33QCopChannel::~QCopChannel() {
34 if (m_refCount[m_chan] == 1 ) { 34 if (m_refCount[m_chan] == 1 ) {
35 OCOPClient::self()->delChannel( m_chan ); 35 OCOPClient::self()->delChannel( m_chan );
36 m_refCount[m_chan] = 0; 36 m_refCount[m_chan] = 0;
37 }else 37 }else
38 m_refCount[m_chan]--; 38 m_refCount[m_chan]--;
39 39
40 40