summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-10-29 16:15:20 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-10-30 12:50:06 (GMT)
commitefb98f5c83fc5e0fb598a88e04c8bf6f642b5e2a (patch)
tree0f520a39713370f711c82610c089e966beb70412 /Swift
parent8719b25e0dda4c8dae30c86ff88315e0e7fa9e1c (diff)
downloadswift-efb98f5c83fc5e0fb598a88e04c8bf6f642b5e2a.zip
swift-efb98f5c83fc5e0fb598a88e04c8bf6f642b5e2a.tar.bz2
Fix code in response to unused macro and private field warnings
Test-Information: Build and tests pass successfully on OS X 10.10.5. Change-Id: I614586660796f9ef043156d09d998d39934a6eca
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/Roster/ContactRosterItem.cpp2
-rw-r--r--Swift/Controllers/Roster/ContactRosterItem.h2
-rw-r--r--Swift/Controllers/Roster/ItemOperations/SetPresence.h6
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/Swift/Controllers/Roster/ContactRosterItem.cpp b/Swift/Controllers/Roster/ContactRosterItem.cpp
index ae05aee..3258fb5 100644
--- a/Swift/Controllers/Roster/ContactRosterItem.cpp
+++ b/Swift/Controllers/Roster/ContactRosterItem.cpp
@@ -94,7 +94,7 @@ void ContactRosterItem::clearPresence() {
onDataChanged();
}
-void ContactRosterItem::applyPresence(const std::string& resource, boost::shared_ptr<Presence> presence) {
+void ContactRosterItem::applyPresence(boost::shared_ptr<Presence> presence) {
presence_ = presence;
onDataChanged();
}
diff --git a/Swift/Controllers/Roster/ContactRosterItem.h b/Swift/Controllers/Roster/ContactRosterItem.h
index ec04a8c..d21935c 100644
--- a/Swift/Controllers/Roster/ContactRosterItem.h
+++ b/Swift/Controllers/Roster/ContactRosterItem.h
@@ -55,7 +55,7 @@ class ContactRosterItem : public RosterItem {
const JID& getJID() const;
void setDisplayJID(const JID& jid);
const JID& getDisplayJID() const;
- void applyPresence(const std::string& resource, boost::shared_ptr<Presence> presence);
+ void applyPresence(boost::shared_ptr<Presence> presence);
const std::vector<std::string>& getGroups() const;
/** Only used so a contact can know about the groups it's in*/
void addGroup(const std::string& group);
diff --git a/Swift/Controllers/Roster/ItemOperations/SetPresence.h b/Swift/Controllers/Roster/ItemOperations/SetPresence.h
index 0b54237..2b5bbbe 100644
--- a/Swift/Controllers/Roster/ItemOperations/SetPresence.h
+++ b/Swift/Controllers/Roster/ItemOperations/SetPresence.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,8 +9,8 @@
#include <Swiften/Elements/Presence.h>
#include <Swiften/JID/JID.h>
-#include <Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h>
#include <Swift/Controllers/Roster/ContactRosterItem.h>
+#include <Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h>
namespace Swift {
@@ -24,7 +24,7 @@ class SetPresence : public RosterItemOperation {
virtual void operator() (RosterItem* item) const {
ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item);
if (contact && contact->getJID().equals(presence_->getFrom(), compareType_)) {
- contact->applyPresence(presence_->getFrom().getResource(), presence_);
+ contact->applyPresence(presence_);
}
}
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index 751ca32..75acaa9 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -377,7 +377,7 @@ void RosterController::handleAvatarChanged(const JID& jid) {
void RosterController::handlePresenceChanged(Presence::ref presence) {
if (presence->getFrom().equals(myJID_, JID::WithResource)) {
- ownContact_->applyPresence(std::string(), presence);
+ ownContact_->applyPresence(presence);
mainWindow_->setMyContactRosterItem(ownContact_);
}
else {