Diffstat (limited to 'noncore/net/opietooth/blue-pin/pindlg.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.cc | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc index 96be1e5..e40fe33 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.cc +++ b/noncore/net/opietooth/blue-pin/pindlg.cc @@ -14,20 +14,8 @@ #include <stdio.h> using namespace OpieTooth; -PinDlg::PinDlg( const QString& status, - const QString& mac, QWidget* parent, - const char* name ) - : PinDlgBase( parent, name, WType_Modal ) -{ - m_mac = mac; - test( mac ); - txtStatus->setText(status); - if(!m_mac.isEmpty()) - QPEApplication::showDialog( this ); -} - PinDlg::PinDlg(QWidget* parent, const char* name, Qt::WFlags f ) : PinDlgBase( parent, name, f ) @@ -37,15 +25,15 @@ PinDlg::PinDlg(QWidget* parent, if(m_mac.isEmpty()) { // can't obtain MAC printf("ERR\n"); - qApp->quit(); + ::exit(0); } else { test( m_mac ); txtStatus->setText(makeTextFromArgs()); - QPEApplication::showDialog( this ) ; + QPEApplication::showDialog( this , true) ; } } PinDlg::~PinDlg() @@ -67,14 +55,9 @@ void PinDlg::test( const QString& mac ) { Config cfg("bluepin"); cfg.setGroup(mac); lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); - if ( !lnePin->text().isEmpty() ) - { - //QTimer::singleShot(100, this, SLOT(accept() ) ); - } } - } QString PinDlg::makeTextFromArgs() { @@ -99,15 +82,15 @@ QString PinDlg::makeTextFromArgs() return status ; } else - return QString(); + return QString::null; } QString PinDlg::makeMacFromArgs() { if(qApp->argc() < 3) - return QString(); + return QString::null; else return qApp->argv()[2] ; } @@ -121,5 +104,6 @@ void PinDlg::accept() } printf("PIN:%s\n", lnePin->text().latin1()); QDialog::accept(); qApp->quit(); + ::exit(0); } |