mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
Fix QML debug info: print last QML loaded file instead of Desktop.qml
This commit is contained in:
parent
d64a6ecda7
commit
01699e26a5
2 changed files with 7 additions and 3 deletions
|
@ -658,10 +658,8 @@ void OffscreenUi::createDesktop(const QUrl& url) {
|
|||
|
||||
#ifdef DEBUG
|
||||
getSurfaceContext()->setContextProperty("DebugQML", QVariant(true));
|
||||
getSurfaceContext()->setContextProperty("DebugQMLFile", QVariant(url.toString()));
|
||||
#else
|
||||
#else
|
||||
getSurfaceContext()->setContextProperty("DebugQML", QVariant(false));
|
||||
getSurfaceContext()->setContextProperty("DebugQMLFile", QVariant(""));
|
||||
#endif
|
||||
|
||||
load(url, [=](QQmlContext* context, QObject* newObject) {
|
||||
|
|
|
@ -909,6 +909,12 @@ void OffscreenQmlSurface::loadInternal(const QUrl& qmlSource, bool createNewCont
|
|||
finalQmlSource = _qmlContext->resolvedUrl(qmlSource);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
getSurfaceContext()->setContextProperty("DebugQMLFile", QVariant(finalQmlSource.toString()));
|
||||
#else
|
||||
getSurfaceContext()->setContextProperty("DebugQMLFile", QVariant(""));
|
||||
#endif
|
||||
|
||||
auto targetContext = contextForUrl(finalQmlSource, parent, createNewContext);
|
||||
auto qmlComponent = new QQmlComponent(_qmlContext->engine(), finalQmlSource, QQmlComponent::PreferSynchronous);
|
||||
if (qmlComponent->isLoading()) {
|
||||
|
|
Loading…
Reference in a new issue