From aba6924dc7b9c844da3586776478763d62b43fc8 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 7 Jul 2016 13:33:36 -0700 Subject: [PATCH] Fix MyAvatar name and url accessors to JS. Q_INVOKABLE does not support returning references. MyAvatar.getFullAvatarURLFromPreferences() now returns a QUrl instead of a reference. MyAvatar.getFullAvatarModelName() now returns a QString instead of reference. This should fix the JS API for these methods, they will now receive a JS string instead of undefined. --- interface/src/avatar/MyAvatar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 96fa999de5..a21922f1b1 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -212,8 +212,8 @@ public: virtual void clearJointsData() override; Q_INVOKABLE void useFullAvatarURL(const QUrl& fullAvatarURL, const QString& modelName = QString()); - Q_INVOKABLE const QUrl& getFullAvatarURLFromPreferences() const { return _fullAvatarURLFromPreferences; } - Q_INVOKABLE const QString& getFullAvatarModelName() const { return _fullAvatarModelName; } + Q_INVOKABLE QUrl getFullAvatarURLFromPreferences() const { return _fullAvatarURLFromPreferences; } + Q_INVOKABLE QString getFullAvatarModelName() const { return _fullAvatarModelName; } void resetFullAvatarURL();