summaryrefslogtreecommitdiff
path: root/distfoldd/main.cc
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-09-17 23:03:03 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-09-17 23:03:03 +0200
commitc3a1946675855b299a2b36550cdf2c2f69d153aa (patch)
treef7adf66404cdc47994225b616bcaf082a07dd168 /distfoldd/main.cc
downloaddistfold-c3a1946675855b299a2b36550cdf2c2f69d153aa.tar.gz
distfold-c3a1946675855b299a2b36550cdf2c2f69d153aa.zip
initial import
Diffstat (limited to 'distfoldd/main.cc')
-rw-r--r--distfoldd/main.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/distfoldd/main.cc b/distfoldd/main.cc
new file mode 100644
index 0000000..fbecf5a
--- /dev/null
+++ b/distfoldd/main.cc
@@ -0,0 +1,28 @@
+#include <QtCore/QCoreApplication>
+#include <QtCore/QSettings>
+#include <QtCore/QDebug>
+
+#include "distfolder.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+ a.setOrganizationName("distfold");
+ a.setOrganizationDomain("com.javispedro.distfold");
+ a.setApplicationName("distfoldd");
+ a.setApplicationVersion("0.1");
+
+ QSettings settings;
+ foreach (const QString& group, settings.childGroups()) {
+ settings.beginGroup(group);
+ QUuid uuid(settings.value("uuid").toString());
+ QString path = settings.value("path").toString();
+ DistFolder *f = new DistFolder(uuid, path);
+ f->setReadOnlySync(settings.value("ro", false).toBool());
+ f->setPullMode(settings.value("pull", false).toBool());
+ f->setCompress(settings.value("compress", true).toBool());
+ settings.endGroup();
+ }
+
+ return a.exec();
+}