History

Merge branch 'master' into destroy

Sam Gondelman committed 8 years ago

Commit 2edefe32 parents 3c7f1a0 00a8b7354 files · +687 −388Browse files

Showing the changes to interface/src/Application.cpp (1 of 54 files). Show all

Unified · Split

interface/src/Application.cpp+4−3
@@ -6627,11 +6627,12 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 6626 unmodified lines
66276627 scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter,
66286628 LocationScriptingInterface::locationSetter);
66296629
6630+ bool clientScript = scriptEngine->isClientScript();
6631+ scriptEngine->registerFunction("OverlayWindow", clientScript ? QmlWindowClass::constructor : QmlWindowClass::restricted_constructor);
66306632 #if !defined(Q_OS_ANDROID)
6631− scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor);
6633+ scriptEngine->registerFunction("OverlayWebWindow", clientScript ? QmlWebWindowClass::constructor : QmlWebWindowClass::restricted_constructor);
66326634 #endif
6633− scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor);
6634− scriptEngine->registerFunction("QmlFragment", QmlFragmentClass::constructor);
6635+ scriptEngine->registerFunction("QmlFragment", clientScript ? QmlFragmentClass::constructor : QmlFragmentClass::restricted_constructor);
66356636
66366637 scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance());
66376638 scriptEngine->registerGlobalObject("DesktopPreviewProvider", DependencyManager::get<DesktopPreviewProvider>().data());