summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth
authorzecke <zecke>2005-02-20 13:06:59 (UTC)
committer zecke <zecke>2005-02-20 13:06:59 (UTC)
commitcc00ea4b5def00b6664bd5d9c5e5d59f5ce62732 (patch) (unidiff)
tree23c51eb79b9d81519b6cd50221b0bbb051415634 /noncore/net/opietooth
parentbdbe220d0096667f26c8c25c1e1011c32fc54524 (diff)
downloadopie-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') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/blue-pin/main.cc9
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc26
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.h9
-rw-r--r--noncore/net/opietooth/blue-pin/pindlgbase.ui56
4 files changed, 20 insertions, 80 deletions
diff --git a/noncore/net/opietooth/blue-pin/main.cc b/noncore/net/opietooth/blue-pin/main.cc
index dbe5b41..90d42e0 100644
--- a/noncore/net/opietooth/blue-pin/main.cc
+++ b/noncore/net/opietooth/blue-pin/main.cc
@@ -9,3 +9,8 @@
9 9
10using namespace Opie::Core; 10int main(int argc, char *argv[]) {
11OPIE_EXPORT_APP( OApplicationFactory<OpieTooth::PinDlg> ) 11 QPEApplication oapp(argc, argv);
12
13 OpieTooth::PinDlg dlg;
14 return oapp.exec();
15}
16
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;
17 17
18PinDlg::PinDlg( const QString& status,
19 const QString& mac, QWidget* parent,
20 const char* name )
21 : PinDlgBase( parent, name, WType_Modal )
22{
23 m_mac = mac;
24 test( mac );
25 txtStatus->setText(status);
26 if(!m_mac.isEmpty())
27 QPEApplication::showDialog( this );
28}
29
30PinDlg::PinDlg(QWidget* parent, 18PinDlg::PinDlg(QWidget* parent,
@@ -40,3 +28,3 @@ PinDlg::PinDlg(QWidget* parent,
40 printf("ERR\n"); 28 printf("ERR\n");
41 qApp->quit(); 29 ::exit(0);
42 } 30 }
@@ -46,3 +34,3 @@ PinDlg::PinDlg(QWidget* parent,
46 txtStatus->setText(makeTextFromArgs()); 34 txtStatus->setText(makeTextFromArgs());
47 QPEApplication::showDialog( this ) ; 35 QPEApplication::showDialog( this , true) ;
48 } 36 }
@@ -70,8 +58,3 @@ void PinDlg::test( const QString& mac )
70 lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); 58 lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) );
71 if ( !lnePin->text().isEmpty() )
72 {
73 //QTimer::singleShot(100, this, SLOT(accept() ) );
74 }
75 } 59 }
76
77} 60}
@@ -102,3 +85,3 @@ QString PinDlg::makeTextFromArgs()
102 else 85 else
103 return QString(); 86 return QString::null;
104} 87}
@@ -108,3 +91,3 @@ QString PinDlg::makeMacFromArgs()
108 if(qApp->argc() < 3) 91 if(qApp->argc() < 3)
109 return QString(); 92 return QString::null;
110 else 93 else
@@ -124,2 +107,3 @@ void PinDlg::accept()
124 qApp->quit(); 107 qApp->quit();
108 ::exit(0);
125} 109}
diff --git a/noncore/net/opietooth/blue-pin/pindlg.h b/noncore/net/opietooth/blue-pin/pindlg.h
index 5f7dc55..8623274 100644
--- a/noncore/net/opietooth/blue-pin/pindlg.h
+++ b/noncore/net/opietooth/blue-pin/pindlg.h
@@ -12,10 +12,3 @@ namespace OpieTooth {
12 public: 12 public:
13 PinDlg(const QString& text="", 13 PinDlg(QWidget* parent = 0,const char* name = 0, Qt::WFlags f = 0);
14 const QString& mac="",
15 QWidget* parent = 0,
16 const char* name= 0 );
17
18 PinDlg(QWidget* parent,
19 const char* name,
20 Qt::WFlags f );
21 14
diff --git a/noncore/net/opietooth/blue-pin/pindlgbase.ui b/noncore/net/opietooth/blue-pin/pindlgbase.ui
index 6784de7..a79bb49 100644
--- a/noncore/net/opietooth/blue-pin/pindlgbase.ui
+++ b/noncore/net/opietooth/blue-pin/pindlgbase.ui
@@ -14,4 +14,4 @@
14 <y>0</y> 14 <y>0</y>
15 <width>254</width> 15 <width>267</width>
16 <height>245</height> 16 <height>161</height>
17 </rect> 17 </rect>
@@ -22,3 +22,3 @@
22 </property> 22 </property>
23 <vbox> 23 <grid>
24 <property stdset="1"> 24 <property stdset="1">
@@ -31,24 +31,3 @@
31 </property> 31 </property>
32 <spacer> 32 <widget row="0" column="0" >
33 <property>
34 <name>name</name>
35 <cstring>Spacer4_2</cstring>
36 </property>
37 <property stdset="1">
38 <name>orientation</name>
39 <enum>Vertical</enum>
40 </property>
41 <property stdset="1">
42 <name>sizeType</name>
43 <enum>Expanding</enum>
44 </property>
45 <property>
46 <name>sizeHint</name>
47 <size>
48 <width>20</width>
49 <height>20</height>
50 </size>
51 </property>
52 </spacer>
53 <widget>
54 <class>QLabel</class> 33 <class>QLabel</class>
@@ -67,3 +46,3 @@
67 </widget> 46 </widget>
68 <widget> 47 <widget row="1" column="0" >
69 <class>QLayoutWidget</class> 48 <class>QLayoutWidget</class>
@@ -155,24 +134,3 @@
155 </widget> 134 </widget>
156 <spacer> 135 <widget row="2" column="0" >
157 <property>
158 <name>name</name>
159 <cstring>Spacer5</cstring>
160 </property>
161 <property stdset="1">
162 <name>orientation</name>
163 <enum>Vertical</enum>
164 </property>
165 <property stdset="1">
166 <name>sizeType</name>
167 <enum>Expanding</enum>
168 </property>
169 <property>
170 <name>sizeHint</name>
171 <size>
172 <width>20</width>
173 <height>20</height>
174 </size>
175 </property>
176 </spacer>
177 <widget>
178 <class>QLayoutWidget</class> 136 <class>QLayoutWidget</class>
@@ -257,3 +215,3 @@
257 </widget> 215 </widget>
258 </vbox> 216 </grid>
259</widget> 217</widget>