mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 23:33:48 +02:00
use temporary domain name as place name on ID lookup
This commit is contained in:
parent
2b5d862263
commit
edd4f5853e
1 changed files with 10 additions and 0 deletions
|
@ -360,6 +360,7 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
|
|||
|
||||
LookupTrigger trigger = (LookupTrigger) reply.property(LOOKUP_TRIGGER_KEY).toInt();
|
||||
|
||||
|
||||
// set our current root place id to the ID that came back
|
||||
const QString PLACE_ID_KEY = "id";
|
||||
_rootPlaceID = rootMap[PLACE_ID_KEY].toUuid();
|
||||
|
@ -368,6 +369,15 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
|
|||
const QString PLACE_NAME_KEY = "name";
|
||||
QString placeName = rootMap[PLACE_NAME_KEY].toString();
|
||||
|
||||
if (placeName.isEmpty()) {
|
||||
// we didn't get a set place name, check if there is a default or temporary domain name to use
|
||||
const QString TEMPORARY_DOMAIN_NAME_KEY = "name";
|
||||
|
||||
if (domainObject.contains(TEMPORARY_DOMAIN_NAME_KEY)) {
|
||||
placeName = domainObject[TEMPORARY_DOMAIN_NAME_KEY].toString();
|
||||
}
|
||||
}
|
||||
|
||||
if (!placeName.isEmpty()) {
|
||||
if (setHost(placeName, trigger)) {
|
||||
trigger = LookupTrigger::Internal;
|
||||
|
|
Loading…
Reference in a new issue