aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kampas <martin.kampas@jolla.com>2016-09-14 10:47:44 +0200
committerJuergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>2016-10-04 18:11:09 +0000
commit5cc4ce743c461f8763f2328d3020acf01eac0974 (patch)
tree5383b9ecdb9cf1c6b8eb9cf3e82dfa9df73749a5
parentb312be5ba49502c1c7747f4b36b132120eb5fd0e (diff)
LiveNodeEngine: Fix UpdatesAsOverlay flag handling
Code polishing on 88c9de5 led to the result that UpdatesAsOverlay could not be really disabled. Change-Id: Id338cafe48a8bb3d3d0aeef8e0e08c5287286aaa Reviewed-by: Juergen Bocklage-Ryannel <juergen.bocklage-ryannel@pelagicore.com>
-rw-r--r--src/livenodeengine.cpp7
-rw-r--r--src/livenodeengine.h2
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)