Refactor in searchjob to always color visited entries

Now it colors multiple entries, when visited at once, via the hotkey or
the Download button.
This commit is contained in:
thalieht 2018-07-29 15:33:06 +03:00 committed by sledgehammer999
commit ee6a071fb6
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -174,7 +174,6 @@ SearchJobWidget::~SearchJobWidget()
void SearchJobWidget::onItemDoubleClicked(const QModelIndex &index) void SearchJobWidget::onItemDoubleClicked(const QModelIndex &index)
{ {
setRowColor(index.row(), QApplication::palette().color(QPalette::LinkVisited));
downloadTorrent(index); downloadTorrent(index);
} }
@ -272,6 +271,7 @@ void SearchJobWidget::downloadTorrent(const QModelIndex &rowIndex)
connect(downloadHandler, &SearchDownloadHandler::downloadFinished, this, &SearchJobWidget::addTorrentToSession); connect(downloadHandler, &SearchDownloadHandler::downloadFinished, this, &SearchJobWidget::addTorrentToSession);
connect(downloadHandler, &SearchDownloadHandler::downloadFinished, downloadHandler, &SearchDownloadHandler::deleteLater); connect(downloadHandler, &SearchDownloadHandler::downloadFinished, downloadHandler, &SearchDownloadHandler::deleteLater);
} }
setRowColor(rowIndex.row(), QApplication::palette().color(QPalette::LinkVisited));
} }
void SearchJobWidget::addTorrentToSession(const QString &source) void SearchJobWidget::addTorrentToSession(const QString &source)