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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index 092eb0c..19cf904 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -25,42 +25,42 @@
25#include <opie2/odebug.h> 25#include <opie2/odebug.h>
26#include <qtopia/qlibrary.h> 26#include <qtopia/qlibrary.h>
27#include <qtopia/qpeapplication.h> 27#include <qtopia/qpeapplication.h>
28 28
29/* QT */ 29/* QT */
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;
36 obexIface = 0; 36 obexIface = 0;
37 QString path = QPEApplication::qpeDir() + "/plugins/obex/"; 37 QString path = QPEApplication::qpeDir() + "plugins/obex/";
38#ifdef Q_OS_MACX 38#ifdef Q_OS_MACX
39 QDir dir( path, "lib*.dylib" ); 39 QDir dir( path, "lib*.dylib" );
40#else 40#else
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 //odebug << "trying lib " << (path + (*it)) << "" << oendl; 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 //odebug << "found obex lib" << oendl; 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 //odebug << "tr fpr obex: " << tfn << "" << oendl; 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 )