projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump version for release 0.14-rc2
[quassel.git]
/
src
/
client
/
irclistmodel.cpp
diff --git
a/src/client/irclistmodel.cpp
b/src/client/irclistmodel.cpp
index
d01ba97
..
5cfc128
100644
(file)
--- a/
src/client/irclistmodel.cpp
+++ b/
src/client/irclistmodel.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
16
by the Quassel Project *
+ * Copyright (C) 2005-20
20
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 *
@@
-22,13
+22,11
@@
#include <QStringList>
#include <QStringList>
-IrcListModel::IrcListModel(QObject
*
parent)
+IrcListModel::IrcListModel(QObject
*
parent)
: QAbstractItemModel(parent)
: QAbstractItemModel(parent)
-{
-}
+{}
-
-QVariant IrcListModel::data(const QModelIndex &index, int role) const
+QVariant IrcListModel::data(const QModelIndex& index, int role) const
{
if (!index.isValid() || index.row() >= rowCount() || index.column() >= columnCount() || role != Qt::DisplayRole)
return QVariant();
{
if (!index.isValid() || index.row() >= rowCount() || index.column() >= columnCount() || role != Qt::DisplayRole)
return QVariant();
@@
-47,8
+45,7
@@
QVariant IrcListModel::data(const QModelIndex &index, int role) const
}
}
}
}
-
-Qt::ItemFlags IrcListModel::flags(const QModelIndex &index) const
+Qt::ItemFlags IrcListModel::flags(const QModelIndex& index) const
{
if (!index.isValid()) {
return Qt::ItemIsDropEnabled;
{
if (!index.isValid()) {
return Qt::ItemIsDropEnabled;
@@
-58,13
+55,10
@@
Qt::ItemFlags IrcListModel::flags(const QModelIndex &index) const
}
}
}
}
-
QVariant IrcListModel::headerData(int section, Qt::Orientation orientation, int role) const
{
QStringList header;
QVariant IrcListModel::headerData(int section, Qt::Orientation orientation, int role) const
{
QStringList header;
- header << tr("Channel")
- << tr("Users")
- << tr("Topic");
+ header << tr("Channel") << tr("Users") << tr("Topic");
if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
return header[section];
if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
return header[section];
@@
-72,18
+66,16
@@
QVariant IrcListModel::headerData(int section, Qt::Orientation orientation, int
return QVariant();
}
return QVariant();
}
-
-QModelIndex IrcListModel::index(int row, int column, const QModelIndex &parent) const
+QModelIndex IrcListModel::index(int row, int column, const QModelIndex& parent) const
{
Q_UNUSED(parent);
if (row >= rowCount() || column >= columnCount())
{
Q_UNUSED(parent);
if (row >= rowCount() || column >= columnCount())
- return
QModelIndex()
;
+ return
{}
;
return createIndex(row, column);
}
return createIndex(row, column);
}
-
-void IrcListModel::setChannelList(const QList<IrcListHelper::ChannelDescription> &channelList)
+void IrcListModel::setChannelList(const QList<IrcListHelper::ChannelDescription>& channelList)
{
if (rowCount() > 0) {
beginRemoveRows(QModelIndex(), 0, _channelList.count() - 1);
{
if (rowCount() > 0) {
beginRemoveRows(QModelIndex(), 0, _channelList.count() - 1);