X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fbuffermodel.cpp;h=e124db6d841c043923b8dbab3109f8203bd14314;hb=332069a1830ed3a055ac6f2d7661bae1cc83e40c;hp=b67a447da2509ccbc3d44e7336a4011ef324d525;hpb=6cd120c0b28d9cca7e2465fad731977d532ce74d;p=quassel.git diff --git a/src/client/buffermodel.cpp b/src/client/buffermodel.cpp index b67a447d..e124db6d 100644 --- a/src/client/buffermodel.cpp +++ b/src/client/buffermodel.cpp @@ -22,7 +22,8 @@ #include "networkmodel.h" #include "mappedselectionmodel.h" -#include "buffer.h" +#include "global.h" + #include BufferModel::BufferModel(NetworkModel *parent) @@ -30,7 +31,7 @@ BufferModel::BufferModel(NetworkModel *parent) _selectionModelSynchronizer(this) { setSourceModel(parent); - if(QCoreApplication::instance()->arguments().contains("--debugbufferswitches")) { + if(Global::parser.isSet("debugbufferswitches")) { connect(_selectionModelSynchronizer.selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(debug_currentChanged(const QModelIndex &, const QModelIndex &))); } @@ -59,10 +60,6 @@ void BufferModel::synchronizeView(QAbstractItemView *view) { view->setSelectionModel(mappedSelectionModel); } -QModelIndex BufferModel::currentIndex() { - return standardSelectionModel()->currentIndex(); -} - void BufferModel::setCurrentIndex(const QModelIndex &newCurrent) { _selectionModelSynchronizer.selectionModel()->setCurrentIndex(newCurrent, QItemSelectionModel::Current); _selectionModelSynchronizer.selectionModel()->select(newCurrent, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);