Show
Ignore:
Timestamp:
07/25/08 04:15:48 (4 months ago)
Author:
flynd
Message:

Use const pointer for owner objects that are fetched only for read access.

Location:
trunk/qt4-gui/src/core
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/core/licqgui.cpp

    r6463 r6466  
    687687  } 
    688688 
    689   ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 
     689  const ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 
    690690  if (o == NULL) 
    691691    return; 
     
    11651165  FOR_EACH_PROTO_PLUGIN_START(myLicqDaemon) 
    11661166  { 
    1167     ICQOwner* o = gUserManager.FetchOwner((*_ppit)->PPID(), LOCK_R); 
     1167    const ICQOwner* o = gUserManager.FetchOwner((*_ppit)->PPID(), LOCK_R); 
    11681168    if (o == NULL) 
    11691169      continue; 
     
    11911191    FOR_EACH_PROTO_PLUGIN_START(myLicqDaemon) 
    11921192    { 
    1193       ICQOwner* o = gUserManager.FetchOwner((*_ppit)->PPID(), LOCK_R); 
     1193      const ICQOwner* o = gUserManager.FetchOwner((*_ppit)->PPID(), LOCK_R); 
    11941194      if (o == NULL) 
    11951195        continue; 
     
    12731273 
    12741274  // Do system messages first 
    1275   ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
     1275  const ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    12761276  unsigned short numMsg = 0; 
    12771277  if (o != NULL) 
     
    14271427        unsigned short popCheck = 99; 
    14281428 
    1429         ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 
     1429        const ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 
    14301430        if (o != NULL) 
    14311431        { 
     
    16511651    // Fetch current status 
    16521652    unsigned short status = ICQ_STATUS_OFFLINE; 
    1653     ICQOwner* o = gUserManager.FetchOwner(nPPID, LOCK_R); 
     1653    const ICQOwner* o = gUserManager.FetchOwner(nPPID, LOCK_R); 
    16541654    if (o != NULL) 
    16551655    { 
  • trunk/qt4-gui/src/core/licqkimiface.cpp

    r6463 r6466  
    9595QStringList LicqKIMIface::reachableContacts() 
    9696{ 
    97     ICQOwner* owner = gUserManager.FetchOwner(LOCK_R); 
     97    const ICQOwner* owner = gUserManager.FetchOwner(LOCK_R); 
    9898    bool offline = owner->StatusOffline(); 
    9999    gUserManager.DropOwner(); 
  • trunk/qt4-gui/src/core/mainwin.cpp

    r6463 r6466  
    129129 
    130130  myCaption = "Licq"; 
    131   ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
     131  const ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    132132  if (o != NULL) 
    133133  { 
     
    615615 
    616616        myCaption = "Licq (|)"; 
    617         ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 
     617        const ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 
    618618        if (o != NULL) 
    619619        { 
     
    817817  IconManager* iconman = IconManager::instance(); 
    818818 
    819   ICQOwner* o = gUserManager.FetchOwner(nPPID, LOCK_R); 
     819  const ICQOwner* o = gUserManager.FetchOwner(nPPID, LOCK_R); 
    820820  if (o != NULL) 
    821821  { 
     
    908908{ 
    909909  //TODO iterate all owners that support fetching away message 
    910   ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
     910  const ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    911911 
    912912  if (o == NULL) 
  • trunk/qt4-gui/src/core/systemmenu.cpp

    r6374 r6466  
    374374void SystemMenu::aboutToShowFollowMeMenu() 
    375375{ 
    376    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
     376   const ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    377377   if (o == NULL) 
    378378     return; 
     
    654654void OwnerData::aboutToShowStatusMenu() 
    655655{ 
    656   ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
     656  const ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
    657657  if (o == NULL) 
    658658    return; 
     
    675675void OwnerData::viewInfo() 
    676676{ 
    677   ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
     677  const ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
    678678  if (o == NULL) 
    679679    return; 
     
    686686void OwnerData::viewHistory() 
    687687{ 
    688   ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
     688  const ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
    689689  if (o == NULL) 
    690690    return;