101 void PartDownloader::modifyDestination (QString& dest) const |
101 void PartDownloader::modifyDestination (QString& dest) const |
102 { |
102 { |
103 dest = dest.simplified(); |
103 dest = dest.simplified(); |
104 |
104 |
105 // If the user doesn't want us to guess, stop right here. |
105 // If the user doesn't want us to guess, stop right here. |
106 if (not Config->guessDownloadPaths()) |
106 if (not m_config->guessDownloadPaths()) |
107 return; |
107 return; |
108 |
108 |
109 // Ensure .dat extension |
109 // Ensure .dat extension |
110 if (dest.right (4) != ".dat") |
110 if (dest.right (4) != ".dat") |
111 { |
111 { |
269 emit primaryFileDownloaded(); |
269 emit primaryFileDownloaded(); |
270 |
270 |
271 for (LDDocument* f : m_files) |
271 for (LDDocument* f : m_files) |
272 f->reloadAllSubfiles(); |
272 f->reloadAllSubfiles(); |
273 |
273 |
274 if (Config->autoCloseDownloadDialog() and not failed) |
274 if (m_config->autoCloseDownloadDialog() and not failed) |
275 { |
275 { |
276 // Close automatically if desired. |
276 // Close automatically if desired. |
277 accept(); |
277 accept(); |
278 } |
278 } |
279 else |
279 else |
321 m_primaryFile = document; |
321 m_primaryFile = document; |
322 } |
322 } |
323 |
323 |
324 QString PartDownloader::downloadPath() |
324 QString PartDownloader::downloadPath() |
325 { |
325 { |
326 QString path = Config->downloadFilePath(); |
326 QString path = m_config->downloadFilePath(); |
327 |
327 |
328 if (DIRSLASH[0] != '/') |
328 if (DIRSLASH[0] != '/') |
329 path.replace (DIRSLASH, "/"); |
329 path.replace (DIRSLASH, "/"); |
330 |
330 |
331 return path; |
331 return path; |