diff options
-rw-r--r-- | src/livenodeengine.cpp | 7 | ||||
-rw-r--r-- | src/livenodeengine.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/livenodeengine.cpp b/src/livenodeengine.cpp index d28fd05..fd146c8 100644 --- a/src/livenodeengine.cpp +++ b/src/livenodeengine.cpp @@ -87,7 +87,7 @@ const char OVERLAY_PATH_SEPARATOR = '-'; * With this option enabled, updates can be received even if workspace * is read only. Updates will be stored in a writable overlay stacked * over the original workspace with the help of - * QQmlAbstractUrlInterceptor. Implies \l AllowUpdates. + * QQmlAbstractUrlInterceptor. Requires \l AllowUpdates. * * \sa {QmlLive Runtime} */ @@ -530,6 +530,11 @@ void LiveNodeEngine::setWorkspace(const QString &path, WorkspaceOptions options) if (m_workspaceOptions & LoadDummyData) QmlHelper::loadDummyData(m_qmlEngine, m_workspace.absolutePath()); + if ((m_workspaceOptions & UpdatesAsOverlay) && !(m_workspaceOptions & AllowUpdates)) { + qWarning() << "Got UpdatesAsOverlay without AllowUpdates. Enabling AllowUpdates."; + m_workspaceOptions |= AllowUpdates; + } + if (m_workspaceOptions & UpdatesAsOverlay) initOverlay(); diff --git a/src/livenodeengine.h b/src/livenodeengine.h index 0d9e0ef..ce8a56f 100644 --- a/src/livenodeengine.h +++ b/src/livenodeengine.h @@ -49,7 +49,7 @@ public: NoWorkspaceOption = 0x0, LoadDummyData = 0x1, AllowUpdates = 0x2, - UpdatesAsOverlay = 0x4 | AllowUpdates + UpdatesAsOverlay = 0x4 }; Q_DECLARE_FLAGS(WorkspaceOptions, WorkspaceOption) #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) |