mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:00:41 +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
|
// set our current root place name to the name that came back
|
||||||
const QString PLACE_NAME_KEY = "name";
|
const QString PLACE_NAME_KEY = "name";
|
||||||
QString placeName = rootMap[PLACE_NAME_KEY].toString();
|
QString placeName = rootMap[PLACE_NAME_KEY].toString();
|
||||||
|
|
||||||
if (!placeName.isEmpty()) {
|
if (!placeName.isEmpty()) {
|
||||||
if (setHost(placeName, trigger)) {
|
if (setHost(placeName, trigger)) {
|
||||||
trigger = LookupTrigger::Internal;
|
trigger = LookupTrigger::Internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_placeName = placeName;
|
||||||
} else {
|
} else {
|
||||||
if (setHost(domainIDString, trigger)) {
|
if (setHost(domainIDString, trigger)) {
|
||||||
trigger = LookupTrigger::Internal;
|
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 AddressManager::setDomainInfo(const QString& hostname, quint16 port, LookupTrigger trigger) {
|
||||||
bool hostChanged = setHost(hostname, trigger, port);
|
bool hostChanged = setHost(hostname, trigger, port);
|
||||||
|
|
||||||
|
// clear any current place information
|
||||||
_rootPlaceID = QUuid();
|
_rootPlaceID = QUuid();
|
||||||
|
_placeName.clear();
|
||||||
|
|
||||||
qCDebug(networking) << "Possible domain change required to connect to domain at" << hostname << "on" << port;
|
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 QString currentPath(bool withOrientation = true) const;
|
||||||
|
|
||||||
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
|
const QUuid& getRootPlaceID() const { return _rootPlaceID; }
|
||||||
|
const QString& getPlaceName() const { return _placeName; }
|
||||||
|
|
||||||
const QString& getHost() const { return _host; }
|
const QString& getHost() const { return _host; }
|
||||||
|
|
||||||
|
@ -141,6 +142,7 @@ private:
|
||||||
|
|
||||||
QString _host;
|
QString _host;
|
||||||
quint16 _port;
|
quint16 _port;
|
||||||
|
QString _placeName;
|
||||||
QUuid _rootPlaceID;
|
QUuid _rootPlaceID;
|
||||||
PositionGetter _positionGetter;
|
PositionGetter _positionGetter;
|
||||||
OrientationGetter _orientationGetter;
|
OrientationGetter _orientationGetter;
|
||||||
|
|
Loading…
Reference in a new issue