MCPcopy Create free account
hub / github.com/KDE/labplot / saveToDisk

Method saveToDisk

src/backend/datasources/DatasetHandler.cpp:256–267  ·  view source on GitHub ↗

* @brief Saves the content of the network reply to the given path under the given name. */

Source from the content-addressed store, hash-verified

254 * @brief Saves the content of the network reply to the given path under the given name.
255 */
256bool 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.

Callers

nothing calls this directly

Calls 3

openMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected