summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-23 18:57:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-23 18:57:05 (GMT)
commit3f72e2c3b7ce5a83287dc136c68b7ef6d2cc66bd (patch)
tree8afd8cdb41d3b35d2cf43afda5b9825ce75d8e72 /Swift/Controllers
parentd917be7e1f7e4c99c2d8d20cc3e54d7b6e61f333 (diff)
downloadswift-contrib-3f72e2c3b7ce5a83287dc136c68b7ef6d2cc66bd.zip
swift-contrib-3f72e2c3b7ce5a83287dc136c68b7ef6d2cc66bd.tar.bz2
Fixed const references to vectors.
This could potentially cause crashes (same as a previous patch).
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp2
-rw-r--r--Swift/Controllers/Roster/RosterController.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index 706f50a..5b61abf 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -136,19 +136,19 @@ void RosterController::applyAllPresenceTo(const JID& jid) {
void RosterController::handleRosterCleared() {
roster_->removeAll();
}
void RosterController::handleOnJIDRemoved(const JID& jid) {
roster_->removeContact(jid);
}
-void RosterController::handleOnJIDUpdated(const JID& jid, const std::string& oldName, const std::vector<std::string> passedOldGroups) {
+void RosterController::handleOnJIDUpdated(const JID& jid, const std::string& oldName, const std::vector<std::string>& passedOldGroups) {
if (oldName != xmppRoster_->getNameForJID(jid)) {
roster_->applyOnItems(SetName(nickResolver_->jidToNick(jid), jid));
}
std::vector<std::string> groups = xmppRoster_->getGroupsForJID(jid);
std::vector<std::string> oldGroups = passedOldGroups;
std::string name = nickResolver_->jidToNick(jid);
std::string contactsGroup = QT_TRANSLATE_NOOP("", "Contacts");
if (oldGroups.empty()) {
oldGroups.push_back(contactsGroup);
diff --git a/Swift/Controllers/Roster/RosterController.h b/Swift/Controllers/Roster/RosterController.h
index f224180..0a2b818 100644
--- a/Swift/Controllers/Roster/RosterController.h
+++ b/Swift/Controllers/Roster/RosterController.h
@@ -51,19 +51,19 @@ namespace Swift {
std::set<std::string> getGroups() const;
void setContactGroups(const JID& jid, const std::vector<std::string>& groups);
void updateItem(const XMPPRosterItem&);
private:
void handleOnJIDAdded(const JID &jid);
void handleRosterCleared();
void handleOnJIDRemoved(const JID &jid);
- void handleOnJIDUpdated(const JID &jid, const std::string& oldName, const std::vector<std::string> oldGroups);
+ void handleOnJIDUpdated(const JID &jid, const std::string& oldName, const std::vector<std::string>& oldGroups);
void handleStartChatRequest(const JID& contact);
void handleChangeStatusRequest(StatusShow::Type show, const std::string &statusText);
void handleShowOfflineToggled(bool state);
void handleIncomingPresence(boost::shared_ptr<Presence> newPresence);
void handleSubscriptionRequest(const JID& jid, const std::string& message);
void handleSubscriptionRequestAccepted(SubscriptionRequestEvent* event);
void handleSubscriptionRequestDeclined(SubscriptionRequestEvent* event);
void handleUIEvent(boost::shared_ptr<UIEvent> event);
void handleRosterSetError(ErrorPayload::ref error, boost::shared_ptr<RosterPayload> rosterPayload);