diff libgui/src/documentation.cc @ 26729:c66f509d9f5c stable

Mark qt documentation as readonly (bug #53841). * libgui/src/documentation.cc: Set qt readonly flag on qt documentation.
author John Donoghue
date Tue, 12 Feb 2019 15:31:52 -0500
parents 8d2e8d5d617d
children 3d0f687e4a21
line wrap: on
line diff
--- a/libgui/src/documentation.cc	Tue Feb 12 22:44:45 2019 +0100
+++ b/libgui/src/documentation.cc	Tue Feb 12 15:31:52 2019 -0500
@@ -77,6 +77,11 @@
     // of the original collection and load the help data
     m_help_engine = new QHelpEngine (collection, this);
 
+    // Mark help as readonly to avoid error if collection file is stored in a
+    // readonly location
+    m_help_engine->setProperty ("_q_readonly",
+                                QVariant::fromValue<bool> (true));
+
     QString tmpdir = QDir::tempPath();
     m_collection
       = QString::fromStdString (sys::tempnam (tmpdir.toStdString (),