author | zecke <zecke> | 2004-07-15 22:37:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-15 22:37:54 (UTC) |
commit | ce300687815f369a8db5b3d1e1ea0f2819c9b9b6 (patch) (unidiff) | |
tree | 53e3ac9003ec5d46d60e1a339cbafca414e285bb | |
parent | 422e7757feae169d8c931f2f0ac1d5acc201f846 (diff) | |
download | opie-ce300687815f369a8db5b3d1e1ea0f2819c9b9b6.zip opie-ce300687815f369a8db5b3d1e1ea0f2819c9b9b6.tar.gz opie-ce300687815f369a8db5b3d1e1ea0f2819c9b9b6.tar.bz2 |
Stop crasing, do not do nasty stuff with parentWidget() which is now NULL
-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/keyz-cfg/cfgdlg.cpp b/noncore/apps/keyz-cfg/cfgdlg.cpp index 3965198..8d868d4 100644 --- a/noncore/apps/keyz-cfg/cfgdlg.cpp +++ b/noncore/apps/keyz-cfg/cfgdlg.cpp | |||
@@ -83,51 +83,50 @@ CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod): | |||
83 | //gl->addMultiCellWidget(enable, 7, 7, 0, 4); | 83 | //gl->addMultiCellWidget(enable, 7, 7, 0, 4); |
84 | } | 84 | } |
85 | 85 | ||
86 | CfgDlg::~CfgDlg() { | 86 | CfgDlg::~CfgDlg() { |
87 | } | 87 | } |
88 | 88 | ||
89 | void CfgDlg::add() { | 89 | void CfgDlg::add() { |
90 | if (!files->currentText().isEmpty()) { | 90 | if (!files->currentText().isEmpty()) { |
91 | QString t = files->currentText(); | 91 | QString t = files->currentText(); |
92 | files->removeItem(files->currentItem()); | 92 | files->removeItem(files->currentItem()); |
93 | keymaps->insertItem(t); | 93 | keymaps->insertItem(t); |
94 | cfile->replaceEntry(t, ""); | 94 | cfile->replaceEntry(t, ""); |
95 | m.replace(t, ""); | 95 | m.replace(t, ""); |
96 | } | 96 | } |
97 | } | 97 | } |
98 | 98 | ||
99 | void CfgDlg::del() { | 99 | void CfgDlg::del() { |
100 | if (!keymaps->currentText().isEmpty()) { | 100 | if (!keymaps->currentText().isEmpty()) { |
101 | QString t = keymaps->currentText(); | 101 | QString t = keymaps->currentText(); |
102 | keymaps->removeItem(keymaps->currentItem()); | 102 | keymaps->removeItem(keymaps->currentItem()); |
103 | cfile->deleteEntry(t); | 103 | cfile->deleteEntry(t); |
104 | files->insertItem(t); | 104 | files->insertItem(t); |
105 | m.remove(files->currentText()); | 105 | m.remove(files->currentText()); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | void CfgDlg::setLabel() { | 109 | void CfgDlg::setLabel() { |
110 | if (!keymaps->currentText().isEmpty()) { | 110 | if (!keymaps->currentText().isEmpty()) { |
111 | cfile->replaceEntry(keymaps->currentText(), | 111 | cfile->replaceEntry(keymaps->currentText(), |
112 | label->text()); | 112 | label->text()); |
113 | m.replace(keymaps->currentText(), label->text()); | 113 | m.replace(keymaps->currentText(), label->text()); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | void CfgDlg::keymapHighlighted(const QString&text) { | 117 | void CfgDlg::keymapHighlighted(const QString&text) { |
118 | label->setText(*m.find(text)); | 118 | label->setText(*m.find(text)); |
119 | } | 119 | } |
120 | 120 | ||
121 | 121 | ||
122 | void CfgDlg::accept() { | 122 | void CfgDlg::accept() { |
123 | cfile->setAutorepeatDelay(ad->value()); | 123 | cfile->setAutorepeatDelay(ad->value()); |
124 | cfile->setAutorepeatPeriod(ap->value()); | 124 | cfile->setAutorepeatPeriod(ap->value()); |
125 | 125 | ||
126 | CfgParser p; | 126 | CfgParser p; |
127 | p.save(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", *cfile); | 127 | p.save(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", *cfile); |
128 | QCopEnvelope("QPE/zkb", "reload()"); | 128 | QCopEnvelope("QPE/zkb", "reload()"); |
129 | 129 | ||
130 | QDialog::accept(); | 130 | QDialog::accept(); |
131 | parentWidget()->close(false); | ||
132 | } | 131 | } |
133 | 132 | ||