printing: add set_bundled_templates_as_read_only()

Add the function set_bundled_templates_as_read_only()
in templatelayout.cpp/h. The function is used to
mark the bundled template files as read-only in
the user folder. It is called in mainwindow.cpp,
after the files are copied from the bundle.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-11-23 01:59:26 +02:00
parent 6895c0eca5
commit 9209382c18
3 changed files with 26 additions and 0 deletions

View file

@ -258,6 +258,7 @@ MainWindow::MainWindow() : QMainWindow(),
#ifndef NO_PRINTING
// copy the bundled print templates to the user path; no overwriting occurs!
copyPath(getPrintingTemplatePathBundle(), getPrintingTemplatePathUser());
set_bundled_templates_as_read_only();
find_all_templates();
#endif