Changeset 6463 for trunk/qt4-gui/src/userevents
- Timestamp:
- 07/24/08 04:08:58 (4 months ago)
- Location:
- trunk/qt4-gui/src/userevents
- Files:
-
- 12 modified
-
usereventcommon.cpp (modified) (3 diffs)
-
usereventcommon.h (modified) (1 diff)
-
usereventtabdlg.cpp (modified) (5 diffs)
-
usereventtabdlg.h (modified) (1 diff)
-
usersendchatevent.cpp (modified) (1 diff)
-
usersendcommon.cpp (modified) (12 diffs)
-
usersendcommon.h (modified) (1 diff)
-
usersendcontactevent.cpp (modified) (2 diffs)
-
usersendfileevent.cpp (modified) (1 diff)
-
usersendmsgevent.cpp (modified) (2 diffs)
-
usersendurlevent.cpp (modified) (1 diff)
-
userviewevent.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/userevents/usereventcommon.cpp
r6352 r6463 155 155 myTypingTimer = NULL; 156 156 157 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);157 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 158 158 if (u != NULL) 159 159 { … … 283 283 } 284 284 285 void UserEventCommon::updateWidgetInfo( ICQUser* u)285 void UserEventCommon::updateWidgetInfo(const ICQUser* u) 286 286 { 287 287 QTextCodec* codec = UserCodec::codecForICQUser(u); … … 467 467 } 468 468 469 ICQUser* u = gUserManager.FetchUser(sig->Id(), myPpid, LOCK_R);469 const ICQUser* u = gUserManager.FetchUser(sig->Id(), myPpid, LOCK_R); 470 470 if (u == NULL) 471 471 return; -
trunk/qt4-gui/src/userevents/usereventcommon.h
r6160 r6463 98 98 99 99 void flashTaskbar(); 100 void updateWidgetInfo( ICQUser* u);100 void updateWidgetInfo(const ICQUser* u); 101 101 void pushToolTip(QAction* action, QString tooltip); 102 102 -
trunk/qt4-gui/src/userevents/usereventtabdlg.cpp
r6350 r6463 75 75 void UserEventTabDlg::addTab(UserEventCommon* tab, int index) 76 76 { 77 ICQUser* u = gUserManager.FetchUser(tab->id().toLatin1(), tab->ppid(), LOCK_R);77 const ICQUser* u = gUserManager.FetchUser(tab->id().toLatin1(), tab->ppid(), LOCK_R); 78 78 if (u == NULL) 79 79 return; … … 115 115 for (it = users.begin(); it != users.end(); ++it) 116 116 { 117 ICQUser* u = gUserManager.FetchUser((*it).c_str(), tab->ppid(), LOCK_R);117 const ICQUser* u = gUserManager.FetchUser((*it).c_str(), tab->ppid(), LOCK_R); 118 118 119 119 if (!newLabel.isEmpty()) … … 132 132 } 133 133 134 void UserEventTabDlg::updateTabLabel( ICQUser* u)134 void UserEventTabDlg::updateTabLabel(const ICQUser* u) 135 135 { 136 136 if (u == NULL) … … 147 147 } 148 148 149 void UserEventTabDlg::updateTabLabel(UserEventCommon* tab, ICQUser* u)149 void UserEventTabDlg::updateTabLabel(UserEventCommon* tab, const ICQUser* u) 150 150 { 151 151 if (tab == NULL) … … 215 215 } 216 216 217 void UserEventTabDlg::setTyping( ICQUser* u, int convoId)217 void UserEventTabDlg::setTyping(const ICQUser* u, int convoId) 218 218 { 219 219 for (int index = 0; index < myTabs->count(); index++) -
trunk/qt4-gui/src/userevents/usereventtabdlg.h
r6182 r6463 47 47 bool tabExists(QWidget* tab); 48 48 void updateConvoLabel(UserEventCommon* tab); 49 void updateTabLabel( ICQUser* u);50 void updateTabLabel(UserEventCommon* tab, ICQUser* u = NULL);51 void setTyping( ICQUser* u, int convoId);49 void updateTabLabel(const ICQUser* u); 50 void updateTabLabel(UserEventCommon* tab, const ICQUser* u = NULL); 51 void setTyping(const ICQUser* u, int convoId); 52 52 53 53 #ifdef USE_KDE -
trunk/qt4-gui/src/userevents/usersendchatevent.cpp
r6406 r6463 92 92 if (!e->ExtendedAck() || !e->ExtendedAck()->Accepted()) 93 93 { 94 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);94 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 95 95 QString s = !e->ExtendedAck() ? 96 96 tr("No reason provided") : -
trunk/qt4-gui/src/userevents/usersendcommon.cpp
r6431 r6463 91 91 const size_t SHOW_RECENT_NUM = 5; 92 92 93 typedef pair< CUserEvent*, char*> messagePair;93 typedef pair<const CUserEvent*, char*> messagePair; 94 94 95 95 bool orderMessagePairs(const messagePair& mp1, const messagePair& mp2) … … 166 166 bool canSendDirect = (mySendFuncs & PP_SEND_DIRECT); 167 167 168 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);168 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 169 169 170 170 if (u != NULL) … … 313 313 for (unsigned short i = 0; i < u->NewMessages(); i++) 314 314 { 315 CUserEvent* e = u->EventPeek(i);315 const CUserEvent* e = u->EventPeek(i); 316 316 // Get the convo id now 317 317 unsigned long convoId = e->ConvoId(); … … 498 498 } 499 499 500 void UserSendCommon::updatePicture( ICQUser* u)500 void UserSendCommon::updatePicture(const ICQUser* u) 501 501 { 502 502 bool fetched = false; … … 581 581 if (Config::Chat::instance()->msgChatView()) 582 582 { 583 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), myPpid, LOCK_R);583 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), myPpid, LOCK_R); 584 584 QString userName; 585 585 if (u != 0) … … 618 618 if (Config::Chat::instance()->msgChatView()) 619 619 { 620 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), myPpid, LOCK_ R);620 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), myPpid, LOCK_W); 621 621 QString userName; 622 622 if (u != 0) … … 760 760 case ICQ_CMDxSUB_MSG: 761 761 { 762 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);762 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 763 763 bool userOffline = true; 764 764 if (u != 0) … … 918 918 void UserSendCommon::userUpdated(CICQSignal* sig, QString id, unsigned long ppid) 919 919 { 920 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_ R);920 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_W); 921 921 922 922 if (u == NULL) … … 943 943 case USER_EVENTS: 944 944 { 945 CUserEvent* e = u->EventPeekId(sig->Argument());945 const CUserEvent* e = u->EventPeekId(sig->Argument()); 946 946 947 947 if (e != NULL && myHighestEventId < sig->Argument() && … … 981 981 bool UserSendCommon::checkSecure() 982 982 { 983 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);983 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 984 984 985 985 if (u == NULL) … … 998 998 else 999 999 { 1000 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_ R);1000 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_W); 1001 1001 if (u != NULL) 1002 1002 { … … 1463 1463 void UserSendCommon::sendTrySecure() 1464 1464 { 1465 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);1465 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 1466 1466 1467 1467 bool autoSecure = false; -
trunk/qt4-gui/src/userevents/usersendcommon.h
r6293 r6463 95 95 void retrySend(ICQEvent* e, bool online, unsigned short level); 96 96 virtual void userUpdated(CICQSignal* sig, QString id = QString::null, unsigned long ppid = 0); 97 void updatePicture( ICQUser* u = NULL);97 void updatePicture(const ICQUser* u = NULL); 98 98 bool checkSecure(); 99 99 -
trunk/qt4-gui/src/userevents/usersendcontactevent.cpp
r6430 r6463 91 91 void UserSendContactEvent::setContact(QString id, unsigned long ppid) 92 92 { 93 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);93 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 94 94 95 95 if (u != NULL) … … 106 106 107 107 bool showAwayDlg = false; 108 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);108 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 109 109 if (u != NULL) 110 110 { -
trunk/qt4-gui/src/userevents/usersendfileevent.cpp
r6294 r6463 124 124 if (!e->ExtendedAck() || !e->ExtendedAck()->Accepted()) 125 125 { 126 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);126 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 127 127 QString s = !e->ExtendedAck() ? 128 128 tr("No reason provided") : -
trunk/qt4-gui/src/userevents/usersendmsgevent.cpp
r6142 r6463 76 76 77 77 bool showAwayDlg = false; 78 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);78 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 79 79 if (u != NULL) 80 80 { … … 127 127 return; 128 128 129 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);129 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 130 130 bool userOffline = true; 131 131 if (u != NULL) -
trunk/qt4-gui/src/userevents/usersendurlevent.cpp
r6142 r6463 112 112 113 113 bool showAwayDlg = false; 114 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);114 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 115 115 if (u != NULL) 116 116 { -
trunk/qt4-gui/src/userevents/userviewevent.cpp
r6433 r6463 144 144 setTabOrder(myReadNextButton, myCloseButton); 145 145 146 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);146 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 147 147 if (u != NULL && u->NewMessages() > 0) 148 148 { … … 169 169 for (i++; i < u->NewMessages(); i++) 170 170 { 171 CUserEvent* event = u->EventPeek(i);171 const CUserEvent* event = u->EventPeek(i); 172 172 if (!Config::Chat::instance()->msgChatView() || 173 173 (event->SubCommand() != ICQ_CMDxSUB_MSG && … … 261 261 void UserViewEvent::userUpdated(CICQSignal* sig, QString id, unsigned long ppid) 262 262 { 263 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R);263 const ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); 264 264 265 265 if (u == 0) … … 271 271 { 272 272 int eventId = sig->Argument(); 273 CUserEvent* e = u->EventPeekId(eventId);273 const CUserEvent* e = u->EventPeekId(eventId); 274 274 // Making sure we didn't handle this message already. 275 275 if (e != NULL && myHighestEventId < eventId && … … 296 296 return; 297 297 298 ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R);298 const ICQUser* u = gUserManager.FetchUser(myUsers.front().c_str(), myPpid, LOCK_R); 299 299 300 300 bool doclose = false; … … 597 597 #undef GETINFO 598 598 599 ICQUser* u = gUserManager.FetchUser(id, ppid, LOCK_R);599 const ICQUser* u = gUserManager.FetchUser(id, ppid, LOCK_R); 600 600 if (u == NULL) 601 601 gLicqDaemon->AddUserToList(id, ppid, false, true); … … 737 737 myRead2Button->setText(tr("&Refuse")); 738 738 CEventAuthRequest* pAuthReq = dynamic_cast<CEventAuthRequest*>(m); 739 ICQUser* u = gUserManager.FetchUser(pAuthReq->IdString(), pAuthReq->PPID(), LOCK_R);739 const ICQUser* u = gUserManager.FetchUser(pAuthReq->IdString(), pAuthReq->PPID(), LOCK_R); 740 740 if (u == NULL) 741 741 myRead3Button->setText(tr("A&dd User")); … … 749 749 { 750 750 CEventAuthGranted* pAuth = dynamic_cast<CEventAuthGranted*>(m); 751 ICQUser* u = gUserManager.FetchUser(pAuth->IdString(), pAuth->PPID(), LOCK_R);751 const ICQUser* u = gUserManager.FetchUser(pAuth->IdString(), pAuth->PPID(), LOCK_R); 752 752 if (u == NULL) 753 753 myRead1Button->setText(tr("A&dd User")); … … 761 761 { 762 762 CEventAdded* pAdd = dynamic_cast<CEventAdded*>(m); 763 ICQUser* u = gUserManager.FetchUser(pAdd->IdString(), pAdd->PPID(), LOCK_R);763 const ICQUser* u = gUserManager.FetchUser(pAdd->IdString(), pAdd->PPID(), LOCK_R); 764 764 if (u == NULL) 765 765 myRead1Button->setText(tr("A&dd User"));
