author | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
commit | df14f647ff1a60ca82e0fa9bd91458be146153b8 (patch) (unidiff) | |
tree | 4859961352851a4392e1442f2080c15bff8ad7bc /core/launcher/irserver.cpp | |
parent | 419f9710c488f56a7a117eb1529970d3371e0094 (diff) | |
download | opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.zip opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.gz opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.bz2 |
Replace QPEApplication::qpeDir() + "/ with
QPEApplication::qpeDir() + "
as it is guranteed that qpeDir() will have '/' as the last
charachter
-rw-r--r-- | core/launcher/irserver.cpp | 4 |
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 | |||
@@ -21,50 +21,50 @@ | |||
21 | #include "irserver.h" | 21 | #include "irserver.h" |
22 | #include "obexinterface.h" | 22 | #include "obexinterface.h" |
23 | 23 | ||
24 | /* OPIE */ | 24 | /* OPIE */ |
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 | ||
32 | IrServer::IrServer( QObject *parent, const char *name ) | 32 | IrServer::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 ) |
67 | odebug << "could not load IR plugin" << oendl; | 67 | odebug << "could not load IR plugin" << oendl; |
68 | } | 68 | } |
69 | 69 | ||
70 | IrServer::~IrServer() | 70 | IrServer::~IrServer() |