summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -13,14 +13,14 @@
IrServer::IrServer( QObject *parent, const char *name )
: QObject( parent, name )
{
lib = 0;
+ iface = 0;
QString path = QPEApplication::qpeDir() + "/plugins/obex/";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
- ObexInterface *iface = 0;
QLibrary *trylib = new QLibrary( path + *it );
qDebug("trying lib %s", (path + (*it)).latin1() );
if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
lib = trylib;
@@ -45,6 +45,8 @@ IrServer::IrServer( QObject *parent, const char *name )
}
IrServer::~IrServer()
{
+ if ( iface )
+ iface->release();
delete lib;
}
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
@@ -4,8 +4,9 @@
#include <qobject.h>
class QCopChannel;
class QLibrary;
+struct ObexInterface;
class IrServer : public QObject
{
Q_OBJECT
@@ -14,7 +15,8 @@ public:
~IrServer();
private:
QLibrary *lib;
+ ObexInterface *iface;
};
#endif