X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fsettingspages%2Fshortcutsmodel.cpp;h=55860af5f25687e0bc5fb36ecc0742ea9efd2d4f;hb=98cf856e5cccb789b4b89fbfb42e882129b80334;hp=476798390fe10cc33c570c263ed131f12619f4d0;hpb=9fc57dc2c000e80fb8bd746a090e2e8210e1278e;p=quassel.git diff --git a/src/qtui/settingspages/shortcutsmodel.cpp b/src/qtui/settingspages/shortcutsmodel.cpp index 47679839..55860af5 100644 --- a/src/qtui/settingspages/shortcutsmodel.cpp +++ b/src/qtui/settingspages/shortcutsmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2018 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; }