mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Use Qt5 connect syntax
This commit is contained in:
parent
6f6033cf1c
commit
e071c31a4e
@ -96,7 +96,6 @@ PreviewSelectDialog::PreviewSelectDialog(QWidget *parent, BitTorrent::TorrentHan
|
||||
}
|
||||
}
|
||||
|
||||
connect(this, SIGNAL(readyToPreviewFile(QString)), parent, SLOT(previewFile(QString)));
|
||||
m_previewListModel->sort(NAME);
|
||||
m_ui->previewList->header()->setSortIndicator(0, Qt::AscendingOrder);
|
||||
m_ui->previewList->selectionModel()->select(m_previewListModel->index(0, NAME), QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||
|
@ -605,10 +605,13 @@ void TransferListWidget::openSelectedTorrentsFolder() const
|
||||
void TransferListWidget::previewSelectedTorrents()
|
||||
{
|
||||
for (BitTorrent::TorrentHandle *const torrent : asConst(getSelectedTorrents())) {
|
||||
if (torrentContainsPreviewableFiles(torrent))
|
||||
new PreviewSelectDialog(this, torrent);
|
||||
else
|
||||
if (torrentContainsPreviewableFiles(torrent)) {
|
||||
const auto *dialog = new PreviewSelectDialog(this, torrent);
|
||||
connect(dialog, &PreviewSelectDialog::readyToPreviewFile, this, &TransferListWidget::previewFile);
|
||||
}
|
||||
else {
|
||||
QMessageBox::critical(this, tr("Unable to preview"), tr("The selected torrent does not contain previewable files"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user