~ubuntu-branches/ubuntu/intrepid/kdebluetooth/intrepid-proposed

« back to all changes in this revision

Viewing changes to src/obexsession/obexsession.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-09-03 15:34:52 UTC
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: james.westby@ubuntu.com-20080903153452-3toetwc46p1345s1
Tags: upstream-0.2
ImportĀ upstreamĀ versionĀ 0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <QVariant>
28
28
#include <KDebug>
29
29
 
 
30
#include <kmessagebox.h>
 
31
 
30
32
ObexSession::ObexSession(QObject* parent, const QString& addr, const QString& service) 
31
33
{
32
34
 
 
35
        session = manager = 0;
 
36
 
33
37
        QDBusConnection* dbus = new QDBusConnection("dbus");
34
38
        QDBusConnection dbusconn = dbus->connectToBus(QDBusConnection::SessionBus, "dbus");
35
39
 
54
58
 
55
59
ObexSession::~ObexSession() 
56
60
{
57
 
        delete session;
58
 
        delete manager;
 
61
        if(session)
 
62
                delete session;
 
63
        
 
64
        if(manager)
 
65
                delete manager;
59
66
}
60
67
 
61
68
 
86
93
 
87
94
void ObexSession::sessionCreatedError(QDBusError err)
88
95
{
89
 
 
90
96
        kDebug() << "Error creating Bluetooth Session: " << err.message();
91
 
 
 
97
        KMessageBox::error(0 , err.message(), "Error creating Bluetooth Session");
92
98
}
93
99
 
94
100