author | harlekin <harlekin> | 2003-03-09 23:16:17 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-09 23:16:17 (UTC) |
commit | a552546244601de73a4bdab071cb780309ed3c67 (patch) (unidiff) | |
tree | 22a1ca9b06dbd9d254da7c99f59ca191c9de93b8 | |
parent | 57e77709dcf3967c2ca4f83f7206b14c51ed3b03 (diff) | |
download | opie-a552546244601de73a4bdab071cb780309ed3c67.zip opie-a552546244601de73a4bdab071cb780309ed3c67.tar.gz opie-a552546244601de73a4bdab071cb780309ed3c67.tar.bz2 |
stop bluetooth when exiting opie
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 3fdbde0..f1618ae 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp | |||
@@ -49,32 +49,35 @@ | |||
49 | namespace OpieTooth { | 49 | namespace OpieTooth { |
50 | 50 | ||
51 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { | 51 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { |
52 | setFixedHeight( 18 ); | 52 | setFixedHeight( 18 ); |
53 | setFixedWidth( 14 ); | 53 | setFixedWidth( 14 ); |
54 | bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); | 54 | bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); |
55 | bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); | 55 | bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); |
56 | // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); | 56 | // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); |
57 | startTimer(4000); | 57 | startTimer(4000); |
58 | btDevice = 0; | 58 | btDevice = 0; |
59 | bluezactive = false; | 59 | bluezactive = false; |
60 | bluezDiscoveryActive = false; | 60 | bluezDiscoveryActive = false; |
61 | 61 | ||
62 | } | 62 | } |
63 | 63 | ||
64 | BluezApplet::~BluezApplet() { | 64 | BluezApplet::~BluezApplet() { |
65 | if ( btDevice ) { | ||
66 | delete btDevice; | ||
67 | } | ||
65 | } | 68 | } |
66 | 69 | ||
67 | bool BluezApplet::checkBluezStatus() { | 70 | bool BluezApplet::checkBluezStatus() { |
68 | if (btDevice) { | 71 | if (btDevice) { |
69 | if (btDevice->isLoaded() ) { | 72 | if (btDevice->isLoaded() ) { |
70 | return true; | 73 | return true; |
71 | } else { | 74 | } else { |
72 | return false; | 75 | return false; |
73 | } | 76 | } |
74 | } else { | 77 | } else { |
75 | return false; | 78 | return false; |
76 | } | 79 | } |
77 | } | 80 | } |
78 | 81 | ||
79 | int BluezApplet::setBluezStatus(int c) { | 82 | int BluezApplet::setBluezStatus(int c) { |
80 | 83 | ||