Commit ad2d869a authored by Martin Straka's avatar Martin Straka

RowConut refactoring

parent 9ef99726
......@@ -551,11 +551,8 @@ AccountListModel::AccountListModel(const AccountListModel &model,
int AccountListModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid()) {
return 0;
} else {
return m_userNames.size();
}
return !parent.isValid() ? m_userNames.size() : 0;
}
QHash<int, QByteArray> AccountListModel::roleNames(void) const
......
......@@ -111,11 +111,7 @@ FileListModel::FileListModel(const FileListModel &model, QObject *parent)
int FileListModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid()) {
return 0;
} else {
return m_files.size();
}
return !parent.isValid() ? m_files.size() : 0;
}
QHash<int, QByteArray> FileListModel::roleNames(void) const
......
......@@ -175,11 +175,7 @@ MessageListModel::MessageListModel(const MessageListModel &model,
int MessageListModel::rowCount(const QModelIndex &parent) const
{
if (parent.isValid()) {
return 0;
} else {
return m_messages.size();
}
return !parent.isValid() ? m_messages.size() : 0;
}
QHash<int, QByteArray> MessageListModel::roleNames(void) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment