summaryrefslogtreecommitdiff
path: root/core/launcher/irserver.cpp
Unidiff
Diffstat (limited to 'core/launcher/irserver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/irserver.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index a0e9c16..092eb0c 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -15,21 +15,21 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21
22#include "irserver.h" 21#include "irserver.h"
22#include "obexinterface.h"
23 23
24/* OPIE */
25#include <opie2/odebug.h>
24#include <qtopia/qlibrary.h> 26#include <qtopia/qlibrary.h>
25#include <qtopia/qpeapplication.h> 27#include <qtopia/qpeapplication.h>
26 28
27 29/* QT */
28#include "obexinterface.h"
29
30#include <qdir.h> 30#include <qdir.h>
31 31
32IrServer::IrServer( QObject *parent, const char *name ) 32IrServer::IrServer( QObject *parent, const char *name )
33 : QObject( parent, name ), obexIface(0) 33 : QObject( parent, name ), obexIface(0)
34{ 34{
35 lib = 0; 35 lib = 0;
@@ -41,33 +41,33 @@ IrServer::IrServer( QObject *parent, const char *name )
41 QDir dir( path, "lib*.so" ); 41 QDir dir( path, "lib*.so" );
42#endif /* Q_OS_MACX */ 42#endif /* Q_OS_MACX */
43 QStringList list = dir.entryList(); 43 QStringList list = dir.entryList();
44 QStringList::Iterator it; 44 QStringList::Iterator it;
45 for ( it = list.begin(); it != list.end(); ++it ) { 45 for ( it = list.begin(); it != list.end(); ++it ) {
46 QLibrary *trylib = new QLibrary( path + *it ); 46 QLibrary *trylib = new QLibrary( path + *it );
47 //qDebug("trying lib %s", (path + (*it)).latin1() ); 47 //odebug << "trying lib " << (path + (*it)) << "" << oendl;
48 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { 48 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
49 lib = trylib; 49 lib = trylib;
50 //qDebug("found obex lib" ); 50 //odebug << "found obex lib" << oendl;
51 QString lang = getenv( "LANG" ); 51 QString lang = getenv( "LANG" );
52 QTranslator * trans = new QTranslator(qApp); 52 QTranslator * trans = new QTranslator(qApp);
53 QString type = (*it).left( (*it).find(".") ); 53 QString type = (*it).left( (*it).find(".") );
54 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 54 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
55 //qDebug("tr fpr obex: %s", tfn.latin1() ); 55 //odebug << "tr fpr obex: " << tfn << "" << oendl;
56 if ( trans->load( tfn )) 56 if ( trans->load( tfn ))
57 qApp->installTranslator( trans ); 57 qApp->installTranslator( trans );
58 else 58 else
59 delete trans; 59 delete trans;
60 60
61 break; 61 break;
62 } else { 62 } else {
63 delete lib; 63 delete lib;
64 } 64 }
65 } 65 }
66 if ( !lib ) 66 if ( !lib )
67 qDebug("could not load IR plugin" ); 67 odebug << "could not load IR plugin" << oendl;
68} 68}
69 69
70IrServer::~IrServer() 70IrServer::~IrServer()
71{ 71{
72 if ( obexIface ) 72 if ( obexIface )
73 obexIface->release(); 73 obexIface->release();