X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fshortcutsmodel.cpp;h=55860af5f25687e0bc5fb36ecc0742ea9efd2d4f;hp=2ee0eee8a2470b7b1275118f5d77c20cd5a91647;hb=98cf856e5cccb789b4b89fbfb42e882129b80334;hpb=5b686746c880e5cda6d5de3e08180ea4332ff222 diff --git a/src/qtui/settingspages/shortcutsmodel.cpp b/src/qtui/settingspages/shortcutsmodel.cpp index 2ee0eee8..55860af5 100644 --- a/src/qtui/settingspages/shortcutsmodel.cpp +++ b/src/qtui/settingspages/shortcutsmodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 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; }