Merge pull request #3319 from Atlante45/sitting_points_not_disappearing_when_switching_to_fake_domain

fix sitting points on domain switch
This commit is contained in:
Brad Hefta-Gaub 2014-08-25 18:42:19 -07:00
commit a51cace167
3 changed files with 7 additions and 2 deletions

View file

@ -269,8 +269,7 @@ function update(deltaTime){
}
var locationChanged = false;
if (location.hostname != oldHost) {
print("Changed domain");
if (location.hostname != oldHost || !location.isConnected) {
for (model in models) {
removeIndicators(models[model]);
}

View file

@ -20,6 +20,10 @@ LocationScriptingInterface* LocationScriptingInterface::getInstance() {
return &sharedInstance;
}
bool LocationScriptingInterface::isConnected() {
return NodeList::getInstance()->getDomainHandler().isConnected();
}
QString LocationScriptingInterface::getHref() {
return getProtocol() + "//" + getHostname() + getPathname();
}

View file

@ -22,6 +22,7 @@
class LocationScriptingInterface : public QObject {
Q_OBJECT
Q_PROPERTY(bool isConnected READ isConnected)
Q_PROPERTY(QString href READ getHref)
Q_PROPERTY(QString protocol READ getProtocol)
Q_PROPERTY(QString hostname READ getHostname)
@ -30,6 +31,7 @@ class LocationScriptingInterface : public QObject {
public:
static LocationScriptingInterface* getInstance();
bool isConnected();
QString getHref();
QString getProtocol() { return CUSTOM_URL_SCHEME; };
QString getPathname();