Diffstat (limited to 'noncore/securityplugins/blueping/bluepingplugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/securityplugins/blueping/bluepingplugin.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/noncore/securityplugins/blueping/bluepingplugin.cpp b/noncore/securityplugins/blueping/bluepingplugin.cpp index 05fd3c2..f5d9ad6 100644 --- a/noncore/securityplugins/blueping/bluepingplugin.cpp +++ b/noncore/securityplugins/blueping/bluepingplugin.cpp | |||
@@ -17,15 +17,14 @@ using Opie::Security::MultiauthConfigWidget; | |||
17 | 17 | ||
18 | 18 | ||
19 | /// creates and initializes the m_config Config object | 19 | /// standard c'tor |
20 | BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0) { | 20 | BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0), m_bluepingW(0) { |
21 | m_config = new Config("Security"); | ||
22 | m_config->setGroup("BluepingPlugin"); | ||
23 | bluetoothAlreadyRestarted = false; | 21 | bluetoothAlreadyRestarted = false; |
24 | } | 22 | } |
25 | 23 | ||
26 | /// deletes the m_config Config object and noticeW if necessary | 24 | /// cleans m_ping if we need to |
27 | BluepingPlugin::~BluepingPlugin() { | 25 | BluepingPlugin::~BluepingPlugin() { |
28 | delete m_config; | ||
29 | delete m_ping; | 26 | delete m_ping; |
27 | if (m_bluepingW != 0) | ||
28 | delete m_bluepingW; | ||
30 | } | 29 | } |
31 | 30 | ||
@@ -35,7 +34,9 @@ QString BluepingPlugin::pluginName() const { | |||
35 | } | 34 | } |
36 | 35 | ||
37 | /// no configuration widget for the moment | 36 | /// returns a BluepingConfigWidget |
38 | MultiauthConfigWidget * BluepingPlugin::configWidget(QWidget * parent) { | 37 | MultiauthConfigWidget * BluepingPlugin::configWidget(QWidget * parent) { |
39 | return 0l; | 38 | if (m_bluepingW == 0) |
39 | m_bluepingW = new BluepingConfigWidget(parent, "Blueping configuration widget"); | ||
40 | return m_bluepingW; | ||
40 | } | 41 | } |
41 | QString BluepingPlugin::pixmapNameWidget() const { | 42 | QString BluepingPlugin::pixmapNameWidget() const { |
@@ -43,5 +44,5 @@ QString BluepingPlugin::pixmapNameWidget() const { | |||
43 | } | 44 | } |
44 | QString BluepingPlugin::pixmapNameConfig() const { | 45 | QString BluepingPlugin::pixmapNameConfig() const { |
45 | return 0l; | 46 | return "security/bluepingplugin"; |
46 | } | 47 | } |
47 | 48 | ||
@@ -136,4 +137,6 @@ int BluepingPlugin::authenticate() { | |||
136 | QObject::connect(this, SIGNAL(emitCode(int)), &bluepingDialog, SLOT(done(int))); | 137 | QObject::connect(this, SIGNAL(emitCode(int)), &bluepingDialog, SLOT(done(int))); |
137 | 138 | ||
139 | // we can uncomment the following when testing | ||
140 | //bluetoothAlreadyRestarted = true; | ||
138 | if (!bluetoothAlreadyRestarted) | 141 | if (!bluetoothAlreadyRestarted) |
139 | { | 142 | { |