Show
Ignore:
Timestamp:
07/06/08 20:30:57 (5 months ago)
Author:
flynd
Message:

Redefined UserStringList? to use std::string instead of char* so we don't have to keep track of freeing the strings when we're done.

Files:
1 modified

Legend:

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

    r6426 r6430  
    2323#include "config.h" 
    2424 
     25#include <list> 
    2526#include <stdio.h> // for snprintf 
    2627#include <unistd.h> // for getopt 
     
    118119#include "usermenu.h" 
    119120 
     121using namespace std; 
    120122using namespace LicqQtGui; 
    121123/* TRANSLATOR LicqQtGui::LicqGui */ 
    122  
    123124 
    124125#if defined(USE_SCRNSAVER) 
     
    12831284    showAllOwnerEvents(); 
    12841285 
    1285   UserStringList users; 
    1286   std::list<unsigned long> ppids; 
     1286  list<pair<QString, unsigned long> > users; 
    12871287  FOR_EACH_USER_START(LOCK_R) 
    12881288  { 
    12891289    if (pUser->NewMessages() > 0) 
    1290     { 
    1291       users.push_back(pUser->IdString()); 
    1292       ppids.push_back(pUser->PPID()); 
    1293     } 
     1290      users.push_back(pair<QString, unsigned long>(pUser->IdString(), pUser->PPID())); 
    12941291  } 
    12951292  FOR_EACH_USER_END 
    12961293 
    1297   for (UserStringList::iterator iter = users.begin(); iter != users.end(); iter++) 
    1298   { 
    1299     showDefaultEventDialog(*iter, ppids.front()); 
    1300     ppids.pop_front(); 
    1301   } 
     1294  list<pair<QString, unsigned long> >::iterator iter; 
     1295  for (iter = users.begin(); iter != users.end(); iter++) 
     1296    showDefaultEventDialog(iter->first, iter->second); 
    13021297} 
    13031298