summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-09-12 23:22:12 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-09-18 09:38:54 (GMT)
commit4455c20085834098f6d9aa872db3115d466e7004 (patch)
treee5e61ec0880f4001bc76340cd13670cd49628e7c /Swiften/Client/BlockListImpl.h
parent909ecaea63618e9b94c9063c94cd51aa69654b00 (diff)
downloadswift-4455c20085834098f6d9aa872db3115d466e7004.zip
swift-4455c20085834098f6d9aa872db3115d466e7004.tar.bz2
Fix notification logic for signals in BlockListImpl
The logic for calling onItemAdded and onItemRemoved signals when setting a new list of block items using BlockListImpl::setItems used to be broken. This commit fixes and documents the correct signal notification behavior Test-Information: Added a unit test which verifies the notification behavior in case of added block list items, removed block list items and a complete change of the block list. Change-Id: I3061545e25ddfc2d9d1a3c987045a58e5c9230ac
Diffstat (limited to 'Swiften/Client/BlockListImpl.h')
-rw-r--r--Swiften/Client/BlockListImpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Client/BlockListImpl.h b/Swiften/Client/BlockListImpl.h
index 19359b0..e203d68 100644
--- a/Swiften/Client/BlockListImpl.h
+++ b/Swiften/Client/BlockListImpl.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (c) 2011 Isode Limited. 2 * Copyright (c) 2011-2015 Isode Limited.
3 * All rights reserved. 3 * All rights reserved.
4 * See the COPYING file for more information. 4 * See the COPYING file for more information.
5 */ 5 */
6 6
7#pragma once 7#pragma once
@@ -21,11 +21,11 @@ namespace Swift {
21 21
22 virtual const std::vector<JID>& getItems() const { 22 virtual const std::vector<JID>& getItems() const {
23 return items; 23 return items;
24 } 24 }
25 25
26 void setItems(const std::vector<JID>& items); 26 void setItems(const std::vector<JID>& newItems);
27 void addItem(const JID& item); 27 void addItem(const JID& item);
28 void removeItem(const JID& item); 28 void removeItem(const JID& item);
29 void addItems(const std::vector<JID>& items); 29 void addItems(const std::vector<JID>& items);
30 void removeItems(const std::vector<JID>& items); 30 void removeItems(const std::vector<JID>& items);
31 void removeAllItems(); 31 void removeAllItems();