From 3d16d49aa519ef2946311f31606538af5dc5be9a Mon Sep 17 00:00:00 2001 From: "S. Razi Alavizadeh" Date: Sat, 18 Aug 2012 05:05:54 +0430 Subject: [PATCH] [Windows only] Action 'Open Folder' in downoad manager opens folder and selects file. --- src/lib/downloads/downloaditem.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/downloads/downloaditem.cpp b/src/lib/downloads/downloaditem.cpp index 1cb36fa35..46641d96f 100644 --- a/src/lib/downloads/downloaditem.cpp +++ b/src/lib/downloads/downloaditem.cpp @@ -33,6 +33,7 @@ #include #include #include +#include //#define DOWNMANAGER_DEBUG @@ -385,7 +386,13 @@ void DownloadItem::openFile() void DownloadItem::openFolder() { +#ifdef Q_WS_WIN + QString winFileName = m_path + m_fileName; + winFileName.replace("/","\\"); + QProcess::startDetached("explorer.exe /e,/select,\""+winFileName+"\""); +#else QDesktopServices::openUrl(QUrl::fromLocalFile(m_path)); +#endif } void DownloadItem::readyRead()