mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 04:42:20 +02:00
cleanups
This commit is contained in:
parent
45157a16f2
commit
bdd926f89e
5 changed files with 9 additions and 12 deletions
|
@ -513,18 +513,18 @@ bool isDomainURL(QUrl url) {
|
|||
if (!url.isValid()) {
|
||||
return false;
|
||||
}
|
||||
if (url.scheme() != HIFI_URL_SCHEME &&
|
||||
url.scheme() != "file" &&
|
||||
if (url.scheme() == HIFI_URL_SCHEME) {
|
||||
return true;
|
||||
}
|
||||
if (url.scheme() != "file" &&
|
||||
url.scheme() != "http" &&
|
||||
url.scheme() != "https") {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (url.path().endsWith(".domain.json", Qt::CaseInsensitive) ||
|
||||
url.path().endsWith(".domain.json.gz", Qt::CaseInsensitive)) {
|
||||
if (url.path().endsWith(".json", Qt::CaseInsensitive) ||
|
||||
url.path().endsWith(".json.gz", Qt::CaseInsensitive)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -6264,8 +6264,7 @@ bool Application::canAcceptURL(const QString& urlString) const {
|
|||
bool Application::acceptURL(const QString& urlString, bool defaultUpload) {
|
||||
QUrl url(urlString);
|
||||
if (isDomainURL(url)) {
|
||||
// this is a hifi URL - have the AddressManager handle it
|
||||
emit receivedHifiSchemeURL(urlString);
|
||||
// this is a URL for a domain, either hifi:// or serverless - have the AddressManager handle it
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AddressManager>().data(), "handleLookupString",
|
||||
Qt::AutoConnection, Q_ARG(const QString&, urlString));
|
||||
return true;
|
||||
|
|
|
@ -299,7 +299,6 @@ signals:
|
|||
void activeDisplayPluginChanged();
|
||||
|
||||
void uploadRequest(QString path);
|
||||
void receivedHifiSchemeURL(const QString& url);
|
||||
|
||||
public slots:
|
||||
QVector<EntityItemID> pasteEntities(float x, float y, float z);
|
||||
|
|
|
@ -45,7 +45,6 @@ AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(pare
|
|||
connect(&domainHandler, &DomainHandler::connectedToDomain, this, &AddressBarDialog::hostChanged);
|
||||
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &AddressBarDialog::hostChanged);
|
||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::setUseFeed, this, &AddressBarDialog::setUseFeed);
|
||||
connect(qApp, &Application::receivedHifiSchemeURL, this, &AddressBarDialog::receivedHifiSchemeURL);
|
||||
}
|
||||
|
||||
void AddressBarDialog::loadAddress(const QString& address, bool fromSuggestions) {
|
||||
|
|
|
@ -36,7 +36,6 @@ signals:
|
|||
void backEnabledChanged();
|
||||
void forwardEnabledChanged();
|
||||
void useFeedChanged();
|
||||
void receivedHifiSchemeURL(const QString& url);
|
||||
void hostChanged();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -1509,7 +1509,8 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
|||
}
|
||||
|
||||
if (isAdd && properties.getLocked() && !senderNode->isAllowedEditor()) {
|
||||
// if a node can't change locks, don't allow them to create an already-locked entity
|
||||
// if a node can't change locks, don't allow it to create an already-locked entity -- automatically
|
||||
// clear the locked property and allow the unlocked entity to be created.
|
||||
properties.setLocked(false);
|
||||
bumpTimestamp(properties);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue