summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/irserver.cpp4
-rw-r--r--core/launcher/irserver.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index b22e064..2147d0a 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -14,12 +14,12 @@ IrServer::IrServer( QObject *parent, const char *name )
14 : QObject( parent, name ) 14 : QObject( parent, name )
15{ 15{
16 lib = 0; 16 lib = 0;
17 iface = 0;
17 QString path = QPEApplication::qpeDir() + "/plugins/obex/"; 18 QString path = QPEApplication::qpeDir() + "/plugins/obex/";
18 QDir dir( path, "lib*.so" ); 19 QDir dir( path, "lib*.so" );
19 QStringList list = dir.entryList(); 20 QStringList list = dir.entryList();
20 QStringList::Iterator it; 21 QStringList::Iterator it;
21 for ( it = list.begin(); it != list.end(); ++it ) { 22 for ( it = list.begin(); it != list.end(); ++it ) {
22 ObexInterface *iface = 0;
23 QLibrary *trylib = new QLibrary( path + *it ); 23 QLibrary *trylib = new QLibrary( path + *it );
24 qDebug("trying lib %s", (path + (*it)).latin1() ); 24 qDebug("trying lib %s", (path + (*it)).latin1() );
25 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 25 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
@@ -46,5 +46,7 @@ IrServer::IrServer( QObject *parent, const char *name )
46 46
47IrServer::~IrServer() 47IrServer::~IrServer()
48{ 48{
49 if ( iface )
50 iface->release();
49 delete lib; 51 delete lib;
50} 52}
diff --git a/core/launcher/irserver.h b/core/launcher/irserver.h
index f9f682f..b3434dd 100644
--- a/core/launcher/irserver.h
+++ b/core/launcher/irserver.h
@@ -5,6 +5,7 @@
5 5
6class QCopChannel; 6class QCopChannel;
7class QLibrary; 7class QLibrary;
8struct ObexInterface;
8 9
9class IrServer : public QObject 10class IrServer : public QObject
10{ 11{
@@ -15,6 +16,7 @@ public:
15 16
16private: 17private:
17 QLibrary *lib; 18 QLibrary *lib;
19 ObexInterface *iface;
18}; 20};
19 21
20#endif 22#endif