From 617b105458f362516de9bf2997f747de5dc14e44 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 15 Jun 2015 05:52:12 -0700 Subject: Cloud storage: create preference entry for base URL This just deals with the mechanics. There is no UI to enter / change this URL (and that's intentional), neither is it used, yet. Signed-off-by: Dirk Hohndel --- qt-ui/preferences.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index e7aa7020b..9d018815b 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -431,6 +431,9 @@ void PreferencesDialog::syncSettings() SAVE_OR_REMOVE("cloud_verification_status", default_prefs.cloud_verification_status, prefs.cloud_verification_status); SAVE_OR_REMOVE("cloud_background_sync", default_prefs.cloud_background_sync, ui.cloud_background_sync->isChecked()); + // at this point we intentionally do not have a UI for changing this + // it could go into some sort of "advanced setup" or something + SAVE_OR_REMOVE("cloud_base_url", default_prefs.cloud_base_url, prefs.cloud_base_url); s.endGroup(); loadSettings(); emit settingsChanged(); @@ -563,6 +566,11 @@ void PreferencesDialog::loadSettings() } GET_INT("cloud_verification_status", cloud_verification_status); GET_BOOL("cloud_background_sync", cloud_background_sync); + + // creating the git url here is simply a convenience when C code wants + // to compare against that git URL - it's always derived from the base URL + GET_TXT("cloud_base_url", cloud_base_url); + prefs.cloud_git_url = strdup(qPrintable(QString(prefs.cloud_base_url) + "/git")); s.endGroup(); } -- cgit v1.2.3-70-g09d2