Skip to content

Commit

Permalink
Merge pull request QupZilla#510 from srazi/master
Browse files Browse the repository at this point in the history
Select downloaded file when opening its folder [Windows only]
  • Loading branch information
nowrep committed Aug 18, 2012
2 parents e517b9e + 3d16d49 commit 1ff2f97
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/downloads/downloaditem.cpp
Expand Up @@ -33,6 +33,7 @@
#include <QFileInfo>
#include <QMessageBox>
#include <QDesktopServices>
#include <QProcess>

//#define DOWNMANAGER_DEBUG

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1ff2f97

Please sign in to comment.