Changeset 6316 for trunk/qt4-gui/src

Show
Ignore:
Timestamp:
06/16/08 09:30:13 (6 months ago)
Author:
eugene
Message:

Switched tiny code blocks, it seems to be better this way...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/contactlist/contactuserdata.cpp

    r6205 r6316  
    169169  mySecure = u->Secure(); 
    170170  myUrgent = false; 
    171   myBirthday =  (u->Birthday() == 0); 
     171  myBirthday = (u->Birthday() == 0); 
    172172  myPhone = u->GetPhoneNumber()[0] != '\0'; 
    173173  myCellular = u->GetCellularNumber()[0] != '\0'; 
     
    186186 
    187187  updateExtendedStatus(); 
     188 
     189  // Set sub group to put user in 
     190  ContactListModel::SubGroupType newSubGroup = ContactListModel::OnlineSubGroup; 
     191 
     192  if (myNotInList) 
     193    newSubGroup = ContactListModel::NotInListSubGroup; 
     194 
     195  else if (myStatus == ICQ_STATUS_OFFLINE) 
     196    newSubGroup = ContactListModel::OfflineSubGroup; 
     197 
     198  // If status has changed update the sub groups of all groups 
     199  if (newSubGroup != mySubGroup) 
     200  { 
     201    foreach (ContactUser* user, myUserInstances) 
     202      user->group()->updateSubGroup(mySubGroup, newSubGroup, myEvents); 
     203    mySubGroup = newSubGroup; 
     204  } 
    188205 
    189206  if (myEvents != u->NewMessages()) 
     
    259276      startAnimation(); 
    260277    } 
    261   } 
    262  
    263   // Set sub group to put user in 
    264   ContactListModel::SubGroupType newSubGroup = ContactListModel::OnlineSubGroup; 
    265  
    266   if (u->NotInList()) 
    267     newSubGroup = ContactListModel::NotInListSubGroup; 
    268  
    269   else if (myStatus == ICQ_STATUS_OFFLINE) 
    270     newSubGroup = ContactListModel::OfflineSubGroup; 
    271  
    272   // If status has changed update the sub groups of all groups 
    273   if (newSubGroup != mySubGroup) 
    274   { 
    275     foreach (ContactUser* user, myUserInstances) 
    276       user->group()->updateSubGroup(mySubGroup, newSubGroup, myEvents); 
    277     mySubGroup = newSubGroup; 
    278278  } 
    279279