summaryrefslogtreecommitdiffabout
path: root/pwmanager
Unidiff
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/editcategory.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/editcategory.cpp b/pwmanager/pwmanager/editcategory.cpp
index 4e55de8..4e2378c 100644
--- a/pwmanager/pwmanager/editcategory.cpp
+++ b/pwmanager/pwmanager/editcategory.cpp
@@ -124,48 +124,49 @@ void editCategoryWnd::slotApply()
124 QString cat = categoryComboBox->currentText(); 124 QString cat = categoryComboBox->currentText();
125 125
126 unsigned int idx; 126 unsigned int idx;
127 bool found = doc->findCategory(cat, &idx); 127 bool found = doc->findCategory(cat, &idx);
128 128
129 if (found == true) 129 if (found == true)
130 { 130 {
131 PwMCategoryItem* catitem = doc->getCategoryEntry(idx); 131 PwMCategoryItem* catitem = doc->getCategoryEntry(idx);
132 132
133 catitem->desc_text = descLineEdit->text().latin1(); 133 catitem->desc_text = descLineEdit->text().latin1();
134 catitem->name_text = usernameLineEdit->text().latin1(); 134 catitem->name_text = usernameLineEdit->text().latin1();
135 catitem->pw_text = pwLineEdit->text().latin1(); 135 catitem->pw_text = pwLineEdit->text().latin1();
136 enableButton( KDialogBase::Apply, false ); 136 enableButton( KDialogBase::Apply, false );
137 return; 137 return;
138 } 138 }
139 139
140 BUG(); 140 BUG();
141 141
142} 142}
143 143
144void editCategoryWnd::cancel_slot() 144void editCategoryWnd::cancel_slot()
145{ 145{
146 QString cat = categoryComboBox->currentText(); 146 QString cat = categoryComboBox->currentText();
147 categorySelected ( cat ); 147 categorySelected ( cat );
148 reject();
148} 149}
149 150
150void editCategoryWnd::setCurrCategory(const QString &cat) 151void editCategoryWnd::setCurrCategory(const QString &cat)
151{ 152{
152 int i, count = categoryComboBox->count(); 153 int i, count = categoryComboBox->count();
153 154
154 for (i = 0; i < count; ++i) { 155 for (i = 0; i < count; ++i) {
155 if (categoryComboBox->text(i) == cat) { 156 if (categoryComboBox->text(i) == cat) {
156 categoryComboBox->setCurrentItem(i); 157 categoryComboBox->setCurrentItem(i);
157 categorySelected ( cat ); 158 categorySelected ( cat );
158 return; 159 return;
159 } 160 }
160 } 161 }
161 BUG(); 162 BUG();
162} 163}
163 164
164void editCategoryWnd::categorySelected ( const QString & string ) 165void editCategoryWnd::categorySelected ( const QString & string )
165{ 166{
166 unsigned int idx; 167 unsigned int idx;
167 bool found = doc->findCategory(string, &idx); 168 bool found = doc->findCategory(string, &idx);
168 169
169 if (found == true) 170 if (found == true)
170 { 171 {
171 PwMCategoryItem* catitem = doc->getCategoryEntry(idx); 172 PwMCategoryItem* catitem = doc->getCategoryEntry(idx);