mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Merge pull request #510 from srazi/master
Select downloaded file when opening its folder [Windows only]
This commit is contained in:
commit
1ff2f975bb
@ -33,6 +33,7 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QProcess>
|
||||||
|
|
||||||
//#define DOWNMANAGER_DEBUG
|
//#define DOWNMANAGER_DEBUG
|
||||||
|
|
||||||
@ -385,7 +386,13 @@ void DownloadItem::openFile()
|
|||||||
|
|
||||||
void DownloadItem::openFolder()
|
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));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(m_path));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadItem::readyRead()
|
void DownloadItem::readyRead()
|
||||||
|
Loading…
Reference in New Issue
Block a user