Merge branch 'master' of https://github.com/highfidelity/hifi into priority

This commit is contained in:
Andrzej Kapolka 2014-05-14 10:29:58 -07:00
commit 3db3154a5b
2 changed files with 7 additions and 2 deletions

View file

@ -59,7 +59,7 @@ void OAuthWebViewHandler::displayWebviewForAuthorizationURL(const QUrl& authoriz
_activeWebView = new QWebView;
// keep the window on top and delete it when it closes
_activeWebView->setWindowFlags(Qt::WindowStaysOnTopHint);
_activeWebView->setWindowFlags(Qt::Sheet | Qt::WindowStaysOnTopHint);
_activeWebView->setAttribute(Qt::WA_DeleteOnClose);
qDebug() << "Displaying QWebView for OAuth authorization at" << authorizationURL.toString();

View file

@ -49,7 +49,12 @@ static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* eng
static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine){
qDebug() << "script:print()<<" << context->argument(0).toString();
engine->evaluate("Script.print('" + context->argument(0).toString() + "')");
QString message = context->argument(0).toString()
.replace("\\", "\\\\")
.replace("\n", "\\n")
.replace("\r", "\\r")
.replace("'", "\\'");
engine->evaluate("Script.print('" + message + "')");
return QScriptValue();
}