BufferView::BufferView(QWidget *parent)
: TreeViewTouch(parent)
{
- connect(this, SIGNAL(collapsed(const QModelIndex &)), SLOT(storeExpandedState(const QModelIndex &)));
- connect(this, SIGNAL(expanded(const QModelIndex &)), SLOT(storeExpandedState(const QModelIndex &)));
+ connect(this, &QTreeView::collapsed, this, &BufferView::storeExpandedState);
+ connect(this, &QTreeView::expanded, this, &BufferView::storeExpandedState);
setSelectionMode(QAbstractItemView::ExtendedSelection);
disconnect(this, SIGNAL(activated(QModelIndex)), this, SLOT(joinChannel(QModelIndex)));
connect(this, SIGNAL(activated(QModelIndex)), SLOT(joinChannel(QModelIndex)));
#else
- disconnect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex)));
- connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(joinChannel(QModelIndex)));
+ disconnect(this, &QAbstractItemView::doubleClicked, this, &BufferView::joinChannel);
+ connect(this, &QAbstractItemView::doubleClicked, this, &BufferView::joinChannel);
#endif
}
showSection->setCheckable(true);
showSection->setChecked(!isColumnHidden(i));
showSection->setProperty("column", i);
- connect(showSection, SIGNAL(toggled(bool)), this, SLOT(toggleHeader(bool)));
+ connect(showSection, &QAction::toggled, this, &BufferView::toggleHeader);
header()->addAction(showSection);
}
- connect(model, SIGNAL(layoutChanged()), this, SLOT(on_layoutChanged()));
+ connect(model, &QAbstractItemModel::layoutChanged, this, &BufferView::on_layoutChanged);
// Make sure collapsation is correct after setting a model
// This might not be needed here, only in BufferView::setFilteredModel(). If issues arise, just
else {
auto *filter = new BufferViewFilter(model_, config);
setModel(filter);
- connect(filter, SIGNAL(configChanged()), this, SLOT(on_configChanged()));
+ connect(filter, &BufferViewFilter::configChanged, this, &BufferView::on_configChanged);
}
setConfig(config);
}
_config = config;
if (config) {
- connect(config, SIGNAL(networkIdSet(const NetworkId &)), this, SLOT(setRootIndexForNetworkId(const NetworkId &)));
+ connect(config, &BufferViewConfig::networkIdSet, this, &BufferView::setRootIndexForNetworkId);
setRootIndexForNetworkId(config->networkId());
}
else {
setObjectName("BufferViewDock-" + QString::number(config->bufferViewId()));
toggleViewAction()->setData(config->bufferViewId());
setAllowedAreas(Qt::RightDockWidgetArea|Qt::LeftDockWidgetArea);
- connect(config, SIGNAL(bufferViewNameSet(const QString &)), this, SLOT(bufferViewRenamed(const QString &)));
- connect(config, SIGNAL(configChanged()), SLOT(configChanged()));
+ connect(config, &BufferViewConfig::bufferViewNameSet, this, &BufferViewDock::bufferViewRenamed);
+ connect(config, &BufferViewConfig::configChanged, this, &BufferViewDock::configChanged);
updateTitle();
_widget->setLayout(new QVBoxLayout);
_filterEdit->setFocusPolicy(Qt::ClickFocus);
_filterEdit->installEventFilter(this);
_filterEdit->setPlaceholderText(tr("Search..."));
- connect(_filterEdit, SIGNAL(returnPressed()), SLOT(onFilterReturnPressed()));
+ connect(_filterEdit, &QLineEdit::returnPressed, this, &BufferViewDock::onFilterReturnPressed);
_widget->layout()->addWidget(_filterEdit);
QDockWidget::setWidget(_widget);
_widget->layout()->addWidget(newWidget);
_childWidget = newWidget;
- connect(_filterEdit, SIGNAL(textChanged(QString)), bufferView(), SLOT(filterTextChanged(QString)));
+ connect(_filterEdit, &QLineEdit::textChanged, bufferView(), &BufferView::filterTextChanged);
}
void BufferViewDock::activateFilter()