/***************************************************************************
- * Copyright (C) 2005-2018 by the Quassel Project *
+ * Copyright (C) 2005-2020 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
return createIndex(row, column, _categoryItems.at(row));
}
-int ShortcutsModel::columnCount(const QModelIndex& parent) const
+int ShortcutsModel::columnCount(const QModelIndex&) const
{
return 2;
- if (!parent.isValid())
- return 2;
-
- auto* item = static_cast<Item*>(parent.internalPointer());
- Q_ASSERT(item);
-
- if (!item->parentItem)
- return 2;
-
- return 2;
}
int ShortcutsModel::rowCount(const QModelIndex& parent) const
return QVariant();
case ActionRole:
- return QVariant::fromValue<QObject*>(action);
+ return QVariant::fromValue(action);
case DefaultShortcutRole:
return action->shortcut(Action::DefaultShortcut);