* @brief Saves the content of the network reply to the given path under the given name. */
| 254 | * @brief Saves the content of the network reply to the given path under the given name. |
| 255 | */ |
| 256 | bool DatasetHandler::saveToDisk(const QString& filename, QIODevice* data) { |
| 257 | QFile file(filename); |
| 258 | if (!file.open(QIODevice::WriteOnly)) { |
| 259 | Q_EMIT error(i18n("Couldn't open the file %1 for writing.\n%2", filename, file.errorString())); |
| 260 | return false; |
| 261 | } |
| 262 | |
| 263 | file.write(data->readAll()); |
| 264 | file.close(); |
| 265 | |
| 266 | return true; |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * @brief Processes the downloaded dataset with the help of the already configured filter. |