* @brief Opens the downloaded file using the system's default handler. * * @note If the downloaded file is not found, an error dialog is shown. */
| 243 | * @note If the downloaded file is not found, an error dialog is shown. |
| 244 | */ |
| 245 | void Downloader::openDownload() |
| 246 | { |
| 247 | if (!m_fileName.isEmpty()) |
| 248 | QDesktopServices::openUrl(QUrl::fromLocalFile(m_downloadDir.filePath(m_fileName))); |
| 249 | else |
| 250 | QMessageBox::critical( |
| 251 | this, tr("Error"), tr("Cannot find downloaded update!"), QMessageBox::Close); |
| 252 | } |
| 253 | |
| 254 | /** |
| 255 | * @brief Instructs the OS to open the downloaded file as an installer. |