Show
Ignore:
Timestamp:
07/01/08 17:03:38 (5 months ago)
Author:
flynd
Message:

Use the new DropOwner? function to properly specify which owner to unlock.

Files:
1 modified

Legend:

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

    r5328 r6381  
    4949  ePasswordChange = 0; 
    5050 
    51   unsigned long nUin = gUserManager.OwnerUin(); 
    52   QString strUin; 
    53   if (nUin) 
    54     strUin.setNum(nUin); 
     51  QString strUin = gUserManager.OwnerId(LICQ_PPID);; 
    5552 
    5653  QVBoxLayout *lay = new QVBoxLayout(this, 8); 
     
    9289  // UIN 
    9390  edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin)); 
    94   if (nUin)  
    95     edtUin->setText(strUin); 
     91  edtUin->setText(strUin); 
    9692 
    9793  // Owner password 
    98   ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     94  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    9995  if (o != NULL) 
    10096  { 
     
    149145    chkWebAware->setChecked(o->WebAware()); 
    150146    chkHideIp->setChecked(o->HideIp()); 
    151     gUserManager.DropOwner(); 
     147    gUserManager.DropOwner(o); 
    152148  } 
    153149  else 
     
    193189void SecurityDlg::ok() 
    194190{ 
    195   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     191  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    196192  if(o == 0) return; 
    197193  unsigned short status = o->Status(); 
    198   gUserManager.DropOwner(); 
     194  gUserManager.DropOwner(o); 
    199195 
    200196  // validate password 
     
    247243    if (chkOnlyLocal->isChecked()) 
    248244    { 
    249       o = gUserManager.FetchOwner(LOCK_W); 
     245      o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    250246      gUserManager.SetOwnerUin(edtUin->text().toULong()); 
    251247      o->SetPassword(edtFirst->text().latin1()); 
    252       gUserManager.DropOwner(); 
     248      gUserManager.DropOwner(o); 
    253249      close(); 
    254250    }