mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:17:28 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into temp1
This commit is contained in:
commit
ab9be0cb41
7 changed files with 33 additions and 2 deletions
|
@ -92,11 +92,13 @@ var NotificationType = {
|
||||||
SNAPSHOT: 2,
|
SNAPSHOT: 2,
|
||||||
WINDOW_RESIZE: 3,
|
WINDOW_RESIZE: 3,
|
||||||
LOD_WARNING: 4,
|
LOD_WARNING: 4,
|
||||||
|
CONNECTION_REFUSED: 5,
|
||||||
properties: [
|
properties: [
|
||||||
{ text: "Mute Toggle" },
|
{ text: "Mute Toggle" },
|
||||||
{ text: "Snapshot" },
|
{ text: "Snapshot" },
|
||||||
{ text: "Window Resize" },
|
{ text: "Window Resize" },
|
||||||
{ text: "Level of Detail" }
|
{ text: "Level of Detail" },
|
||||||
|
{ text: "Connection Refused" }
|
||||||
],
|
],
|
||||||
getTypeFromMenuItem: function(menuItemName) {
|
getTypeFromMenuItem: function(menuItemName) {
|
||||||
if (menuItemName.substr(menuItemName.length - NOTIFICATION_MENU_ITEM_POST.length) !== NOTIFICATION_MENU_ITEM_POST) {
|
if (menuItemName.substr(menuItemName.length - NOTIFICATION_MENU_ITEM_POST.length) !== NOTIFICATION_MENU_ITEM_POST) {
|
||||||
|
@ -501,6 +503,10 @@ function onMuteStateChanged() {
|
||||||
createNotification(muteString, NotificationType.MUTE_TOGGLE);
|
createNotification(muteString, NotificationType.MUTE_TOGGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onDomainConnectionRefused(reason) {
|
||||||
|
createNotification("Connection refused: " + reason, NotificationType.CONNECTION_REFUSED );
|
||||||
|
}
|
||||||
|
|
||||||
// handles mouse clicks on buttons
|
// handles mouse clicks on buttons
|
||||||
function mousePressEvent(event) {
|
function mousePressEvent(event) {
|
||||||
var pickRay,
|
var pickRay,
|
||||||
|
@ -608,5 +614,6 @@ Controller.keyReleaseEvent.connect(keyReleaseEvent);
|
||||||
Script.update.connect(update);
|
Script.update.connect(update);
|
||||||
Script.scriptEnding.connect(scriptEnding);
|
Script.scriptEnding.connect(scriptEnding);
|
||||||
Menu.menuItemEvent.connect(menuItemEvent);
|
Menu.menuItemEvent.connect(menuItemEvent);
|
||||||
|
Window.domainConnectionRefused.connect(onDomainConnectionRefused);
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
|
|
|
@ -297,7 +297,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_lastSendDownstreamAudioStats(usecTimestampNow()),
|
_lastSendDownstreamAudioStats(usecTimestampNow()),
|
||||||
_isVSyncOn(true),
|
_isVSyncOn(true),
|
||||||
_aboutToQuit(false),
|
_aboutToQuit(false),
|
||||||
_notifiedPacketVersionMismatchThisDomain(false)
|
_notifiedPacketVersionMismatchThisDomain(false),
|
||||||
|
_domainConnectionRefusals(QList<QString>())
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
||||||
|
@ -3278,6 +3279,14 @@ void Application::clearDomainOctreeDetails() {
|
||||||
void Application::domainChanged(const QString& domainHostname) {
|
void Application::domainChanged(const QString& domainHostname) {
|
||||||
updateWindowTitle();
|
updateWindowTitle();
|
||||||
clearDomainOctreeDetails();
|
clearDomainOctreeDetails();
|
||||||
|
_domainConnectionRefusals.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Application::domainConnectionDenied(const QString& reason) {
|
||||||
|
if (!_domainConnectionRefusals.contains(reason)) {
|
||||||
|
_domainConnectionRefusals.append(reason);
|
||||||
|
emit domainConnectionRefused(reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::connectedToDomain(const QString& hostname) {
|
void Application::connectedToDomain(const QString& hostname) {
|
||||||
|
|
|
@ -333,6 +333,8 @@ signals:
|
||||||
|
|
||||||
void svoImportRequested(const QString& url);
|
void svoImportRequested(const QString& url);
|
||||||
|
|
||||||
|
void domainConnectionRefused(const QString& reason);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void domainChanged(const QString& domainHostname);
|
void domainChanged(const QString& domainHostname);
|
||||||
void updateWindowTitle();
|
void updateWindowTitle();
|
||||||
|
@ -383,6 +385,8 @@ public slots:
|
||||||
|
|
||||||
void setActiveFaceTracker();
|
void setActiveFaceTracker();
|
||||||
|
|
||||||
|
void domainConnectionDenied(const QString& reason);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void clearDomainOctreeDetails();
|
void clearDomainOctreeDetails();
|
||||||
void checkFPS();
|
void checkFPS();
|
||||||
|
@ -607,6 +611,8 @@ private:
|
||||||
int _menuBarHeight;
|
int _menuBarHeight;
|
||||||
|
|
||||||
QHash<QString, AcceptURLMethod> _acceptedExtensions;
|
QHash<QString, AcceptURLMethod> _acceptedExtensions;
|
||||||
|
|
||||||
|
QList<QString> _domainConnectionRefusals;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_Application_h
|
#endif // hifi_Application_h
|
||||||
|
|
|
@ -127,6 +127,7 @@ void DatagramProcessor::processDatagrams() {
|
||||||
// and check and signal for an access token so that we can make sure they are logged in
|
// and check and signal for an access token so that we can make sure they are logged in
|
||||||
qDebug() << "The domain-server denied a connection request: " << reason;
|
qDebug() << "The domain-server denied a connection request: " << reason;
|
||||||
qDebug() << "You may need to re-log to generate a keypair so you can provide a username signature.";
|
qDebug() << "You may need to re-log to generate a keypair so you can provide a username signature.";
|
||||||
|
application->domainConnectionDenied(reason);
|
||||||
AccountManager::getInstance().checkAndSignalForAccessToken();
|
AccountManager::getInstance().checkAndSignalForAccessToken();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ WindowScriptingInterface::WindowScriptingInterface() :
|
||||||
const DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
|
const DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
|
||||||
connect(&domainHandler, &DomainHandler::hostnameChanged, this, &WindowScriptingInterface::domainChanged);
|
connect(&domainHandler, &DomainHandler::hostnameChanged, this, &WindowScriptingInterface::domainChanged);
|
||||||
connect(Application::getInstance(), &Application::svoImportRequested, this, &WindowScriptingInterface::svoImportRequested);
|
connect(Application::getInstance(), &Application::svoImportRequested, this, &WindowScriptingInterface::svoImportRequested);
|
||||||
|
connect(Application::getInstance(), &Application::domainConnectionRefused, this, &WindowScriptingInterface::domainConnectionRefused);
|
||||||
}
|
}
|
||||||
|
|
||||||
WebWindowClass* WindowScriptingInterface::doCreateWebWindow(const QString& title, const QString& url, int width, int height, bool isToolWindow) {
|
WebWindowClass* WindowScriptingInterface::doCreateWebWindow(const QString& title, const QString& url, int width, int height, bool isToolWindow) {
|
||||||
|
|
|
@ -62,6 +62,7 @@ signals:
|
||||||
void inlineButtonClicked(const QString& name);
|
void inlineButtonClicked(const QString& name);
|
||||||
void nonBlockingFormClosed();
|
void nonBlockingFormClosed();
|
||||||
void svoImportRequested(const QString& url);
|
void svoImportRequested(const QString& url);
|
||||||
|
void domainConnectionRefused(const QString& reason);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
QScriptValue showAlert(const QString& message);
|
QScriptValue showAlert(const QString& message);
|
||||||
|
|
|
@ -148,6 +148,7 @@ bool EntityTree::updateEntityWithElement(EntityItem* entity, const EntityItemPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
QString entityScriptBefore = entity->getScript();
|
||||||
uint32_t preFlags = entity->getDirtyFlags();
|
uint32_t preFlags = entity->getDirtyFlags();
|
||||||
UpdateEntityOperator theOperator(this, containingElement, entity, properties);
|
UpdateEntityOperator theOperator(this, containingElement, entity, properties);
|
||||||
recurseTreeWithOperator(&theOperator);
|
recurseTreeWithOperator(&theOperator);
|
||||||
|
@ -166,6 +167,11 @@ bool EntityTree::updateEntityWithElement(EntityItem* entity, const EntityItemPro
|
||||||
entity->clearDirtyFlags();
|
entity->clearDirtyFlags();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString entityScriptAfter = entity->getScript();
|
||||||
|
if (entityScriptBefore != entityScriptAfter) {
|
||||||
|
emitEntityScriptChanging(entity->getEntityItemID()); // the entity script has changed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this final containingElement check should eventually be removed (or wrapped in an #ifdef DEBUG).
|
// TODO: this final containingElement check should eventually be removed (or wrapped in an #ifdef DEBUG).
|
||||||
|
|
Loading…
Reference in a new issue