summaryrefslogtreecommitdiff
path: root/noncore
authorzecke <zecke>2005-02-14 17:53:31 (UTC)
committer zecke <zecke>2005-02-14 17:53:31 (UTC)
commit41881e3dcd695dc8ecdc5ef22cefd6f842858992 (patch) (unidiff)
treebd533c7e75700bbafb69ab8a7cd53eb031969080 /noncore
parent0e6780c400fbae2ccd8895e40480adb4273906ae (diff)
downloadopie-41881e3dcd695dc8ecdc5ef22cefd6f842858992.zip
opie-41881e3dcd695dc8ecdc5ef22cefd6f842858992.tar.gz
opie-41881e3dcd695dc8ecdc5ef22cefd6f842858992.tar.bz2
Remove the special Ok/Cancel handling and go with what QDialog provides
This also fixes crashes when the user clicked ok in the Dialog
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opierdesktop/qtwin.cpp21
-rw-r--r--noncore/net/opierdesktop/qtwin.h6
2 files changed, 5 insertions, 22 deletions
diff --git a/noncore/net/opierdesktop/qtwin.cpp b/noncore/net/opierdesktop/qtwin.cpp
index 181d275..54a5a03 100644
--- a/noncore/net/opierdesktop/qtwin.cpp
+++ b/noncore/net/opierdesktop/qtwin.cpp
@@ -181,15 +181,4 @@ QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true)
181 FullScreenCheckBox->move(10, 230); 181 FullScreenCheckBox->move(10, 230);
182 // ok button 182 // ok button
183 OKButton = new QPushButton(this);
184 OKButton->setText("OK");
185 OKButton->move(100, 240);
186 OKButton->resize(50, 20);
187 connect(OKButton, SIGNAL(clicked()), this, SLOT(OKClicked()));
188 // cancel button
189 CancelButton = new QPushButton(this);
190 CancelButton->setText("Cancel");
191 CancelButton->move(160, 240);
192 CancelButton->resize(50, 20);
193 connect(CancelButton, SIGNAL(clicked()), this, SLOT(CancelClicked()));
194 183
195 for (i = 0; i < 10; i++) 184 for (i = 0; i < 10; i++)
@@ -278,5 +267,5 @@ void QMyDialog::ComboChanged(int index)
278 267
279//***************************************************************************** 268//*****************************************************************************
280void QMyDialog::OKClicked() 269void QMyDialog::accept()
281{ 270{
282 ServerName = ServerNameEdit->text(); 271 ServerName = ServerNameEdit->text();
@@ -286,13 +275,9 @@ void QMyDialog::OKClicked()
286 ServerIP = IPEdit->text(); 275 ServerIP = IPEdit->text();
287 FullScreen = FullScreenCheckBox->isChecked(); 276 FullScreen = FullScreenCheckBox->isChecked();
288 done(1);
289}
290 277
291//***************************************************************************** 278 QDialog::accept();
292void QMyDialog::CancelClicked()
293{
294 done(0);
295} 279}
296 280
281
297//***************************************************************************** 282//*****************************************************************************
298void QMyDialog::AddClicked() 283void QMyDialog::AddClicked()
diff --git a/noncore/net/opierdesktop/qtwin.h b/noncore/net/opierdesktop/qtwin.h
index 38ad190..7a2110b 100644
--- a/noncore/net/opierdesktop/qtwin.h
+++ b/noncore/net/opierdesktop/qtwin.h
@@ -29,6 +29,4 @@ class QMyDialog: public QDialog
29 public: 29 public:
30 QListBox* ListBox; 30 QListBox* ListBox;
31 QPushButton* OKButton;
32 QPushButton* CancelButton;
33 QLabel* Label1; 31 QLabel* Label1;
34 QLineEdit* ServerNameEdit; 32 QLineEdit* ServerNameEdit;
@@ -47,6 +45,4 @@ class QMyDialog: public QDialog
47 public slots: 45 public slots:
48 void ComboChanged(int); 46 void ComboChanged(int);
49 void OKClicked();
50 void CancelClicked();
51 void AddClicked(); 47 void AddClicked();
52 void EditClicked(); 48 void EditClicked();
@@ -63,4 +59,6 @@ class QMyDialog: public QDialog
63 int FullScreen; 59 int FullScreen;
64 QMyConnectionItem* ConnectionList[10]; 60 QMyConnectionItem* ConnectionList[10];
61 protected slots:
62 void accept();
65}; 63};
66 64