Changeset 5740
- Timestamp:
- 10/31/07 18:57:49 (13 months ago)
- Files:
-
- 1 modified
-
branches/qt-gui_qt4/src/dialogs/searchuserdlg.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/qt-gui_qt4/src/dialogs/searchuserdlg.cpp
r5728 r5740 489 489 foreach (QTreeWidgetItem* current, foundView->selectedItems()) 490 490 { 491 QString szId = QString("%1").arg(current->data(0, Qt::UserRole).toUInt());492 ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), LICQ_PPID, LOCK_R); 493 if ( u == NULL)491 QString szId = current->data(0, Qt::UserRole).toString(); 492 493 if (!gUserManager.IsOnList(szId.toLatin1(), LICQ_PPID)) 494 494 server->AddUserToList(szId.toLatin1(), LICQ_PPID, false, true); 495 else496 gUserManager.DropUser(u);497 495 498 496 mainwin->callInfoTab(mnuUserGeneral, szId, LICQ_PPID, false, true); 499 break;500 497 } 501 498 } … … 505 502 foreach (QTreeWidgetItem* current, foundView->selectedItems()) 506 503 { 507 unsigned long uin = current->data(0, Qt::UserRole).toUInt(); 508 ICQUser* user = gUserManager.FetchUser(uin, LOCK_N); 509 510 if (user != NULL) 511 { 512 gUserManager.DropUser(user); 513 continue; 514 } 515 516 server->AddUserToList(uin); 517 518 if (qcbAlertUser->isChecked()) // alert the user they were added 504 unsigned long uin = current->data(0, Qt::UserRole).toString().toULong(); 505 506 if (server->AddUserToList(uin) && // try to add a user 507 qcbAlertUser->isChecked()) // alert the user they were added 519 508 server->icqAlertUser(uin); 520 509 } 510 521 511 foundView->clearSelection(); 522 512 }
