diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-03-04 13:23:10 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-03-04 16:03:53 (GMT) |
commit | ca7a45a25c2fe332fad1ee3f7a2822415c249206 (patch) | |
tree | 268c6d37f087935a307061f9d5ef507ddd5162cf /Swift/QtUI/Roster | |
parent | 836925a5cdc7017da7fb84416c803e652b48e399 (diff) | |
download | swift-ca7a45a25c2fe332fad1ee3f7a2822415c249206.zip swift-ca7a45a25c2fe332fad1ee3f7a2822415c249206.tar.bz2 |
Qt5 support & warning fixes.
Change-Id: I62c7d5ca44c915e36c797c798294b7c34b465514
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r-- | Swift/QtUI/Roster/QtTreeWidget.cpp | 1 | ||||
-rw-r--r-- | Swift/QtUI/Roster/RosterModel.cpp | 17 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp index 5fdf138..64d0fcf 100644 --- a/Swift/QtUI/Roster/QtTreeWidget.cpp +++ b/Swift/QtUI/Roster/QtTreeWidget.cpp @@ -10,6 +10,7 @@ #include <boost/bind.hpp> #include <QUrl> +#include <QMimeData> #include <Swiften/Base/Platform.h> #include <Swift/Controllers/Roster/ContactRosterItem.h> diff --git a/Swift/QtUI/Roster/RosterModel.cpp b/Swift/QtUI/Roster/RosterModel.cpp index 885d04c..2909c05 100644 --- a/Swift/QtUI/Roster/RosterModel.cpp +++ b/Swift/QtUI/Roster/RosterModel.cpp @@ -40,7 +40,8 @@ void RosterModel::setRoster(Roster* roster) { void RosterModel::reLayout() { //emit layoutChanged(); - reset(); + beginResetModel(); + endResetModel(); // TODO: Not sure if this isn't too early? if (!roster_) { return; } @@ -53,7 +54,7 @@ void RosterModel::reLayout() { void RosterModel::handleChildrenChanged(GroupRosterItem* /*group*/) { reLayout(); -} +} void RosterModel::handleDataChanged(RosterItem* item) { Q_ASSERT(item); @@ -163,12 +164,12 @@ QIcon RosterModel::getPresenceIcon(RosterItem* item) const { if (!contact) return QIcon(); QString iconString; switch (contact->getStatusShow()) { - case StatusShow::Online: iconString = "online";break; - case StatusShow::Away: iconString = "away";break; - case StatusShow::XA: iconString = "away";break; - case StatusShow::FFC: iconString = "online";break; - case StatusShow::DND: iconString = "dnd";break; - case StatusShow::None: iconString = "offline";break; + case StatusShow::Online: iconString = "online";break; + case StatusShow::Away: iconString = "away";break; + case StatusShow::XA: iconString = "away";break; + case StatusShow::FFC: iconString = "online";break; + case StatusShow::DND: iconString = "dnd";break; + case StatusShow::None: iconString = "offline";break; } return QIcon(":/icons/" + iconString + ".png"); } |