/***************************************************************************
- * Copyright (C) 2005-2019 by the Quassel Project *
+ * Copyright (C) 2005-2020 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
}
else {
// check if there are explicitly buffers removed
+ // Make sure model is valid first
+ if (!parent.model()) {
+ return;
+ }
for (int i = start; i <= end; i++) {
- QVariant variant = parent.child(i, 0).data(NetworkModel::BufferIdRole);
+ QVariant variant = parent.model()->index(i, 0, parent).data(NetworkModel::BufferIdRole);
if (!variant.isValid())
continue;
void NickListDock::setLocked(bool locked)
{
if (locked) {
- setFeatures(nullptr);
+ setFeatures({});
}
else {
setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);