Changeset 6463 for trunk/qt4-gui/src
- Timestamp:
- 07/24/08 04:08:58 (4 months ago)
- Location:
- trunk/qt4-gui/src
- Files:
-
- 42 modified
-
contactlist/contactlist.cpp (modified) (4 diffs)
-
contactlist/contactlist.h (modified) (2 diffs)
-
contactlist/contactuserdata.cpp (modified) (7 diffs)
-
contactlist/contactuserdata.h (modified) (4 diffs)
-
core/licqgui.cpp (modified) (7 diffs)
-
core/licqkimiface.cpp (modified) (2 diffs)
-
core/mainwin.cpp (modified) (1 diff)
-
core/usermenu.cpp (modified) (2 diffs)
-
dialogs/adduserdlg.cpp (modified) (2 diffs)
-
dialogs/authuserdlg.cpp (modified) (1 diff)
-
dialogs/customautorespdlg.cpp (modified) (1 diff)
-
dialogs/forwarddlg.cpp (modified) (1 diff)
-
dialogs/gpgkeymanager.cpp (modified) (4 diffs)
-
dialogs/gpgkeymanager.h (modified) (2 diffs)
-
dialogs/gpgkeyselect.cpp (modified) (3 diffs)
-
dialogs/gpgkeyselect.h (modified) (1 diff)
-
dialogs/historydlg.cpp (modified) (2 diffs)
-
dialogs/keyrequestdlg.cpp (modified) (1 diff)
-
dialogs/mmsenddlg.cpp (modified) (3 diffs)
-
dialogs/refusedlg.cpp (modified) (1 diff)
-
dialogs/showawaymsgdlg.cpp (modified) (2 diffs)
-
dialogs/userinfodlg.cpp (modified) (17 diffs)
-
dialogs/userinfodlg.h (modified) (1 diff)
-
helpers/licqstrings.cpp (modified) (2 diffs)
-
helpers/licqstrings.h (modified) (1 diff)
-
helpers/usercodec.cpp (modified) (2 diffs)
-
helpers/usercodec.h (modified) (1 diff)
-
userevents/usereventcommon.cpp (modified) (3 diffs)
-
userevents/usereventcommon.h (modified) (1 diff)
-
userevents/usereventtabdlg.cpp (modified) (5 diffs)
-
userevents/usereventtabdlg.h (modified) (1 diff)
-
userevents/usersendchatevent.cpp (modified) (1 diff)
-
userevents/usersendcommon.cpp (modified) (12 diffs)
-
userevents/usersendcommon.h (modified) (1 diff)
-
userevents/usersendcontactevent.cpp (modified) (2 diffs)
-
userevents/usersendfileevent.cpp (modified) (1 diff)
-
userevents/usersendmsgevent.cpp (modified) (2 diffs)
-
userevents/usersendurlevent.cpp (modified) (1 diff)
-
userevents/userviewevent.cpp (modified) (9 diffs)
-
views/floatyview.cpp (modified) (1 diff)
-
views/floatyview.h (modified) (1 diff)
-
widgets/historyview.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/contactlist/contactlist.cpp
r6330 r6463 91 91 case LIST_CONTACT_ADDED: 92 92 { 93 ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R);93 const ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R); 94 94 if (u == NULL) 95 95 { … … 196 196 return; 197 197 198 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);198 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 199 199 if (u == NULL) 200 200 return; … … 339 339 } 340 340 341 void ContactListModel::addUser( ICQUser* licqUser)341 void ContactListModel::addUser(const ICQUser* licqUser) 342 342 { 343 343 ContactUserData* newUser = new ContactUserData(licqUser, this); 344 344 connect(newUser, SIGNAL(dataChanged(const ContactUserData*)), 345 345 SLOT(userDataChanged(const ContactUserData*))); 346 connect(newUser, SIGNAL(updateUserGroups(ContactUserData*, ICQUser*)),347 SLOT(updateUserGroups(ContactUserData*, ICQUser*)));346 connect(newUser, SIGNAL(updateUserGroups(ContactUserData*, const ICQUser*)), 347 SLOT(updateUserGroups(ContactUserData*, const ICQUser*))); 348 348 349 349 myUsers.append(newUser); … … 351 351 } 352 352 353 void ContactListModel::updateUserGroups(ContactUserData* user, ICQUser* licqUser)353 void ContactListModel::updateUserGroups(ContactUserData* user, const ICQUser* licqUser) 354 354 { 355 355 // Check which user groups the user should be member of -
trunk/qt4-gui/src/contactlist/contactlist.h
r6323 r6463 210 210 * @param licqUser The user to add 211 211 */ 212 void addUser( ICQUser* licqUser);212 void addUser(const ICQUser* licqUser); 213 213 214 214 /** … … 412 412 * @param licqUser The daemon user to get group membership from 413 413 */ 414 void updateUserGroups(ContactUserData* user, ICQUser* licqUser);414 void updateUserGroups(ContactUserData* user, const ICQUser* licqUser); 415 415 416 416 private: -
trunk/qt4-gui/src/contactlist/contactuserdata.cpp
r6460 r6463 58 58 59 59 60 ContactUserData::ContactUserData( ICQUser* licqUser, QObject* parent)60 ContactUserData::ContactUserData(const ICQUser* licqUser, QObject* parent) 61 61 : myStatus(ICQ_STATUS_OFFLINE), 62 62 myEvents(0), … … 144 144 145 145 146 ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R);146 const ICQUser* u = gUserManager.FetchUser(sig->Id(), sig->PPID(), LOCK_R); 147 147 if (u != NULL) 148 148 { … … 157 157 } 158 158 159 void ContactUserData::updateAll( ICQUser* u)159 void ContactUserData::updateAll(const ICQUser* u) 160 160 { 161 161 myStatus = u->Status(); … … 396 396 } 397 397 398 bool ContactUserData::updateText( ICQUser* licqUser)398 bool ContactUserData::updateText(const ICQUser* licqUser) 399 399 { 400 400 bool hasChanged = false; … … 425 425 void ContactUserData::configUpdated() 426 426 { 427 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);427 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 428 428 if (u == NULL) 429 429 return; … … 499 499 // Here we update any content that may be dynamic, for example timestamps 500 500 501 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);501 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 502 502 if (u == NULL) 503 503 return; … … 669 669 QString ContactUserData::tooltip() const 670 670 { 671 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);671 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 672 672 if (u == NULL) 673 673 return ""; -
trunk/qt4-gui/src/contactlist/contactuserdata.h
r6150 r6463 54 54 * @param parent Object to use as parent for those objects that needs it 55 55 */ 56 ContactUserData( ICQUser* licqUser, QObject* parent);56 ContactUserData(const ICQUser* licqUser, QObject* parent); 57 57 58 58 /** … … 73 73 * @param licqUser Licq user to read information from 74 74 */ 75 void updateAll( ICQUser* licqUser);75 void updateAll(const ICQUser* licqUser); 76 76 77 77 /** … … 168 168 * Signal emitted when the user group memberships (may) have changed 169 169 */ 170 void updateUserGroups(ContactUserData* user, ICQUser* licqUser);170 void updateUserGroups(ContactUserData* user, const ICQUser* licqUser); 171 171 172 172 private: … … 192 192 * @return True if any data was actually changed 193 193 */ 194 bool updateText( ICQUser* licqUser);194 bool updateText(const ICQUser* licqUser); 195 195 196 196 /** -
trunk/qt4-gui/src/core/licqgui.cpp
r6430 r6463 725 725 parent = myMainWindow; 726 726 727 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);727 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 728 728 if (u == NULL) 729 729 return true; … … 1065 1065 return; 1066 1066 1067 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);1067 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 1068 1068 1069 1069 if (u == NULL) … … 1221 1221 if (Config::Chat::instance()->msgChatView()) 1222 1222 { 1223 ICQUser* u = NULL;1223 const ICQUser* u = NULL; 1224 1224 if (ppid == 0) 1225 1225 { … … 1311 1311 if (id.isEmpty() || ppid == 0) 1312 1312 return; 1313 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);1313 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 1314 1314 if (u == NULL) 1315 1315 return; … … 1403 1403 unsigned long ppid = sig->PPID(); 1404 1404 1405 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);1405 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 1406 1406 if (u == NULL) 1407 1407 { … … 1454 1454 if (Config::Chat::instance()->autoPopup() >= popCheck) 1455 1455 { 1456 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);1456 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 1457 1457 if (u != NULL) 1458 1458 { … … 1500 1500 case USER_TYPING: 1501 1501 { 1502 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);1502 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 1503 1503 if (u == NULL) 1504 1504 break; -
trunk/qt4-gui/src/core/licqkimiface.cpp
r6365 r6463 406 406 407 407 // check if user exists 408 ICQUser* pUser = gUserManager.FetchUser(contactId.latin1(), PPID, LOCK_R);408 const ICQUser* pUser = gUserManager.FetchUser(contactId.latin1(), PPID, LOCK_R); 409 409 if (pUser != 0) 410 410 { … … 489 489 490 490 // check if user already exists 491 ICQUser* pUser = gUserManager.FetchUser(contactId.latin1(), PPID, LOCK_R);491 const ICQUser* pUser = gUserManager.FetchUser(contactId.latin1(), PPID, LOCK_R); 492 492 if (pUser != 0) 493 493 { -
trunk/qt4-gui/src/core/mainwin.cpp
r6374 r6463 633 633 } 634 634 635 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);635 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 636 636 if (u == NULL) 637 637 { -
trunk/qt4-gui/src/core/usermenu.cpp
r6454 r6463 227 227 void UserMenu::aboutToShowMenu() 228 228 { 229 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);229 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 230 230 231 231 int status = (u == NULL ? ICQ_STATUS_OFFLINE : u->Status()); … … 568 568 if (gid == GROUP_IGNORE_LIST && !action->isChecked()) 569 569 { 570 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);570 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 571 571 if (u == NULL) 572 572 return; -
trunk/qt4-gui/src/dialogs/adduserdlg.cpp
r6315 r6463 99 99 if (!id.isEmpty()) 100 100 { 101 ICQUser* u = gUserManager.FetchUser(id, ppid, LOCK_R);101 const ICQUser* u = gUserManager.FetchUser(id, ppid, LOCK_R); 102 102 103 103 if (u == NULL) … … 105 105 else 106 106 { 107 if (u->NotInList()) 107 bool notInList = u->NotInList(); 108 gUserManager.DropUser(u); 109 110 if (notInList) 108 111 { 109 u->Unlock();110 112 gUserManager.SetUserInGroup(id, ppid, GROUPS_USER, group, true, true); 111 u->Lock(LOCK_W); 112 u->SetPermanent(); 113 ICQUser* user = gUserManager.FetchUser(id, ppid, LOCK_W); 114 user->SetPermanent(); 115 gUserManager.DropUser(user); 113 116 added = true; 114 117 } 115 gUserManager.DropUser(u);116 118 } 117 119 } -
trunk/qt4-gui/src/dialogs/authuserdlg.cpp
r6352 r6463 70 70 toplay->addWidget(lblUin); 71 71 QString userName = myId; 72 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);72 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 73 73 if (u != NULL) 74 74 { -
trunk/qt4-gui/src/dialogs/customautorespdlg.cpp
r6124 r6463 73 73 lay->addWidget(buttons); 74 74 75 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);75 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 76 76 77 77 if (u == NULL) -
trunk/qt4-gui/src/dialogs/forwarddlg.cpp
r6352 r6463 164 164 m_nPPID = nPPID; 165 165 166 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R);166 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R); 167 167 if (u == NULL) 168 168 return; -
trunk/qt4-gui/src/dialogs/gpgkeymanager.cpp
r6352 r6463 193 193 if (!found) 194 194 { 195 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);195 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 196 196 if (u == NULL) 197 197 return; … … 266 266 267 267 // KEYLISTITEM 268 KeyListItem::KeyListItem(QTreeWidget* parent, ICQUser* u)268 KeyListItem::KeyListItem(QTreeWidget* parent, const ICQUser* u) 269 269 : QTreeWidgetItem(parent), 270 270 szId(u->IdString()), … … 275 275 } 276 276 277 void KeyListItem::updateText( ICQUser* u)277 void KeyListItem::updateText(const ICQUser* u) 278 278 { 279 279 setText(0, QString::fromUtf8(u->GetAlias())); … … 293 293 void KeyListItem::slot_done() 294 294 { 295 ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R);295 const ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R); 296 296 keySelect = NULL; 297 297 -
trunk/qt4-gui/src/dialogs/gpgkeymanager.h
r6219 r6463 71 71 72 72 public: 73 KeyListItem(QTreeWidget* parent, ICQUser* u);73 KeyListItem(QTreeWidget* parent, const ICQUser* u); 74 74 75 75 void edit(); … … 83 83 unsigned long nPPID; 84 84 GPGKeySelect* keySelect; 85 void updateText( ICQUser* u);85 void updateText(const ICQUser* u); 86 86 87 87 private slots: -
trunk/qt4-gui/src/dialogs/gpgkeyselect.cpp
r5837 r6463 56 56 Support::setWidgetProps(this, "GPGKeySelectDialog"); 57 57 58 ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R);58 const ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R); 59 59 if (u == NULL) 60 60 return; … … 224 224 } 225 225 226 void KeyView::testViewItem(QTreeWidgetItem* item, ICQUser* u)226 void KeyView::testViewItem(QTreeWidgetItem* item, const ICQUser* u) 227 227 { 228 228 int val = 0; … … 253 253 gpgme_new(&mCtx); 254 254 255 ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R);255 const ICQUser* u = gUserManager.FetchUser(szId.toLatin1(), nPPID, LOCK_R); 256 256 maxItemVal = -1; 257 257 maxItem = NULL; -
trunk/qt4-gui/src/dialogs/gpgkeyselect.h
r5837 r6463 42 42 QString szId; 43 43 unsigned long nPPID; 44 void testViewItem(QTreeWidgetItem* item, ICQUser* u);44 void testViewItem(QTreeWidgetItem* item, const ICQUser* u); 45 45 int maxItemVal; 46 46 QTreeWidgetItem* maxItem; -
trunk/qt4-gui/src/dialogs/historydlg.cpp
r6448 r6463 161 161 show(); 162 162 163 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);163 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 164 164 165 165 QString name = tr("INVALID USER"); … … 277 277 if (signal->SubSignal() == USER_EVENTS) 278 278 { 279 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);279 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 280 280 if (u == NULL) 281 281 return; -
trunk/qt4-gui/src/dialogs/keyrequestdlg.cpp
r6294 r6463 49 49 setAttribute(Qt::WA_DeleteOnClose, true); 50 50 51 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);51 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 52 52 setWindowTitle(tr("Licq - Secure Channel with %1") 53 53 .arg(QString::fromUtf8(u->GetAlias()))); -
trunk/qt4-gui/src/dialogs/mmsenddlg.cpp
r6430 r6463 168 168 case ICQ_CMDxSUB_MSG: 169 169 { 170 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R);170 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R); 171 171 if (u == NULL) return; 172 172 QTextCodec* codec = UserCodec::codecForICQUser(u); … … 239 239 case ICQ_CMDxSUB_URL: 240 240 { 241 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R);241 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R); 242 242 if (u == NULL) return; 243 243 grpSending->setTitle(tr("Sending mass URL to %1...").arg(QString::fromUtf8(u->GetAlias()))); … … 252 252 case ICQ_CMDxSUB_CONTACTxLIST: 253 253 { 254 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R);254 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R); 255 255 if (u == NULL) return; 256 256 grpSending->setTitle(tr("Sending mass list to %1...").arg(QString::fromUtf8(u->GetAlias()))); -
trunk/qt4-gui/src/dialogs/refusedlg.cpp
r6133 r6463 45 45 QVBoxLayout* lay = new QVBoxLayout(this); 46 46 47 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);47 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 48 48 QLabel* lbl = new QLabel(tr("Refusal message for %1 with ").arg(t) + QString::fromUtf8(u->GetAlias()) + ":"); 49 49 lay->addWidget(lbl); -
trunk/qt4-gui/src/dialogs/showawaymsgdlg.cpp
r6352 r6463 81 81 lay->addWidget(buttons); 82 82 83 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);83 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 84 84 QTextCodec* codec = UserCodec::codecForICQUser(u); 85 85 chkShowAgain->setChecked(u->ShowAwayMsg()); … … 165 165 e->SNAC() == MAKESNAC(ICQ_SNACxFAM_LOCATION, ICQ_SNACxLOC_INFOxREQ))) 166 166 { 167 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R);167 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), myPpid, LOCK_R); 168 168 QTextCodec* codec = UserCodec::codecForICQUser(u); 169 169 const char* szAutoResp = -
trunk/qt4-gui/src/dialogs/userinfodlg.cpp
r6374 r6463 179 179 lay->addLayout(l); 180 180 181 ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R);181 const ICQUser* u = gUserManager.FetchUser(myId.toLatin1(), m_nPPID, LOCK_R); 182 182 if (u == NULL) 183 183 { … … 348 348 } 349 349 350 void UserInfoDlg::SetGeneralInfo( ICQUser* u)350 void UserInfoDlg::SetGeneralInfo(const ICQUser* u) 351 351 { 352 352 tabList[GeneralInfo].loaded = true; … … 587 587 } 588 588 589 void UserInfoDlg::SetMoreInfo( ICQUser* u)589 void UserInfoDlg::SetMoreInfo(const ICQUser* u) 590 590 { 591 591 tabList[MoreInfo].loaded = true; … … 848 848 } 849 849 850 void UserInfoDlg::SetMore2Info( ICQUser* u)851 { 852 ICQUserCategory* cat;850 void UserInfoDlg::SetMore2Info(const ICQUser* u) 851
