From 0f7668f6cca05f0dae33b94b9178aa4a5e328edc Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 7 Jun 2017 20:35:33 -0400 Subject: Add a new backend function to LUtils for opening a QSettings file. This function is user-permissions-aware and prevents a process launched with sudo from overwriting the file/permissions on a settings file. Instead, the root user will get its own [settings file]_root.conf which is a copy of the user file (as needed). --- src-qt5/core/libLumina/LUtils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src-qt5/core/libLumina/LUtils.h') diff --git a/src-qt5/core/libLumina/LUtils.h b/src-qt5/core/libLumina/LUtils.h index 459fca60..4ad05ca1 100644 --- a/src-qt5/core/libLumina/LUtils.h +++ b/src-qt5/core/libLumina/LUtils.h @@ -25,6 +25,7 @@ #include #include #include +#include class LUtils{ public: @@ -46,6 +47,9 @@ public: return isValidBinary(bins); //overload for a "junk" binary variable input } + //Open the right settings file (user/permissions aware) + static QSettings* openSettings(QString org, QString name, QObject *parent = 0); + //Return all the dirs on the system which contain .desktop files static QStringList systemApplicationDirs(); -- cgit