Changeset 6461 for trunk/qt-gui

Show
Ignore:
Timestamp:
07/24/08 03:58:36 (4 months ago)
Author:
flynd
Message:

Fixed some cases where we kept a pointer to the alias string in the daemon user object. Added a few const.

Location:
trunk/qt-gui/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/gpgkeymanager.cpp

    r5328 r6461  
    3535struct luser 
    3636{ 
    37   char *szId; 
     37  QString szId; 
    3838  unsigned long nPPID; 
    3939  const char *alias; 
     
    169169  if ( !tmp ) return; 
    170170 
    171   ICQUser *u = gUserManager.FetchUser(tmp->szId, tmp->nPPID, LOCK_R); 
     171  ICQUser* u = gUserManager.FetchUser(tmp->szId.latin1(), tmp->nPPID, LOCK_R); 
    172172  if ( u ) 
    173173  { 
  • trunk/qt-gui/src/userbox.cpp

    r6409 r6461  
    139139{ 
    140140  m_szId = 0; 
    141   m_szAlias = 0; 
    142141  m_nPPID =0; 
    143142  m_pIcon = NULL; 
     
    588587      } 
    589588    } // isGroupItem 
    590     else if (m_szAlias                                        // this row contains a user  
     589    else if (!m_szAlias.isNull()                          // this row contains a user 
    591590             && text(column).ascii()                          // ...+ it is not empty  
    592              && strcmp(m_szAlias, text(column).ascii()) == 0  // ...+ this col contains the users alias  
     591             && m_szAlias == text(column).ascii()       // ...+ this col contains the users alias 
    593592             && gMainWindow->m_bShowExtendedIcons)            // ...+ extended icons are enabled 
    594593    { 
  • trunk/qt-gui/src/userbox.h

    r6284 r6461  
    9797 
    9898  char *m_szId; 
    99   char *m_szAlias; 
     99  QString m_szAlias; 
    100100  unsigned long m_nPPID; 
    101101  unsigned short m_nStatus; 
  • trunk/qt-gui/src/usercodec.cpp

    r4699 r6461  
    9494QTextCodec* UserCodec::codecForICQUser(ICQUser *u) 
    9595{ 
    96   char *preferred_encoding = u->UserEncoding(); 
     96  const char* preferred_encoding = u->UserEncoding(); 
    9797 
    9898  if ( preferred_encoding && *preferred_encoding ) {