mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[Windows only] Action 'Open Folder' in downoad manager opens folder and selects file.
This commit is contained in:
parent
e517b9ec65
commit
3d16d49aa5
@ -33,6 +33,7 @@
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
#include <QDesktopServices>
|
||||
#include <QProcess>
|
||||
|
||||
//#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()
|
||||
|
Loading…
Reference in New Issue
Block a user