Changeset 6463 for trunk/qt4-gui/src/contactlist
- Timestamp:
- 07/24/08 04:08:58 (4 months ago)
- Location:
- trunk/qt4-gui/src/contactlist
- Files:
-
- 4 modified
-
contactlist.cpp (modified) (4 diffs)
-
contactlist.h (modified) (2 diffs)
-
contactuserdata.cpp (modified) (7 diffs)
-
contactuserdata.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/contactlist/contactlist.cpp
r6330 r6463 91 91 case LIST_CONTACT_ADDED: 92 92 { 93 ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R);93 const ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R); 94 94 if (u == NULL) 95 95 { … … 196 196 return; 197 197 198 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);198 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 199 199 if (u == NULL) 200 200 return; … … 339 339 } 340 340 341 void ContactListModel::addUser( ICQUser* licqUser)341 void ContactListModel::addUser(const ICQUser* licqUser) 342 342 { 343 343 ContactUserData* newUser = new ContactUserData(licqUser, this); 344 344 connect(newUser, SIGNAL(dataChanged(const ContactUserData*)), 345 345 SLOT(userDataChanged(const ContactUserData*))); 346 connect(newUser, SIGNAL(updateUserGroups(ContactUserData*, ICQUser*)),347 SLOT(updateUserGroups(ContactUserData*, ICQUser*)));346 connect(newUser, SIGNAL(updateUserGroups(ContactUserData*, const ICQUser*)), 347 SLOT(updateUserGroups(ContactUserData*, const ICQUser*))); 348 348 349 349 myUsers.append(newUser); … … 351 351 } 352 352 353 void ContactListModel::updateUserGroups(ContactUserData* user, ICQUser* licqUser)353 void ContactListModel::updateUserGroups(ContactUserData* user, const ICQUser* licqUser) 354 354 { 355 355 // Check which user groups the user should be member of -
trunk/qt4-gui/src/contactlist/contactlist.h
r6323 r6463 210 210 * @param licqUser The user to add 211 211 */ 212 void addUser( ICQUser* licqUser);212 void addUser(const ICQUser* licqUser); 213 213 214 214 /** … … 412 412 * @param licqUser The daemon user to get group membership from 413 413 */ 414 void updateUserGroups(ContactUserData* user, ICQUser* licqUser);414 void updateUserGroups(ContactUserData* user, const ICQUser* licqUser); 415 415 416 416 private: -
trunk/qt4-gui/src/contactlist/contactuserdata.cpp
r6460 r6463 58 58 59 59 60 ContactUserData::ContactUserData( ICQUser* licqUser, QObject* parent)60 ContactUserData::ContactUserData(const ICQUser* licqUser, QObject* parent) 61 61 : myStatus(ICQ_STATUS_OFFLINE), 62 62 myEvents(0), … … 144 144 145 145 146 ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R);146 const ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R); 147 147 if (u != NULL) 148 148 { … … 157 157 } 158 158 159 void ContactUserData::updateAll( ICQUser* u)159 void ContactUserData::updateAll(const ICQUser* u) 160 160 { 161 161 myStatus = u->Status(); … … 396 396 } 397 397 398 bool ContactUserData::updateText( ICQUser* licqUser)398 bool ContactUserData::updateText(const ICQUser* licqUser) 399 399 { 400 400 bool hasChanged = false; … … 425 425 void ContactUserData::configUpdated() 426 426 { 427 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);427 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 428 428 if (u == NULL) 429 429 return; … … 499 499 // Here we update any content that may be dynamic, for example timestamps 500 500 501 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);501 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 502 502 if (u == NULL) 503 503 return; … … 669 669 QString ContactUserData::tooltip() const 670 670 { 671 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);671 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 672 672 if (u == NULL) 673 673 return ""; -
trunk/qt4-gui/src/contactlist/contactuserdata.h
r6150 r6463 54 54 * @param parent Object to use as parent for those objects that needs it 55 55 */ 56 ContactUserData( ICQUser* licqUser, QObject* parent);56 ContactUserData(const ICQUser* licqUser, QObject* parent); 57 57 58 58 /** … … 73 73 * @param licqUser Licq user to read information from 74 74 */ 75 void updateAll( ICQUser* licqUser);75 void updateAll(const ICQUser* licqUser); 76 76 77 77 /** … … 168 168 * Signal emitted when the user group memberships (may) have changed 169 169 */ 170 void updateUserGroups(ContactUserData* user, ICQUser* licqUser);170 void updateUserGroups(ContactUserData* user, const ICQUser* licqUser); 171 171 172 172 private: … … 192 192 * @return True if any data was actually changed 193 193 */ 194 bool updateText( ICQUser* licqUser);194 bool updateText(const ICQUser* licqUser); 195 195 196 196 /**
