Commit 31844b56 authored by chriadam's avatar chriadam

[systemsettings] Use GKeyFile for location.conf. Contributes to JB#33753

parent 43a88d03
......@@ -28,6 +28,7 @@ BuildRequires: pkgconfig(libsailfishkeyprovider) >= 0.0.14
BuildRequires: pkgconfig(connman-qt5) >= 1.2.7
BuildRequires: pkgconfig(ssu-sysinfo) >= 1.1.0
BuildRequires: pkgconfig(packagekitqt5)
BuildRequires: pkgconfig(glib-2.0)
%description
%{summary}.
......
This diff is collapsed.
......@@ -41,6 +41,8 @@
#include <sailfishkeyprovider_processmutex.h>
#include <glib.h>
#include "locationsettings.h"
class NetworkManager;
......@@ -75,7 +77,6 @@ public:
NetworkManager *m_connMan;
NetworkTechnology *m_gpsTech;
QDBusInterface *m_gpsTechInterface;
mutable QScopedPointer<Sailfish::KeyProvider::ProcessMutex> m_processMutex;
private slots:
void readSettings();
......@@ -84,4 +85,25 @@ private slots:
void recalculateLocationMode();
};
// TODO: replace this with DBus calls to a central settings service...
class IniFile
{
public:
IniFile(const QString &fileName);
~IniFile();
bool isValid() const;
bool readBool(const QString &section, const QString &key, bool *value, bool defaultValue = false);
void writeBool(const QString &section, const QString &key, bool value);
void writeString(const QString &section, const QString &key, const QString &value);
private:
mutable QScopedPointer<Sailfish::KeyProvider::ProcessMutex> m_processMutex;
QString m_fileName;
GKeyFile *m_keyFile;
GError *m_error;
bool m_modified;
bool m_valid;
};
#endif // NEMO_SYSTEMSETTINGS_LOCATIONSETTINGS_P_H
......@@ -6,7 +6,7 @@ QT += qml dbus systeminfo
QT -= gui
CONFIG += c++11 hide_symbols link_pkgconfig
PKGCONFIG += profile mlite5 mce timed-qt5 libshadowutils blkid libcrypto nemomodels-qt5 libsailfishkeyprovider connman-qt5
PKGCONFIG += profile mlite5 mce timed-qt5 libshadowutils blkid libcrypto nemomodels-qt5 libsailfishkeyprovider connman-qt5 glib-2.0
PKGCONFIG += ssu-sysinfo nemodbus packagekitqt5
system(qdbusxml2cpp -p mceiface.h:mceiface.cpp mce.xml)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment