summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/ChatList')
-rw-r--r--Swift/QtUI/ChatList/ChatListModel.cpp14
-rw-r--r--Swift/QtUI/ChatList/QtChatListWindow.cpp6
-rw-r--r--Swift/QtUI/ChatList/QtChatListWindow.h4
3 files changed, 12 insertions, 12 deletions
diff --git a/Swift/QtUI/ChatList/ChatListModel.cpp b/Swift/QtUI/ChatList/ChatListModel.cpp
index 307cdea..e5e8963 100644
--- a/Swift/QtUI/ChatList/ChatListModel.cpp
+++ b/Swift/QtUI/ChatList/ChatListModel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,8 +16,8 @@
namespace Swift {
-ChatListModel::ChatListModel() : whiteboards_(NULL) {
- root_ = new ChatListGroupItem("", NULL, false);
+ChatListModel::ChatListModel() : whiteboards_(nullptr) {
+ root_ = new ChatListGroupItem("", nullptr, false);
mucBookmarks_ = new ChatListGroupItem(tr("Bookmarked Rooms"), root_);
recents_ = new ChatListGroupItem(tr("Recent Chats"), root_, false);
#ifdef SWIFT_EXPERIMENTAL_WB
@@ -106,7 +106,7 @@ void ChatListModel::setRecents(const std::list<ChatListWindow::Chat>& recents) {
QMimeData* ChatListModel::mimeData(const QModelIndexList& indexes) const {
QMimeData* data = QAbstractItemModel::mimeData(indexes);
ChatListRecentItem *item = dynamic_cast<ChatListRecentItem*>(getItemForIndex(indexes.first()));
- if (item == NULL) {
+ if (item == nullptr) {
return data;
}
@@ -132,7 +132,7 @@ QMimeData* ChatListModel::mimeData(const QModelIndexList& indexes) const {
}
const ChatListMUCItem* ChatListModel::getChatListMUCItem(const JID& roomJID) const {
- const ChatListMUCItem* mucItem = NULL;
+ const ChatListMUCItem* mucItem = nullptr;
for (int i = 0; i < mucBookmarks_->rowCount(); i++) {
ChatListMUCItem* item = dynamic_cast<ChatListMUCItem*>(mucBookmarks_->item(i));
if (item->getBookmark().getRoom() == roomJID) {
@@ -148,7 +148,7 @@ int ChatListModel::columnCount(const QModelIndex& /*parent*/) const {
}
ChatListItem* ChatListModel::getItemForIndex(const QModelIndex& index) const {
- return index.isValid() ? static_cast<ChatListItem*>(index.internalPointer()) : NULL;
+ return index.isValid() ? static_cast<ChatListItem*>(index.internalPointer()) : nullptr;
}
QVariant ChatListModel::data(const QModelIndex& index, int role) const {
@@ -175,7 +175,7 @@ QModelIndex ChatListModel::parent(const QModelIndex& index) const {
}
int ChatListModel::rowCount(const QModelIndex& parentIndex) const {
- ChatListGroupItem* parent = NULL;
+ ChatListGroupItem* parent = nullptr;
if (parentIndex.isValid()) {
parent = dynamic_cast<ChatListGroupItem*>(static_cast<ChatListItem*>(parentIndex.internalPointer()));
} else {
diff --git a/Swift/QtUI/ChatList/QtChatListWindow.cpp b/Swift/QtUI/ChatList/QtChatListWindow.cpp
index eddd0cd..1a121aa 100644
--- a/Swift/QtUI/ChatList/QtChatListWindow.cpp
+++ b/Swift/QtUI/ChatList/QtChatListWindow.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -177,7 +177,7 @@ void QtChatListWindow::dragEnterEvent(QDragEnterEvent *event) {
void QtChatListWindow::contextMenuEvent(QContextMenuEvent* event) {
QModelIndex index = indexAt(event->pos());
- ChatListItem* baseItem = index.isValid() ? static_cast<ChatListItem*>(index.internalPointer()) : NULL;
+ ChatListItem* baseItem = index.isValid() ? static_cast<ChatListItem*>(index.internalPointer()) : nullptr;
contextMenuItem_ = baseItem;
foreach(QAction* action, onlineOnlyActions_) {
@@ -203,7 +203,7 @@ void QtChatListWindow::contextMenuEvent(QContextMenuEvent* event) {
const ChatListWindow::Chat& chat = recentItem->getChat();
if (chat.isMUC) {
QMenu mucRecentsMenu;
- QAction* bookmarkAction = NULL;
+ QAction* bookmarkAction = nullptr;
const ChatListMUCItem* mucItem = model_->getChatListMUCItem(chat.jid);
if (mucItem) {
contextMenuItem_ = mucItem;
diff --git a/Swift/QtUI/ChatList/QtChatListWindow.h b/Swift/QtUI/ChatList/QtChatListWindow.h
index 61f8391..834e318 100644
--- a/Swift/QtUI/ChatList/QtChatListWindow.h
+++ b/Swift/QtUI/ChatList/QtChatListWindow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -19,7 +19,7 @@ namespace Swift {
class QtChatListWindow : public QTreeView, public ChatListWindow {
Q_OBJECT
public:
- QtChatListWindow(UIEventStream *uiEventStream, SettingsProvider* settings, QWidget* parent = NULL);
+ QtChatListWindow(UIEventStream *uiEventStream, SettingsProvider* settings, QWidget* parent = nullptr);
virtual ~QtChatListWindow();
void addMUCBookmark(const MUCBookmark& bookmark);
void removeMUCBookmark(const MUCBookmark& bookmark);