summaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 09:08:39 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 09:14:48 -0700
commitdf255e257316c277c51fb5fab5ca5168f0cae631 (patch)
treef1b191a4d9e651ef507c6a1af775ed5046701f7b /qthelper.cpp
parentabde615c1c3f64bed1d492a1f5f878fd890b111c (diff)
downloadsubsurface-df255e257316c277c51fb5fab5ca5168f0cae631.tar.gz
Don't show an error if you fail to open the cloud storage
The lower level functions will already report that things didn't connect successfully, no reason to repeat it here (which then exposes the git URL). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index 5434bcd20..12ce2cb3c 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -1038,6 +1038,16 @@ int getCloudURL(QString &filename)
return 0;
}
+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)
+ return true;
+ return false;
+}
+
extern "C" bool getProxyString(char **buffer)
{
if (prefs.proxy_type == QNetworkProxy::HttpProxy) {