Changed "" to QString()

This commit is contained in:
NissimHadar 2018-02-06 11:01:50 -08:00
parent cf87052b7f
commit faec9a62b6
4 changed files with 5 additions and 5 deletions

View file

@ -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(""));

View file

@ -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

View file

@ -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));

View file

@ -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