Disable debug output in queuemodel
This commit is contained in:
parent
1faf092d48
commit
6cb062dd9c
@ -17,19 +17,19 @@ QueueModel::QueueModel(QObject *parent)
|
|||||||
int to = (from < to_orig) ? to_orig + 1 : to_orig;
|
int to = (from < to_orig) ? to_orig + 1 : to_orig;
|
||||||
beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
|
beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
|
||||||
endMoveRows();
|
endMoveRows();
|
||||||
qDebug() << "Moved entry" << from << "to" << to;
|
//qDebug() << "Moved entry" << from << "to" << to;
|
||||||
});
|
});
|
||||||
connect(&DataManager::instance(), &DataManager::queueEntryAdded, this, [this](const int &pos, const QString &id) {
|
connect(&DataManager::instance(), &DataManager::queueEntryAdded, this, [this](const int &pos, const QString &id) {
|
||||||
Q_UNUSED(id)
|
Q_UNUSED(id)
|
||||||
beginInsertRows(QModelIndex(), pos, pos);
|
beginInsertRows(QModelIndex(), pos, pos);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
qDebug() << "Added entry at pos" << pos;
|
//qDebug() << "Added entry at pos" << pos;
|
||||||
});
|
});
|
||||||
connect(&DataManager::instance(), &DataManager::queueEntryRemoved, this, [this](const int &pos, const QString &id) {
|
connect(&DataManager::instance(), &DataManager::queueEntryRemoved, this, [this](const int &pos, const QString &id) {
|
||||||
Q_UNUSED(id)
|
Q_UNUSED(id)
|
||||||
beginRemoveRows(QModelIndex(), pos, pos);
|
beginRemoveRows(QModelIndex(), pos, pos);
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
qDebug() << "Removed entry at pos" << pos;
|
//qDebug() << "Removed entry at pos" << pos;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ QVariant QueueModel::data(const QModelIndex &index, int role) const
|
|||||||
{
|
{
|
||||||
if (role != 0)
|
if (role != 0)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
qDebug() << "return entry" << DataManager::instance().getQueueEntry(index.row());
|
//qDebug() << "return entry" << DataManager::instance().getQueueEntry(index.row());
|
||||||
return QVariant::fromValue(DataManager::instance().getQueueEntry(index.row()));
|
return QVariant::fromValue(DataManager::instance().getQueueEntry(index.row()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +51,6 @@ QHash<int, QByteArray> QueueModel::roleNames() const
|
|||||||
int QueueModel::rowCount(const QModelIndex &parent) const
|
int QueueModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
Q_UNUSED(parent)
|
||||||
qDebug() << "queueCount is" << DataManager::instance().queueCount();
|
//qDebug() << "queueCount is" << DataManager::instance().queueCount();
|
||||||
return DataManager::instance().queueCount();
|
return DataManager::instance().queueCount();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user