Per Austin's comments.

This commit is contained in:
NissimHadar 2018-05-08 11:40:56 -07:00
parent 516b2fa68c
commit d5bb582811
3 changed files with 6 additions and 4 deletions

View file

@ -90,7 +90,7 @@ QString Snapshot::saveSnapshot(QImage image, const QString& filename, const QStr
QTemporaryFile* Snapshot::saveTempSnapshot(QImage image) { QTemporaryFile* Snapshot::saveTempSnapshot(QImage image) {
// return whatever we get back from saved file for snapshot // return whatever we get back from saved file for snapshot
return static_cast<QTemporaryFile*>(savedFileForSnapshot(image, true, QString(), QString())); return static_cast<QTemporaryFile*>(savedFileForSnapshot(image, true));
} }
QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary, const QString& userSelectedFilename, const QString& userSelectedPathname) { QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary, const QString& userSelectedFilename, const QString& userSelectedPathname) {

View file

@ -52,7 +52,10 @@ public slots:
Q_INVOKABLE QString getSnapshotsLocation(); Q_INVOKABLE QString getSnapshotsLocation();
Q_INVOKABLE void setSnapshotsLocation(const QString& location); Q_INVOKABLE void setSnapshotsLocation(const QString& location);
private: private:
static QFile* savedFileForSnapshot(QImage & image, bool isTemporary, const QString& userSelectedFilename, const QString& userSelectedPathname); static QFile* savedFileForSnapshot(QImage& image,
bool isTemporary,
const QString& userSelectedFilename = QString(),
const QString& userSelectedPathname = QString());
}; };
#endif // hifi_Snapshot_h #endif // hifi_Snapshot_h

View file

@ -99,8 +99,7 @@ void AutoTester::saveImage(int index) {
QString fullPathname = _directoryName + "/" + _filenames[index]; QString fullPathname = _directoryName + "/" + _filenames[index];
if (!image.save(fullPathname, 0, 100)) { if (!image.save(fullPathname, 0, 100)) {
QMessageBox messageBox; QMessageBox::information(0, "Test Aborted", "Failed to save image: " + _filenames[index]);
messageBox.information(0, "Test Aborted", "Failed to save image: " + _filenames[index]);
ui.progressBar->setVisible(false); ui.progressBar->setVisible(false);
return; return;
} }