| 184 | | ICQUser* u = gUserManager.FetchUser(tmp->szId.toLatin1(), tmp->nPPID, LOCK_R); |
| 185 | | if ( u ) |
| 186 | | { |
| 187 | | editUser( u ); |
| | 184 | editUser(tmp->szId, tmp->nPPID); |
| | 185 | } |
| | 186 | |
| | 187 | void GPGKeyManager::editUser(QString id, unsigned long ppid) |
| | 188 | { |
| | 189 | KeyListItem* item = NULL; |
| | 190 | bool found = false; |
| | 191 | |
| | 192 | for (int i = 0; i < lst_keyList->topLevelItemCount(); ++i) |
| | 193 | { |
| | 194 | item = dynamic_cast<KeyListItem*>(lst_keyList->topLevelItem(i)); |
| | 195 | |
| | 196 | if (item->getszId() == id && item->getnPPID() == ppid) |
| | 197 | { |
| | 198 | found = true; |
| | 199 | break; |
| | 200 | } |
| | 201 | } |
| | 202 | |
| | 203 | if (!found) |
| | 204 | { |
| | 205 | ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); |
| | 206 | if (u == NULL) |
| | 207 | return; |
| | 208 | item = new KeyListItem(lst_keyList, u); |
| 280 | | ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R); |
| 281 | | |
| 282 | | if (u != NULL) |
| 283 | | { |
| 284 | | bool found = false; |
| 285 | | for (int i = 0; i < topLevelItemCount(); ++i) |
| 286 | | { |
| 287 | | KeyListItem* item = dynamic_cast<KeyListItem*>(topLevelItem(i)); |
| 288 | | if (item->getszId() == szId && item->getnPPID() == nPPID) |
| 289 | | { |
| 290 | | item->edit(); |
| 291 | | found = true; |
| 292 | | break; |
| 293 | | } |
| 294 | | } |
| 295 | | if (!found) |
| 296 | | (new KeyListItem(this, u))->edit(); |
| 297 | | gUserManager.DropUser(u); |
| 298 | | } |
| | 287 | GPGKeyManager* km = dynamic_cast<GPGKeyManager*>(nativeParentWidget()); |
| | 288 | if (km != NULL) |
| | 289 | km->editUser(szId, nPPID); |