mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- Simplified file preview using QDesktopServices
This commit is contained in:
parent
18ee43225e
commit
5b6166ee15
7 changed files with 3 additions and 98 deletions
|
@ -253,8 +253,6 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
|
|||
QModelIndex index;
|
||||
// Enable/disable pause/start action given the DL state
|
||||
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
QString previewProgram = settings.value(QString::fromUtf8("Preferences/general/MediaPlayer"), QString()).toString();
|
||||
bool has_pause = false, has_start = false, has_preview = false;
|
||||
foreach(index, selectedIndexes) {
|
||||
if(index.column() == NAME) {
|
||||
|
@ -274,7 +272,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
|
|||
has_pause = true;
|
||||
}
|
||||
}
|
||||
if(!previewProgram.isEmpty() && BTSession->isFilePreviewPossible(hash) && !has_preview) {
|
||||
if(BTSession->isFilePreviewPossible(hash) && !has_preview) {
|
||||
myDLLlistMenu.addAction(actionPreview_file);
|
||||
has_preview = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue