diff DataController.cpp @ 16:06166d6c083b

Add configuration processing. Cache DB values Add a custom RBTree to save space. Track multiple DB connections properly. More testing. Add ValueExistsException.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Tue, 28 Aug 2012 18:58:02 +0200
parents e60d6caceb62
children 9a1825df8418
line wrap: on
line diff
--- a/DataController.cpp	Sat Aug 25 01:42:13 2012 +0200
+++ b/DataController.cpp	Tue Aug 28 18:58:02 2012 +0200
@@ -4,6 +4,7 @@
 #include "MemoryDBLink.hpp"
 #include "PermissionException.hpp"
 #include "SqliteDBLink.hpp"
+#include "ConfigurationProcessing.hpp"
 
 #include <QtCore/QCryptographicHash>
 #include <QtCore/QDateTime>
@@ -446,7 +447,6 @@
   QDesktopServices::openUrl(url);  
 }
 
-
 void DataController::setup(const QString& dbpath_in, const QString& searchPath_in, bool showGUI)
 {
   this->showGUI = showGUI;
@@ -460,10 +460,7 @@
     dbpath = dbpath_in;
   }
   else {
-    dbpath = DB_DEFAULT_LOCATION;
-    
-    dbpath.replace(QRegExp("^~/"),
-		   QString("%1%2").arg(QDesktopServices::storageLocation(QDesktopServices::HomeLocation)).arg(QDir::separator()));
+    dbpath = processSetupVariables(DB_DEFAULT_LOCATION);
   }
 
 #if 1