QString Snapshot::saveSnapshot() { QFile* snapshotFile = savedFileForSnapshot(false); // we don't need the snapshot file, so close it, grab its filename and delete it snapshotFile->close(); QString snapshotPath = QFileInfo(*snapshotFile).absoluteFilePath(); delete snapshotFile; return snapshotPath; }
QTemporaryFile* Snapshot::saveTempSnapshot(QImage image) { // return whatever we get back from saved file for snapshot return static_cast<QTemporaryFile*>(savedFileForSnapshot(image, true)); }