author | zecke <zecke> | 2005-02-20 13:06:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-02-20 13:06:59 (UTC) |
commit | cc00ea4b5def00b6664bd5d9c5e5d59f5ce62732 (patch) (side-by-side diff) | |
tree | 23c51eb79b9d81519b6cd50221b0bbb051415634 /noncore/net/opietooth/blue-pin/pindlg.cc | |
parent | bdbe220d0096667f26c8c25c1e1011c32fc54524 (diff) | |
download | opie-cc00ea4b5def00b6664bd5d9c5e5d59f5ce62732.zip opie-cc00ea4b5def00b6664bd5d9c5e5d59f5ce62732.tar.gz opie-cc00ea4b5def00b6664bd5d9c5e5d59f5ce62732.tar.bz2 |
-Use own main method
-Remove default c'tor and use the remaining one as default
-QString() -> QString::null (for Qt4 we will do the opposite)
-use qApp->quit() and exit to be sure to really exit
Still open: do not use the depcreated latin1 c'tor of QString,
it is safe to use it here though (we only get IN/OUT and a mac address)
Diffstat (limited to 'noncore/net/opietooth/blue-pin/pindlg.cc') (more/less context) (show 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 @@ -17,14 +17,2 @@ 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, @@ -40,3 +28,3 @@ PinDlg::PinDlg(QWidget* parent, printf("ERR\n"); - qApp->quit(); + ::exit(0); } @@ -46,3 +34,3 @@ PinDlg::PinDlg(QWidget* parent, txtStatus->setText(makeTextFromArgs()); - QPEApplication::showDialog( this ) ; + QPEApplication::showDialog( this , true) ; } @@ -70,8 +58,3 @@ void PinDlg::test( const QString& mac ) lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); - if ( !lnePin->text().isEmpty() ) - { - //QTimer::singleShot(100, this, SLOT(accept() ) ); - } } - } @@ -102,3 +85,3 @@ QString PinDlg::makeTextFromArgs() else - return QString(); + return QString::null; } @@ -108,3 +91,3 @@ QString PinDlg::makeMacFromArgs() if(qApp->argc() < 3) - return QString(); + return QString::null; else @@ -124,2 +107,3 @@ void PinDlg::accept() qApp->quit(); + ::exit(0); } |