mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
provide a getter for the place name in AddressManager
This commit is contained in:
parent
95f7ea5609
commit
51c16739f2
2 changed files with 7 additions and 0 deletions
|
@ -295,10 +295,13 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
|
|||
// set our current root place name to the name that came back
|
||||
const QString PLACE_NAME_KEY = "name";
|
||||
QString placeName = rootMap[PLACE_NAME_KEY].toString();
|
||||
|
||||
if (!placeName.isEmpty()) {
|
||||
if (setHost(placeName, trigger)) {
|
||||
trigger = LookupTrigger::Internal;
|
||||
}
|
||||
|
||||
_placeName = placeName;
|
||||
} else {
|
||||
if (setHost(domainIDString, trigger)) {
|
||||
trigger = LookupTrigger::Internal;
|
||||
|
@ -580,7 +583,9 @@ bool AddressManager::setHost(const QString& host, LookupTrigger trigger, quint16
|
|||
bool AddressManager::setDomainInfo(const QString& hostname, quint16 port, LookupTrigger trigger) {
|
||||
bool hostChanged = setHost(hostname, trigger, port);
|
||||
|
||||
// clear any current place information
|
||||
_rootPlaceID = QUuid();
|
||||
_placeName.clear();
|
||||
|
||||
qCDebug(networking) << "Possible domain change required to connect to domain at" << hostname << "on" << port;
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
const QString currentPath(bool withOrientation = true) const;
|
||||
|
||||
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
|
||||
const QString& getPlaceName() const { return _placeName; }
|
||||
|
||||
const QString& getHost() const { return _host; }
|
||||
|
||||
|
@ -141,6 +142,7 @@ private:
|
|||
|
||||
QString _host;
|
||||
quint16 _port;
|
||||
QString _placeName;
|
||||
QUuid _rootPlaceID;
|
||||
PositionGetter _positionGetter;
|
||||
OrientationGetter _orientationGetter;
|
||||
|
|
Loading…
Reference in a new issue