X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fsettingspages%2Fshortcutsmodel.cpp;h=72d87d61215d0abf328d3d6c6c662792e73ed6f3;hb=a65f42197839da536975b3e2858eedcef420035f;hp=e35288703ad537528216b8adaca4534e5ceeb3f4;hpb=e50ae7a06fc4e5d3a911c361d30953410deab609;p=quassel.git diff --git a/src/qtui/settingspages/shortcutsmodel.cpp b/src/qtui/settingspages/shortcutsmodel.cpp index e3528870..72d87d61 100644 --- a/src/qtui/settingspages/shortcutsmodel.cpp +++ b/src/qtui/settingspages/shortcutsmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -81,19 +81,9 @@ QModelIndex ShortcutsModel::index(int row, int column, const QModelIndex &parent } -int ShortcutsModel::columnCount(const QModelIndex &parent) const +int ShortcutsModel::columnCount(const QModelIndex &) const { return 2; - if (!parent.isValid()) - return 2; - - Item *item = static_cast(parent.internalPointer()); - Q_ASSERT(item); - - if (!item->parentItem) - return 2; - - return 2; }