Merge pull request #12288 from ctrlaltdavid/21729

Add location.domainID as a synonym for location.domainId
This commit is contained in:
Brad Hefta-Gaub 2018-01-31 13:50:48 -08:00 committed by GitHub
commit f5614618b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 15 deletions

View file

@ -453,7 +453,7 @@ void EntityServer::domainSettingsRequestFailed() {
void EntityServer::startDynamicDomainVerification() {
qCDebug(entities) << "Starting Dynamic Domain Verification...";
QString thisDomainID = DependencyManager::get<AddressManager>()->getDomainId().remove(QRegExp("\\{|\\}"));
QString thisDomainID = DependencyManager::get<AddressManager>()->getDomainID().remove(QRegExp("\\{|\\}"));
EntityTreePointer tree = std::static_pointer_cast<EntityTree>(_tree);
QHash<QString, EntityItemID> localMap(tree->getEntityCertificateIDMap());

View file

@ -776,7 +776,7 @@ void AddressManager::copyPath() {
QApplication::clipboard()->setText(currentPath());
}
QString AddressManager::getDomainId() const {
QString AddressManager::getDomainID() const {
return DependencyManager::get<NodeList>()->getDomainHandler().getUUID().toString();
}

View file

@ -35,9 +35,11 @@ const QString GET_PLACE = "/api/v1/places/%1";
* The location API provides facilities related to your current location in the metaverse.
*
* @namespace location
* @property {Uuid} domainId - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid|Uuid.NULL} if you're not
* @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid|Uuid.NULL} if you're not
* connected to the domain.
* <em>Read-only.</em>
* @property {Uuid} domainId - Synonym for <code>domainId</code>. <em>Read-only.</em> <strong>Deprecated:</strong> This property
* is deprecated and will soon be removed.
* @property {string} hostname - The name of the domain for your current metaverse address (e.g., <code>"AvatarIsland"</code>,
* <code>localhost</code>, or an IP address).
* <em>Read-only.</em>
@ -66,7 +68,8 @@ class AddressManager : public QObject, public Dependency {
Q_PROPERTY(QString hostname READ getHost)
Q_PROPERTY(QString pathname READ currentPath)
Q_PROPERTY(QString placename READ getPlaceName)
Q_PROPERTY(QString domainId READ getDomainId)
Q_PROPERTY(QString domainID READ getDomainID)
Q_PROPERTY(QString domainId READ getDomainID)
public:
/**jsdoc
@ -164,7 +167,7 @@ public:
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
const QString& getPlaceName() const { return _shareablePlaceName.isEmpty() ? _placeName : _shareablePlaceName; }
QString getDomainId() const;
QString getDomainID() const;
const QString& getHost() const { return _host; }

View file

@ -493,7 +493,7 @@ function populateNearbyUserList(selectData, oldAudioData) {
data.push(avatarPalDatum);
print('PAL data:', JSON.stringify(avatarPalDatum));
});
getConnectionData(false, location.domainId); // Even admins don't get relationship data in requestUsernameFromID (which is still needed for admin status, which comes from domain).
getConnectionData(false, location.domainID); // Even admins don't get relationship data in requestUsernameFromID (which is still needed for admin status, which comes from domain).
conserveResources = Object.keys(avatarsOfInterest).length > 20;
sendToQml({ method: 'nearbyUsers', params: data });
if (selectData) {

View file

@ -337,7 +337,7 @@ function fillImageDataFromPrevious() {
containsGif: previousAnimatedSnapPath !== "",
processingGif: false,
shouldUpload: false,
canBlast: location.domainId === Settings.getValue("previousSnapshotDomainID"),
canBlast: location.domainID === Settings.getValue("previousSnapshotDomainID"),
isLoggedIn: isLoggedIn
};
imageData = [];
@ -416,7 +416,7 @@ function snapshotUploaded(isError, reply) {
}
isUploadingPrintableStill = false;
}
var href, domainId;
var href, domainID;
function takeSnapshot() {
tablet.emitScriptEvent(JSON.stringify({
type: "snapshot",
@ -443,11 +443,11 @@ function takeSnapshot() {
MyAvatar.setClearOverlayWhenMoving(false);
// We will record snapshots based on the starting location. That could change, e.g., when recording a .gif.
// Even the domainId could change (e.g., if the user falls into a teleporter while recording).
// Even the domainID could change (e.g., if the user falls into a teleporter while recording).
href = location.href;
Settings.setValue("previousSnapshotHref", href);
domainId = location.domainId;
Settings.setValue("previousSnapshotDomainID", domainId);
domainID = location.domainID;
Settings.setValue("previousSnapshotDomainID", domainID);
maybeDeleteSnapshotStories();
@ -548,7 +548,7 @@ function stillSnapshotTaken(pathStillSnapshot, notify) {
}
HMD.openTablet();
isDomainOpen(domainId, function (canShare) {
isDomainOpen(domainID, function (canShare) {
snapshotOptions = {
containsGif: false,
processingGif: false,
@ -594,7 +594,7 @@ function processingGifStarted(pathStillSnapshot) {
}
HMD.openTablet();
isDomainOpen(domainId, function (canShare) {
isDomainOpen(domainID, function (canShare) {
snapshotOptions = {
containsGif: true,
processingGif: true,
@ -622,13 +622,13 @@ function processingGifCompleted(pathAnimatedSnapshot) {
Settings.setValue("previousAnimatedSnapPath", pathAnimatedSnapshot);
isDomainOpen(domainId, function (canShare) {
isDomainOpen(domainID, function (canShare) {
snapshotOptions = {
containsGif: true,
processingGif: false,
canShare: canShare,
isLoggedIn: isLoggedIn,
canBlast: location.domainId === Settings.getValue("previousSnapshotDomainID"),
canBlast: location.domainID === Settings.getValue("previousSnapshotDomainID"),
};
imageData = [{ localPath: pathAnimatedSnapshot, href: href }];
tablet.emitScriptEvent(JSON.stringify({