| 78 | |
| 79 | |
| 80 | std::unique_ptr<QFile> DownloadUtil::openFileForWrite(const QString& fileName) |
| 81 | { |
| 82 | std::unique_ptr<QFile> file(new QFile(fileName)); |
| 83 | if (!file->open(QIODevice::WriteOnly)) { |
| 84 | |
| 85 | #ifdef DEBUG_INFO |
| 86 | qInfo() << QString("Unable to save the file %1: %2.") |
| 87 | .arg(QDir::toNativeSeparators(fileName), file->errorString()); |
| 88 | #endif |
| 89 | |
| 90 | return nullptr; |
| 91 | } |
| 92 | |
| 93 | return file; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | void DownloadUtil::startRequest(const QUrl& url) |
nothing calls this directly
no test coverage detected