diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index fcfe1ff582..7a2d5f4f99 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -1169,6 +1169,7 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url bool DomainServer::handleHTTPSRequest(HTTPSConnection* connection, const QUrl &url) { const QString URI_OAUTH = "/oauth"; + qDebug() << "HTTPS request received at" << url.toString(); if (url.path() == URI_OAUTH) { QUrlQuery codeURLQuery(url); diff --git a/examples/concertCamera.js b/examples/concertCamera.js index 96218e697f..03908d0b57 100644 --- a/examples/concertCamera.js +++ b/examples/concertCamera.js @@ -16,8 +16,8 @@ var avatarPosition; var cameraNumber = 0; var freeCamera = false; -var cameraLocations = [ {x: 7972.2, y: 241.6, z: 7304.1}, {x: 7973.0, y: 241.6, z: 7304.1}, {x: 7975.5, y: 241.6, z: 7304.1}, {x: 7972.3, y: 241.6, z: 7303.3}, {x: 7971.4, y: 241.6, z: 7304.3}, {x: 7973.5, y: 240.6, z: 7302.5} ]; -var cameraLookAts = [ {x: 7971.1, y: 241.6, z: 7304.1}, {x: 7972.1, y: 241.6, z: 7304.1}, {x: 7972.1, y: 241.6, z: 7304.1}, {x: 7972.1, y: 241.6, z: 7304.1}, {x: 7972.1, y: 241.6, z: 7304.1}, {x: 7972.1, y: 241., z: 7304.1} ]; +var cameraLocations = [ {x: 7971.9, y: 241.3, z: 7304.1}, {x: 7973.0, y: 241.3, z: 7304.1}, {x: 7975.5, y: 241.3, z: 7304.1}, {x: 7972.3, y: 241.3, z: 7303.3}, {x: 7971.0, y: 241.3, z: 7304.3}, {x: 7973.5, y: 240.7, z: 7302.5} ]; +var cameraLookAts = [ {x: 7971.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7972.1, y: 241.3, z: 7304.1}, {x: 7971.3, y: 241.3, z: 7304.2} ]; function saveCameraState() { oldMode = Camera.getMode(); diff --git a/examples/sit.js b/examples/sit.js index 57828afc52..056a65fbf1 100644 --- a/examples/sit.js +++ b/examples/sit.js @@ -164,7 +164,7 @@ function SeatIndicator(modelProperties, seatIndex) { size: this.scale, solid: true, color: { red: 0, green: 0, blue: 255 }, - alpha: 1, + alpha: 0.3, visible: true }); diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9bc08aa188..3a5db6666d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3650,8 +3650,9 @@ void Application::stopAllScripts(bool restart) { } void Application::stopScript(const QString &scriptName) { - if (_scriptEnginesHash.contains(scriptName)) { - _scriptEnginesHash.value(scriptName)->stop(); + const QString& scriptURLString = QUrl(scriptName).toString(); + if (_scriptEnginesHash.contains(scriptURLString)) { + _scriptEnginesHash.value(scriptURLString)->stop(); qDebug() << "stopping script..." << scriptName; } } diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 6269d4a8c0..9357ba2004 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -108,9 +108,9 @@ Menu::Menu() : _fastFPSAverage(ONE_SECOND_OF_FRAMES), _loginAction(NULL), _preferencesDialog(NULL), - _scriptsLocation(), _loginDialog(NULL), - _snapshotsLocation() + _snapshotsLocation(), + _scriptsLocation() { Application *appInstance = Application::getInstance(); diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 769d0398a2..9bb54efe20 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -582,8 +582,8 @@ void Avatar::initializeHair() { for (int link = 0; link < HAIR_LINKS; link++) { int vertexIndex = strand * HAIR_LINKS + link; // Clear constraints - for (int link = 0; link < HAIR_MAX_CONSTRAINTS; link++) { - _hairConstraints[vertexIndex * HAIR_MAX_CONSTRAINTS + link] = -1; + for (int link2 = 0; link2 < HAIR_MAX_CONSTRAINTS; link2++) { + _hairConstraints[vertexIndex * HAIR_MAX_CONSTRAINTS + link2] = -1; } if (vertexIndex % HAIR_LINKS == 0) { // start of strand diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 342a145953..77e8986297 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -376,7 +376,7 @@ void ApplicationOverlay::renderControllerPointers() { //then disable it. const int MAX_BUTTON_PRESS_TIME = 250 * MSECS_TO_USECS; - if (usecTimestampNow() - pressedTime[index] < MAX_BUTTON_PRESS_TIME) { + if (usecTimestampNow() < pressedTime[index] + MAX_BUTTON_PRESS_TIME) { _magActive[index] = !stateWhenPressed[index]; } } diff --git a/interface/src/ui/OAuthWebViewHandler.cpp b/interface/src/ui/OAuthWebViewHandler.cpp index 5b4431bd0f..8ec415584d 100644 --- a/interface/src/ui/OAuthWebViewHandler.cpp +++ b/interface/src/ui/OAuthWebViewHandler.cpp @@ -109,6 +109,8 @@ void OAuthWebViewHandler::displayWebviewForAuthorizationURL(const QUrl& authoriz connect(_activeWebView->page()->networkAccessManager(), &QNetworkAccessManager::sslErrors, this, &OAuthWebViewHandler::handleSSLErrors); + connect(_activeWebView->page()->networkAccessManager(), &QNetworkAccessManager::finished, + this, &OAuthWebViewHandler::handleReplyFinished); connect(_activeWebView.data(), &QWebView::loadFinished, this, &OAuthWebViewHandler::handleLoadFinished); // connect to the destroyed signal so after the web view closes we can start a timer @@ -132,6 +134,14 @@ void OAuthWebViewHandler::handleLoadFinished(bool success) { NodeList::getInstance()->setSessionUUID(QUuid(authQuery.queryItemValue(AUTH_STATE_QUERY_KEY))); _activeWebView->close(); + _activeWebView = NULL; + } +} + +void OAuthWebViewHandler::handleReplyFinished(QNetworkReply* reply) { + if (_activeWebView && reply->error() != QNetworkReply::NoError) { + qDebug() << "Error loading" << reply->url() << "-" << reply->errorString(); + _activeWebView->close(); } } @@ -148,6 +158,7 @@ void OAuthWebViewHandler::handleURLChanged(const QUrl& url) { _activeWebView->show(); } else if (url.toString() == DEFAULT_NODE_AUTH_URL.toString() + "/login") { // this is a login request - we're going to close the webview and signal the AccountManager that we need a login + qDebug() << "data-server replied with login request. Signalling that login is required to proceed with OAuth."; _activeWebView->close(); AccountManager::getInstance().checkAndSignalForAccessToken(); } diff --git a/interface/src/ui/OAuthWebViewHandler.h b/interface/src/ui/OAuthWebViewHandler.h index 8f0c01c90d..1a95f17dfd 100644 --- a/interface/src/ui/OAuthWebViewHandler.h +++ b/interface/src/ui/OAuthWebViewHandler.h @@ -31,6 +31,7 @@ public slots: private slots: void handleSSLErrors(QNetworkReply* networkReply, const QList& errorList); void handleLoadFinished(bool success); + void handleReplyFinished(QNetworkReply* reply); void handleWebViewDestroyed(QObject* destroyedObject); void handleURLChanged(const QUrl& url); private: diff --git a/interface/src/ui/RunningScriptsWidget.cpp b/interface/src/ui/RunningScriptsWidget.cpp index 136d0a2d38..8a7ebcbfd4 100644 --- a/interface/src/ui/RunningScriptsWidget.cpp +++ b/interface/src/ui/RunningScriptsWidget.cpp @@ -28,8 +28,8 @@ RunningScriptsWidget::RunningScriptsWidget(QWidget* parent) : FramelessDialog(parent, 0, POSITION_LEFT), ui(new Ui::RunningScriptsWidget), _signalMapper(this), - _scriptsModel(this), - _proxyModel(this) { + _proxyModel(this), + _scriptsModel(this) { ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose, false); diff --git a/interface/ui/preferencesDialog.ui b/interface/ui/preferencesDialog.ui index a75c2bdec2..95678bf6f8 100644 --- a/interface/ui/preferencesDialog.ui +++ b/interface/ui/preferencesDialog.ui @@ -902,7 +902,7 @@ padding: 10px;margin-top:10px - + 0 @@ -937,7 +937,7 @@ padding: 10px;margin-top:10px - + Arial diff --git a/libraries/audio/src/AudioRingBuffer.cpp b/libraries/audio/src/AudioRingBuffer.cpp index ee4027841b..a2d3715462 100644 --- a/libraries/audio/src/AudioRingBuffer.cpp +++ b/libraries/audio/src/AudioRingBuffer.cpp @@ -121,7 +121,7 @@ qint64 AudioRingBuffer::writeData(const char* data, qint64 maxSize) { // make sure we have enough bytes left for this to be the right amount of audio // otherwise we should not copy that data, and leave the buffer pointers where they are - int samplesToCopy = std::min((quint64)(maxSize / sizeof(int16_t)), (quint64)_sampleCapacity); + quint64 samplesToCopy = std::min((quint64)(maxSize / sizeof(int16_t)), (quint64)_sampleCapacity); if (_hasStarted && samplesToCopy > _sampleCapacity - samplesAvailable()) { // this read will cross the next output, so call us starved and reset the buffer diff --git a/libraries/audio/src/PositionalAudioRingBuffer.cpp b/libraries/audio/src/PositionalAudioRingBuffer.cpp index 23e258fe87..acd688bdc0 100644 --- a/libraries/audio/src/PositionalAudioRingBuffer.cpp +++ b/libraries/audio/src/PositionalAudioRingBuffer.cpp @@ -209,7 +209,7 @@ bool PositionalAudioRingBuffer::shouldBeAddedToMix() { } return false; - } else if (samplesAvailable() < samplesPerFrame) { + } else if (samplesAvailable() < (unsigned int)samplesPerFrame) { // if the buffer doesn't have a full frame of samples to take for mixing, it is starved _isStarved = true;