Diffstat (limited to 'noncore/securityplugins/pin/pin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/securityplugins/pin/pin.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/noncore/securityplugins/pin/pin.cpp b/noncore/securityplugins/pin/pin.cpp index c21ffcd..2accb9c 100644 --- a/noncore/securityplugins/pin/pin.cpp +++ b/noncore/securityplugins/pin/pin.cpp | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #include "pin.h" | 24 | #include "pin.h" |
25 | #include "pinDialogBase.h" | 25 | #include "pinDialogBase.h" |
26 | #include "pinConfigWidget.h" | ||
27 | /* OPIE */ | 26 | /* OPIE */ |
28 | #include <opie2/odebug.h> | 27 | #include <opie2/odebug.h> |
29 | #include <opie2/oapplication.h> | 28 | #include <opie2/oapplication.h> |
@@ -318,6 +317,16 @@ int PinPlugin::authenticate() | |||
318 | return MultiauthPluginObject::Success; | 317 | return MultiauthPluginObject::Success; |
319 | } | 318 | } |
320 | 319 | ||
320 | /// Standard c'tor | ||
321 | PinPlugin::PinPlugin() : MultiauthPluginObject(), m_pinW(0) { | ||
322 | } | ||
323 | |||
324 | /// deletes m_pinW if we need to | ||
325 | PinPlugin::~PinPlugin() { | ||
326 | if (m_pinW != 0) | ||
327 | delete m_pinW; | ||
328 | } | ||
329 | |||
321 | /// Simply returns the plugin name (PIN plugin) | 330 | /// Simply returns the plugin name (PIN plugin) |
322 | QString PinPlugin::pluginName() const { | 331 | QString PinPlugin::pluginName() const { |
323 | return "PIN Plugin"; | 332 | return "PIN Plugin"; |
@@ -333,12 +342,13 @@ QString PinPlugin::pixmapNameConfig() const { | |||
333 | 342 | ||
334 | /// returns a PinConfigWidget | 343 | /// returns a PinConfigWidget |
335 | MultiauthConfigWidget * PinPlugin::configWidget(QWidget * parent) { | 344 | MultiauthConfigWidget * PinPlugin::configWidget(QWidget * parent) { |
336 | PinConfigWidget * pinw = new PinConfigWidget(parent, "PIN configuration widget"); | 345 | if (m_pinW == 0) { |
337 | 346 | m_pinW = new PinConfigWidget(parent, "PIN configuration widget"); | |
338 | connect(pinw->changePIN, SIGNAL( clicked() ), this, SLOT( changePIN() )); | ||
339 | connect(pinw->clearPIN, SIGNAL( clicked() ), this, SLOT( clearPIN() )); | ||
340 | 347 | ||
341 | return pinw; | 348 | connect(m_pinW->changePIN, SIGNAL( clicked() ), this, SLOT( changePIN() )); |
349 | connect(m_pinW->clearPIN, SIGNAL( clicked() ), this, SLOT( clearPIN() )); | ||
350 | } | ||
351 | return m_pinW; | ||
342 | } | 352 | } |
343 | 353 | ||
344 | #include "pin.moc" | 354 | #include "pin.moc" |