Use kdelibs coding style
This commit is contained in:
parent
0084798a2c
commit
d965371d23
31 changed files with 201 additions and 234 deletions
|
@ -24,14 +24,16 @@
|
|||
|
||||
#include <KLocalizedString>
|
||||
|
||||
namespace Danbooru {
|
||||
namespace Danbooru
|
||||
{
|
||||
|
||||
DanbooruPoolModel::DanbooruPoolModel(QObject* parent): QAbstractTableModel(parent)
|
||||
DanbooruPoolModel::DanbooruPoolModel(QObject *parent): QAbstractTableModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
const QStringList DanbooruPoolModel::m_headerNames = { i18n("ID"),
|
||||
i18n("Name"), i18n("Posts"), i18n("Description") };
|
||||
i18n("Name"), i18n("Posts"), i18n("Description")
|
||||
};
|
||||
|
||||
DanbooruPoolModel::~DanbooruPoolModel()
|
||||
{
|
||||
|
@ -60,7 +62,7 @@ int DanbooruPoolModel::columnCount(const QModelIndex &parent) const
|
|||
return 4;
|
||||
}
|
||||
|
||||
QVariant DanbooruPoolModel::data(const QModelIndex& index, int role) const
|
||||
QVariant DanbooruPoolModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid()) {
|
||||
return QVariant();
|
||||
|
@ -74,7 +76,7 @@ QVariant DanbooruPoolModel::data(const QModelIndex& index, int role) const
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
DanbooruPool* pool = m_items.at(index.row());
|
||||
DanbooruPool *pool = m_items.at(index.row());
|
||||
|
||||
if (role == Qt::DisplayRole) {
|
||||
|
||||
|
@ -105,7 +107,7 @@ QVariant DanbooruPoolModel::headerData(int section, Qt::Orientation orientation,
|
|||
|
||||
void DanbooruPoolModel::clear()
|
||||
{
|
||||
if (m_items.isEmpty()) {
|
||||
if (m_items.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -115,11 +117,9 @@ void DanbooruPoolModel::clear()
|
|||
endResetModel();
|
||||
}
|
||||
|
||||
DanbooruPool* DanbooruPoolModel::poolAt(int index) const
|
||||
DanbooruPool *DanbooruPoolModel::poolAt(int index) const
|
||||
{
|
||||
return m_items.at(index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace Danbooru
|
Loading…
Add table
Add a link
Reference in a new issue