projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cmake: avoid de-duplication of user's CXXFLAGS
[quassel.git]
/
src
/
qtui
/
settingspages
/
shortcutsmodel.cpp
diff --git
a/src/qtui/settingspages/shortcutsmodel.cpp
b/src/qtui/settingspages/shortcutsmodel.cpp
index
0cf3f5e
..
c9a3b0b
100644
(file)
--- a/
src/qtui/settingspages/shortcutsmodel.cpp
+++ b/
src/qtui/settingspages/shortcutsmodel.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
18
by the Quassel Project *
+ * Copyright (C) 2005-20
22
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 *
@@
-77,19
+77,9
@@
QModelIndex ShortcutsModel::index(int row, int column, const QModelIndex& parent
return createIndex(row, column, _categoryItems.at(row));
}
return createIndex(row, column, _categoryItems.at(row));
}
-int ShortcutsModel::columnCount(const QModelIndex&
parent
) const
+int ShortcutsModel::columnCount(const QModelIndex&) const
{
return 2;
{
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
}
int ShortcutsModel::rowCount(const QModelIndex& parent) const
@@
-159,7
+149,7
@@
QVariant ShortcutsModel::data(const QModelIndex& index, int role) const
return QVariant();
case ActionRole:
return QVariant();
case ActionRole:
- return QVariant::fromValue
<QObject*>
(action);
+ return QVariant::fromValue(action);
case DefaultShortcutRole:
return action->shortcut(Action::DefaultShortcut);
case DefaultShortcutRole:
return action->shortcut(Action::DefaultShortcut);