mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 06:13:36 -07:00
Modify fix to use Qt::QueuedConnection
This commit is contained in:
parent
358f4c68bb
commit
4950e3fae9
1 changed files with 2 additions and 5 deletions
|
@ -256,10 +256,7 @@ TransferListModel *TransferListWidget::getSourceModel() const
|
||||||
|
|
||||||
void TransferListWidget::previewFile(const Path &filePath)
|
void TransferListWidget::previewFile(const Path &filePath)
|
||||||
{
|
{
|
||||||
QTimer::singleShot(0, this, [=]()
|
|
||||||
{
|
|
||||||
Utils::Gui::openPath(filePath);
|
Utils::Gui::openPath(filePath);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex TransferListWidget::mapToSource(const QModelIndex &index) const
|
QModelIndex TransferListWidget::mapToSource(const QModelIndex &index) const
|
||||||
|
@ -317,7 +314,7 @@ void TransferListWidget::torrentDoubleClicked()
|
||||||
{
|
{
|
||||||
auto *dialog = new PreviewSelectDialog(this, torrent);
|
auto *dialog = new PreviewSelectDialog(this, torrent);
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
connect(dialog, &PreviewSelectDialog::readyToPreviewFile, this, &TransferListWidget::previewFile);
|
connect(dialog, &PreviewSelectDialog::readyToPreviewFile, this, &TransferListWidget::previewFile, Qt::QueuedConnection);
|
||||||
dialog->show();
|
dialog->show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue