summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/ChatList/ChatListModel.cpp')
-rw-r--r--Swift/QtUI/ChatList/ChatListModel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Swift/QtUI/ChatList/ChatListModel.cpp b/Swift/QtUI/ChatList/ChatListModel.cpp
index e5e8963..416b786 100644
--- a/Swift/QtUI/ChatList/ChatListModel.cpp
+++ b/Swift/QtUI/ChatList/ChatListModel.cpp
@@ -96,7 +96,7 @@ void ChatListModel::setRecents(const std::list<ChatListWindow::Chat>& recents) {
recents_->clear();
endRemoveRows();
beginInsertRows(recentsIndex_, 0, recents.size());
- foreach (const ChatListWindow::Chat chat, recents) {
+ for (const auto& chat : recents) {
recents_->addItem(new ChatListRecentItem(chat, recents_));
//whiteboards_->addItem(new ChatListRecentItem(chat, whiteboards_));
}
@@ -121,8 +121,7 @@ QMimeData* ChatListModel::mimeData(const QModelIndexList& indexes) const {
}
dataStream << P2QSTRING(chat.jid.toString());
} else {
- typedef std::map<std::string, JID> JIDMap;
- foreach (const JIDMap::value_type& jid, chat.impromptuJIDs) {
+ for (const auto& jid : chat.impromptuJIDs) {
dataStream << P2QSTRING(jid.second.toString());
}
}