summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-02-10 13:41:49 (GMT)
committerSwift Review <review@swift.im>2015-02-11 15:45:48 (GMT)
commit4622c2ecf0085b0d322a5ad80324d13cc153f7e4 (patch)
treed38fa25758af06e23ebf7209107e123deb47f716 /Swift/QtUI
parent4eec07c2b1bded2e9ef2c32129228fa90771cddf (diff)
downloadswift-4622c2ecf0085b0d322a5ad80324d13cc153f7e4.zip
swift-4622c2ecf0085b0d322a5ad80324d13cc153f7e4.tar.bz2
Fix missing removable icon in contact listing of "Start Chat…" dialog
QtRemovableItemDelegate only renders the icon if the data for the cell is empty. This is to enable persistent entries. With this commit the model only returns the expected data for the first column. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.0. Change-Id: I5cacebcc47323280b689badf2ba90b3503c17061
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/UserSearch/ContactListModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/ContactListModel.cpp b/Swift/QtUI/UserSearch/ContactListModel.cpp
index 936f048..db13fbc 100644
--- a/Swift/QtUI/UserSearch/ContactListModel.cpp
+++ b/Swift/QtUI/UserSearch/ContactListModel.cpp
@@ -81,7 +81,7 @@ int ContactListModel::columnCount(const QModelIndex&) const {
}
QVariant ContactListModel::data(const QModelIndex& index, int role) const {
- if (boost::numeric_cast<size_t>(index.row()) < contacts_.size()) {
+ if ((boost::numeric_cast<size_t>(index.row()) < contacts_.size()) && (index.column() == 0)) {
const Contact::ref& contact = contacts_[index.row()];
if (role == Qt::EditRole) {
return P2QSTRING(contact->jid.toString());