Changeset 6054 for branches/qt-gui_qt4/src/dialogs/ownereditdlg.cpp
- Timestamp:
- 01/18/08 21:18:10 (10 months ago)
- Files:
-
- 1 modified
-
branches/qt-gui_qt4/src/dialogs/ownereditdlg.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/qt-gui_qt4/src/dialogs/ownereditdlg.cpp
r5837 r6054 42 42 /* TRANSLATOR LicqQtGui::OwnerEditDlg */ 43 43 44 OwnerEditDlg::OwnerEditDlg( QString id,unsigned long ppid, QWidget* parent)44 OwnerEditDlg::OwnerEditDlg(unsigned long ppid, QWidget* parent) 45 45 : QDialog(parent) 46 46 { … … 76 76 lay->addWidget(chkSave, 3, 0, 1, 3); 77 77 78 QString id; 78 79 // Fill the combo list now 79 80 FOR_EACH_PROTO_PLUGIN_START(gLicqDaemon) … … 81 82 if (ppid != 0) // Modifying a user 82 83 { 84 ICQOwner* o = gUserManager.FetchOwner(curPpid, LOCK_R); 85 if (o == NULL) 86 id = QString::null; 87 else 88 { 89 id = o->IdString(); 90 gUserManager.DropOwner(curPpid); 91 } 92 83 93 cmbProtocol->addItem( 84 iconman->iconForStatus(ICQ_STATUS_ONLINE, id.toLatin1(), ppid),85 (*_ppit)->Name(), QString::number( ppid));94 iconman->iconForStatus(ICQ_STATUS_ONLINE, id.toLatin1(), curPpid), 95 (*_ppit)->Name(), QString::number(curPpid)); 86 96 87 97 // Check if this is the current protocol … … 102 112 103 113 // Set the fields 104 if ( !id.isEmpty() &&ppid != 0)114 if (ppid != 0) 105 115 { 106 edtId->setText(id);107 116 ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); 108 117 if (o) 109 118 { 119 edtId->setText(o->IdString()); 110 120 edtPassword->setText(o->Password()); 111 121 chkSave->setChecked(o->SavePassword()); … … 146 156 setTabOrder(cmbProtocol, btnOk); 147 157 setTabOrder(btnOk, btnCancel); 158 159 show(); 148 160 } 149 161
