From faec9a62b6320a5ad05c1cb660871ed9881ff20e Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 6 Feb 2018 11:01:50 -0800 Subject: [PATCH] Changed "" to QString() --- interface/src/Application.h | 2 +- interface/src/scripting/WindowScriptingInterface.h | 4 ++-- interface/src/ui/Snapshot.cpp | 2 +- interface/src/ui/Snapshot.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index 471f3103b8..33f784a07f 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -267,7 +267,7 @@ public: float getGameLoopRate() const { return _gameLoopCounter.rate(); } // Note that takeSnapshot has a default value, as this method is used internally. - void takeSnapshot(bool notify, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = ""); + void takeSnapshot(bool notify, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString()); void takeSecondaryCameraSnapshot(const QString& filename); void shareSnapshot(const QString& filename, const QUrl& href = QUrl("")); diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 41310c45fd..b38d27aac5 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -357,13 +357,13 @@ public slots: * var aspect = 1920 / 1080; * Window.takeSnapshot(notify, animated, aspect); */ - void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = ""); + void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString()); /**jsdoc * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API. * @function Window.takeSecondaryCameraSnapshot */ - void takeSecondaryCameraSnapshot(const QString& filename = ""); + void takeSecondaryCameraSnapshot(const QString& filename = QString()); /**jsdoc * Emit a {@link Window.connectionAdded|connectionAdded} or a {@link Window.connectionError|connectionError} signal that diff --git a/interface/src/ui/Snapshot.cpp b/interface/src/ui/Snapshot.cpp index c1e077a980..9b3089d78d 100644 --- a/interface/src/ui/Snapshot.cpp +++ b/interface/src/ui/Snapshot.cpp @@ -108,7 +108,7 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary, const QSt // 'jpg" is appended, as the image is saved in jpg format. This is the case for all snapshots // (see definition of FILENAME_PATH_FORMAT) QString filename; - if (userSelectedFilename != "") { + if (!userSelectedFilename.isNull()) { filename = userSelectedFilename + ".jpg"; } else { filename = FILENAME_PATH_FORMAT.arg(username, now.toString(DATETIME_FORMAT)); diff --git a/interface/src/ui/Snapshot.h b/interface/src/ui/Snapshot.h index edbfe5d272..62d3ed3db8 100644 --- a/interface/src/ui/Snapshot.h +++ b/interface/src/ui/Snapshot.h @@ -51,7 +51,7 @@ public slots: Q_INVOKABLE QString getSnapshotsLocation(); Q_INVOKABLE void setSnapshotsLocation(const QString& location); private: - static QFile* savedFileForSnapshot(QImage & image, bool isTemporary, const QString& userSelectedFilename = ""); + static QFile* savedFileForSnapshot(QImage & image, bool isTemporary, const QString& userSelectedFilename = QString()); }; #endif // hifi_Snapshot_h