diff options
author | Tobias Markmann <tm@ayena.de> | 2015-09-12 23:22:12 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-09-18 09:38:54 (GMT) |
commit | 4455c20085834098f6d9aa872db3115d466e7004 (patch) | |
tree | e5e61ec0880f4001bc76340cd13670cd49628e7c /Swiften/Client/BlockListImpl.h | |
parent | 909ecaea63618e9b94c9063c94cd51aa69654b00 (diff) | |
download | swift-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.h | 4 |
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,8 +1,8 @@ /* - * Copyright (c) 2011 Isode Limited. + * Copyright (c) 2011-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once @@ -20,13 +20,13 @@ namespace Swift { void setState(State state); virtual const std::vector<JID>& getItems() const { return items; } - void setItems(const std::vector<JID>& items); + void setItems(const std::vector<JID>& newItems); void addItem(const JID& item); void removeItem(const JID& item); void addItems(const std::vector<JID>& items); void removeItems(const std::vector<JID>& items); void removeAllItems(); |