History

add keyboard for html content

danteruiz committed 7 years ago

Commit e6a63a91 parent 29d55742 files · +4 −2Browse files

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

Unified · Split

interface/src/Application.cpp+3−1
@@ -2342,6 +2342,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 2341 unmodified lines
23422342 } else {
23432343 QObject::connect(webSurface.data(), &hifi::qml::OffscreenSurface::rootContextCreated, rootItemLoadedFunctor);
23442344 }
2345+ auto surfaceContext = webSurface->getSurfaceContext();
2346+ surfaceContext->setContextProperty("KeyboardScriptingInterface", DependencyManager::get<KeyboardScriptingInterface>().data());
23452347 } else {
23462348 // FIXME: the tablet should use the OffscreenQmlSurfaceCache
23472349 webSurface = QSharedPointer<OffscreenQmlSurface>(new OffscreenQmlSurface(), [](OffscreenQmlSurface* webSurface) {
@@ -3278,6 +3280,7 @@ void Application::setupQmlSurface(QQmlContext* surfaceContext, bool setAdditiona · 930 unmodified lines
32783280 surfaceContext->setContextProperty("MyAvatar", DependencyManager::get<AvatarManager>()->getMyAvatar().get());
32793281 surfaceContext->setContextProperty("Entities", DependencyManager::get<EntityScriptingInterface>().data());
32803282 surfaceContext->setContextProperty("Snapshot", DependencyManager::get<Snapshot>().data());
3283+ surfaceContext->setContextProperty("KeyboardScriptingInterface", DependencyManager::get<KeyboardScriptingInterface>().data());
32813284
32823285 if (setAdditionalContextProperties) {
32833286 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
@@ -3288,7 +3291,6 @@ void Application::setupQmlSurface(QQmlContext* surfaceContext, bool setAdditiona · 4 unmodified lines
32883291
32893292 surfaceContext->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
32903293 surfaceContext->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance());
3291− surfaceContext->setContextProperty("KeyboardScriptingInterface", DependencyManager::get<KeyboardScriptingInterface>().data());
32923294
32933295 surfaceContext->setContextProperty("Account", AccountServicesScriptingInterface::getInstance()); // DEPRECATED - TO BE REMOVED
32943296 surfaceContext->setContextProperty("GlobalServices", AccountServicesScriptingInterface::getInstance()); // DEPRECATED - TO BE REMOVED