aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LUtils.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-07 20:35:33 -0400
committerKen Moore <ken@ixsystems.com>2017-06-07 20:35:33 -0400
commit0f7668f6cca05f0dae33b94b9178aa4a5e328edc (patch)
tree357dea07f154711ab6f188978cead5cd3a63cca4 /src-qt5/core/libLumina/LUtils.h
parentDeactivate the auto-resize functionality (for now) with a comment about the F... (diff)
downloadlumina-0f7668f6cca05f0dae33b94b9178aa4a5e328edc.tar.gz
lumina-0f7668f6cca05f0dae33b94b9178aa4a5e328edc.tar.bz2
lumina-0f7668f6cca05f0dae33b94b9178aa4a5e328edc.zip
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).
Diffstat (limited to 'src-qt5/core/libLumina/LUtils.h')
-rw-r--r--src-qt5/core/libLumina/LUtils.h4
1 files changed, 4 insertions, 0 deletions
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 <QRegExp>
#include <QFuture>
#include <QScreen>
+#include <QSettings>
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();
bgstack15