ComicVine: Convert to new slot syntax

This commit is contained in:
Felix Kauselmann 2021-06-22 12:38:32 +02:00
parent f1e4396dc5
commit d7a9e66377
2 changed files with 5 additions and 3 deletions

View File

@ -53,7 +53,9 @@ SelectVolume::SelectVolume(QWidget *parent)
tableVolumes->horizontalHeader()->setClickable(true);
#endif
//tableVolumes->horizontalHeader()->setSortIndicatorShown(false);
connect(tableVolumes->horizontalHeader(), SIGNAL(sectionClicked(int)), tableVolumes, SLOT(sortByColumn(int)));
connect(tableVolumes->horizontalHeader(), &QHeaderView::sectionClicked,
[=](int index) { tableVolumes->horizontalHeader()->sortIndicatorSection() == index ? tableVolumes->sortByColumn(index, tableVolumes->horizontalHeader()->sortIndicatorOrder() == Qt::AscendingOrder ? Qt::DescendingOrder : Qt::AscendingOrder)
: tableVolumes->sortByColumn(index, Qt::AscendingOrder); });
//connections
connect(tableVolumes, &QAbstractItemView::clicked, this, &SelectVolume::loadVolumeInfo);

View File

@ -134,11 +134,11 @@ void SortVolumeComics::synchronizeScroll(int pos)
QScrollBar *tableFilesScrollBar = tableFiles->verticalScrollBar();
if (senderObject == tableVolumeComicsScrollBar) {
disconnect(tableFilesScrollBar, SIGNAL(valueChanged(int)), this, 0);
disconnect(tableFilesScrollBar, &QAbstractSlider::valueChanged, this, nullptr);
tableFilesScrollBar->setValue(pos);
connect(tableFilesScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
} else {
disconnect(tableVolumeComicsScrollBar, SIGNAL(valueChanged(int)), this, 0);
disconnect(tableVolumeComicsScrollBar, &QAbstractSlider::valueChanged, this, nullptr);
tableVolumeComicsScrollBar->setValue(pos);
connect(tableVolumeComicsScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
}