diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-15 06:05:00 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-15 10:22:00 -0700 |
commit | c593dea119b4c5fa77a8b2cc129d048d7d56afa4 (patch) | |
tree | 89e7e7105fb6d8d625f880e6b709cfe23e6d144a /qthelper.cpp | |
parent | 617b105458f362516de9bf2997f747de5dc14e44 (diff) | |
download | subsurface-c593dea119b4c5fa77a8b2cc129d048d7d56afa4.tar.gz |
Cloud storage: use preference member instead of hard coded strings
This creates the basis to allow other backends to be used with the cloud
storage infrastructure.
So far this should all just transparently continue to work. A user would
have to manually add the cloud_base_url entry to the CloudStorage section
in their config file in order to use a different backend server.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r-- | qthelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qthelper.cpp b/qthelper.cpp index 39c259992..9d907edf9 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -1038,7 +1038,7 @@ int getCloudURL(QString &filename) free(prefs.cloud_storage_email_encoded); prefs.cloud_storage_email_encoded = strdup(qPrintable(email)); } - filename = QString("https://cloud.subsurface-divelog.org/git/%1[%1]").arg(email); + filename = QString(QString(prefs.cloud_git_url) + "/%1[%1]").arg(email); return 0; } @@ -1047,7 +1047,7 @@ extern "C" bool isCloudUrl(const char *filename) QString email = QString(prefs.cloud_storage_email); email.replace(QRegularExpression("[^a-zA-Z0-9@._+-]"), ""); if (!email.isEmpty() && - QString("https://cloud.subsurface-divelog.org/git/%1[%1]").arg(email) == filename) + QString(QString(prefs.cloud_git_url) + "/%1[%1]").arg(email) == filename) return true; return false; } |