History

Merge pull request #13748 from ElderOrb/FB16831

FB16831 qml-related warnings in log

John Conklin II committed 8 years ago

Commit 032e67f2 parents 3623590 44787335 files · +28 −4Browse files

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

Unified · Split

interface/src/Application.cpp+9−0
@@ -2924,6 +2924,15 @@ void Application::initializeUi() { · 2923 unmodified lines
29242924
29252925 // Pre-create a couple of Web3D overlays to speed up tablet UI
29262926 auto offscreenSurfaceCache = DependencyManager::get<OffscreenQmlSurfaceCache>();
2927+ offscreenSurfaceCache->setOnRootContextCreated([&](const QString& rootObject, QQmlContext* surfaceContext) {
2928+ if (rootObject == TabletScriptingInterface::QML) {
2929+ // in Qt 5.10.0 there is already an "Audio" object in the QML context
2930+ // though I failed to find it (from QtMultimedia??). So.. let it be "AudioScriptingInterface"
2931+ surfaceContext->setContextProperty("AudioScriptingInterface", DependencyManager::get<AudioScriptingInterface>().data());
2932+ surfaceContext->setContextProperty("Account", AccountServicesScriptingInterface::getInstance()); // DEPRECATED - TO BE REMOVED
2933+ }
2934+ });
2935+
29272936 offscreenSurfaceCache->reserve(TabletScriptingInterface::QML, 1);
29282937 offscreenSurfaceCache->reserve(Web3DOverlay::QML, 2);
29292938