diff options
| author | Frederik “Freso” S. Olesen <freso.dk@gmail.com> | 2018-08-06 13:21:08 +0200 |
|---|---|---|
| committer | Frederik “Freso” S. Olesen <freso.dk@gmail.com> | 2018-08-06 13:21:08 +0200 |
| commit | 2af99f2170a4725973673bd59bc22fe7f35df7ee (patch) | |
| tree | bfb364993827d7bb1ffe061f72de5394425a4d44 /src | |
| parent | 796224d73369e55b278aa1be1a13f357b094e49c (diff) | |
Clean up `DownloadManager::openFile`
Diffstat (limited to 'src')
| -rw-r--r-- | src/downloadmanager.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index af32ee71..6cbc6373 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -930,10 +930,9 @@ void DownloadManager::visitOnNexus(int index) void DownloadManager::openFile(int index)
{
if ((index < 0) || (index >= m_ActiveDownloads.size())) {
- reportError(tr("VisitNexus: invalid download index %1").arg(index));
+ reportError(tr("OpenFile: invalid download index %1").arg(index));
return;
}
- QString params = "/select,\"";
QDir path = QDir(m_OutputDirectory);
if (path.exists(getFileName(index))) {
params = params + QDir::toNativeSeparators(getFilePath(index)) + "\"";
@@ -941,12 +940,6 @@ void DownloadManager::openFile(int index) ::ShellExecuteW(nullptr, nullptr, L"open", ToWString(params).c_str(), nullptr, SW_SHOWNORMAL);
return;
}
- else if (path.exists(getFileName(index) + ".unfinished")) {
- params = params + QDir::toNativeSeparators(getFilePath(index)+".unfinished") + "\"";
-
- ::ShellExecuteW(nullptr, nullptr, L"open", ToWString(params).c_str(), nullptr, SW_SHOWNORMAL);
- return;
- }
::ShellExecuteW(nullptr, L"open", ToWString(QDir::toNativeSeparators(m_OutputDirectory)).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
return;
|
