mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
ComicVine: Convert to new slot syntax
This commit is contained in:
parent
f1e4396dc5
commit
d7a9e66377
@ -53,7 +53,9 @@ SelectVolume::SelectVolume(QWidget *parent)
|
|||||||
tableVolumes->horizontalHeader()->setClickable(true);
|
tableVolumes->horizontalHeader()->setClickable(true);
|
||||||
#endif
|
#endif
|
||||||
//tableVolumes->horizontalHeader()->setSortIndicatorShown(false);
|
//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
|
//connections
|
||||||
connect(tableVolumes, &QAbstractItemView::clicked, this, &SelectVolume::loadVolumeInfo);
|
connect(tableVolumes, &QAbstractItemView::clicked, this, &SelectVolume::loadVolumeInfo);
|
||||||
|
|
||||||
|
@ -134,11 +134,11 @@ void SortVolumeComics::synchronizeScroll(int pos)
|
|||||||
QScrollBar *tableFilesScrollBar = tableFiles->verticalScrollBar();
|
QScrollBar *tableFilesScrollBar = tableFiles->verticalScrollBar();
|
||||||
|
|
||||||
if (senderObject == tableVolumeComicsScrollBar) {
|
if (senderObject == tableVolumeComicsScrollBar) {
|
||||||
disconnect(tableFilesScrollBar, SIGNAL(valueChanged(int)), this, 0);
|
disconnect(tableFilesScrollBar, &QAbstractSlider::valueChanged, this, nullptr);
|
||||||
tableFilesScrollBar->setValue(pos);
|
tableFilesScrollBar->setValue(pos);
|
||||||
connect(tableFilesScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
|
connect(tableFilesScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
|
||||||
} else {
|
} else {
|
||||||
disconnect(tableVolumeComicsScrollBar, SIGNAL(valueChanged(int)), this, 0);
|
disconnect(tableVolumeComicsScrollBar, &QAbstractSlider::valueChanged, this, nullptr);
|
||||||
tableVolumeComicsScrollBar->setValue(pos);
|
tableVolumeComicsScrollBar->setValue(pos);
|
||||||
connect(tableVolumeComicsScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
|
connect(tableVolumeComicsScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user