- Simplified file preview using QDesktopServices

This commit is contained in:
Christophe Dumez 2007-11-16 18:36:57 +00:00
parent 18ee43225e
commit 5b6166ee15
7 changed files with 3 additions and 98 deletions

View file

@ -320,8 +320,6 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
QModelIndex index;
// Enable/disable pause/start action given the DL state
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
QSettings settings("qBittorrent", "qBittorrent");
QString previewProgram = settings.value("Preferences/general/MediaPlayer", QString()).toString();
bool has_pause = false, has_start = false, has_preview = false;
foreach(index, selectedIndexes) {
if(index.column() == F_NAME) {
@ -341,7 +339,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
has_pause = true;
}
}
if(!previewProgram.isEmpty() && BTSession->isFilePreviewPossible(hash) && !has_preview) {
if(BTSession->isFilePreviewPossible(hash) && !has_preview) {
myFinishedListMenu.addAction(actionPreview_file);
has_preview = true;
}