#include "networkmodel.h"
#include "mappedselectionmodel.h"
#include "buffer.h"
+#include "global.h"
+
#include <QAbstractItemView>
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 &)));
}
***************************************************************************/
#include "treemodel.h"
+#include "global.h"
#include <QDebug>
#include <QCoreApplication>
rootItem = new SimpleTreeItem(data, 0);
connectItem(rootItem);
- if(QCoreApplication::instance()->arguments().contains("--debugmodel")) {
+ if(Global::parser.isSet("debugmodel")) {
connect(this, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)),
this, SLOT(debug_rowsAboutToBeInserted(const QModelIndex &, int, int)));
connect(this, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
#endif // BUILD_QTUI
#ifndef BUILD_CORE
// put client-only arguments here
+ Global::parser.addSwitch("debugbufferswitches",0,"Enables debugging for bufferswitches");
+ Global::parser.addSwitch("debugmodel",0,"Enables debugging for models");
#endif // BUILD_QTCORE
// put shared client&core arguments here
Global::parser.addSwitch("debug",'d',"Enable debug output");