projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: Workaround Qt 4 SQL bindValue() duplicates
[quassel.git]
/
src
/
client
/
treemodel.cpp
diff --git
a/src/client/treemodel.cpp
b/src/client/treemodel.cpp
index
f02f731
..
555c8c8
100644
(file)
--- a/
src/client/treemodel.cpp
+++ b/
src/client/treemodel.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
8
by the Quassel Project *
+ * Copyright (C) 2005-201
9
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-275,21
+275,8
@@
int SimpleTreeItem::columnCount() const
/*****************************************
* PropertyMapItem
*****************************************/
/*****************************************
* PropertyMapItem
*****************************************/
-PropertyMapItem::PropertyMapItem(const QStringList &propertyOrder, AbstractTreeItem *parent)
- : AbstractTreeItem(parent),
- _propertyOrder(propertyOrder)
-{
-}
-
-
PropertyMapItem::PropertyMapItem(AbstractTreeItem *parent)
PropertyMapItem::PropertyMapItem(AbstractTreeItem *parent)
- : AbstractTreeItem(parent),
- _propertyOrder(QStringList())
-{
-}
-
-
-PropertyMapItem::~PropertyMapItem()
+ : AbstractTreeItem(parent)
{
}
{
}
@@
-304,7
+291,7
@@
QVariant PropertyMapItem::data(int column, int role) const
return toolTip(column);
case Qt::DisplayRole:
case TreeModel::SortRole: // fallthrough, since SortRole should default to DisplayRole
return toolTip(column);
case Qt::DisplayRole:
case TreeModel::SortRole: // fallthrough, since SortRole should default to DisplayRole
- return property(
_propertyOrder
[column].toLatin1());
+ return property(
propertyOrder()
[column].toLatin1());
default:
return QVariant();
}
default:
return QVariant();
}
@@
-316,20
+303,15
@@
bool PropertyMapItem::setData(int column, const QVariant &value, int role)
if (column >= columnCount() || role != Qt::DisplayRole)
return false;
if (column >= columnCount() || role != Qt::DisplayRole)
return false;
+ setProperty(propertyOrder()[column].toLatin1(), value);
emit dataChanged(column);
emit dataChanged(column);
- return
setProperty(_propertyOrder[column].toLatin1(), value)
;
+ return
true
;
}
int PropertyMapItem::columnCount() const
{
}
int PropertyMapItem::columnCount() const
{
- return _propertyOrder.count();
-}
-
-
-void PropertyMapItem::appendProperty(const QString &property)
-{
- _propertyOrder << property;
+ return propertyOrder().count();
}
}