* Apply suggestions from code review

Fix JSDoc comments and debug messages.
This commit is contained in:
Phil Palmer 2021-01-04 00:57:17 -05:00
parent 646a5798e6
commit 5d1bd5cc19
2 changed files with 6 additions and 15 deletions

View file

@ -5242,7 +5242,7 @@ bool MyAvatar::getIsInSittingState() const {
// Deprecated, will be removed.
MyAvatar::SitStandModelType MyAvatar::getUserRecenterModel() const {
qCDebug(interfaceapp)
<< "MyAvatar.getUserRecenterModel is deprecated and will be removed. If you need it, please contact the developers.";
<< "MyAvatar.getUserRecenterModel is deprecated and will be removed.";
// The legacy SitStandModelType corresponding to each AllowAvatarLeaningPreference.
std::array<SitStandModelType, static_cast<uint>(AllowAvatarLeaningPreference::Count)> legacySitStandModels = {
@ -5340,7 +5340,7 @@ void MyAvatar::setIsInSittingState(bool isSitting) {
// Deprecated, will be removed.
void MyAvatar::setUserRecenterModel(MyAvatar::SitStandModelType modelName) {
qCDebug(interfaceapp)
<< "MyAvatar.setUserRecenterModel is deprecated and will be removed. If you need it, please contact the developers.";
<< "MyAvatar.setUserRecenterModel is deprecated and will be removed.";
switch (modelName) {
case SitStandModelType::ForceSit:
@ -5375,8 +5375,7 @@ void MyAvatar::setAllowAvatarStandingPreference(const MyAvatar::AllowAvatarStand
// Deprecated, will be removed.
void MyAvatar::setIsSitStandStateLocked(bool isLocked) {
Q_UNUSED(isLocked);
qCDebug(interfaceapp) << "MyAvatar.setIsSitStandStateLocked is deprecated and will be removed. If you need it, please "
"contact the developers. See also: MyAvatar.setUserRecenterModel.";
qCDebug(interfaceapp) << "MyAvatar.setIsSitStandStateLocked is deprecated and will be removed.";
}
// Set the user preference of when the avatar may lean.

View file

@ -291,8 +291,8 @@ class MyAvatar : public Avatar {
* sitting / standing state, which is updated when the user next sits or stands.
* @property {boolean} isSitStandStateLocked - <code>true</code> to lock the avatar sitting/standing state, i.e., use this
* to disable automatically changing state.
* <p class="important">Deprecated: This property is deprecated and will be removed. If you need it, please contact
* the developers. See also: <code>getUserRecenterModel</code> and <code>setUserRecenterModel</code>.</p>
* <p class="important">Deprecated: This property is deprecated and will be removed.
* See also: <code>getUserRecenterModel</code> and <code>setUserRecenterModel</code>.</p>
* @property {boolean} allowTeleporting - <code>true</code> if teleporting is enabled in the Interface settings,
* <code>false</code> if it isn't. <em>Read-only.</em>
*
@ -414,16 +414,8 @@ class MyAvatar : public Avatar {
Q_PROPERTY(float walkBackwardSpeed READ getWalkBackwardSpeed WRITE setWalkBackwardSpeed NOTIFY walkBackwardSpeedChanged);
Q_PROPERTY(float sprintSpeed READ getSprintSpeed WRITE setSprintSpeed NOTIFY sprintSpeedChanged);
Q_PROPERTY(bool isInSittingState READ getIsInSittingState WRITE setIsInSittingState);
Q_PROPERTY(MyAvatar::SitStandModelType userRecenterModel READ getUserRecenterModel WRITE setUserRecenterModel); // Deprecated
/**jsdoc
* @deprecated This property is deprecated and will be removed. If you need it, please contact the developers.
* See also: {@link MyAvatar.getUserRecenterModel|getUserRecenterModel} and
* {@link MyAvatar.setUserRecenterModel|setUserRecenterModel}.
*/
Q_PROPERTY(bool isSitStandStateLocked READ getIsSitStandStateLocked WRITE setIsSitStandStateLocked);
Q_PROPERTY(bool isSitStandStateLocked READ getIsSitStandStateLocked WRITE setIsSitStandStateLocked); // Deprecated
Q_PROPERTY(bool allowTeleporting READ getAllowTeleporting)
const QString DOMINANT_LEFT_HAND = "left";