diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2017-12-13 20:10:04 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2017-12-14 17:01:05 +0100 |
commit | 074ddc05962e643b129cacbe81a20640cfd8fe19 (patch) | |
tree | 67dd274b4f2c8dc0724ca3a99281c9e16cc86a8a /core/qthelper.cpp | |
parent | 375490dfc9dddb01be8a4f484437580e679a0047 (diff) | |
download | subsurface-074ddc05962e643b129cacbe81a20640cfd8fe19.tar.gz |
Remove function isCloudUrl()
The function isCloudUrl() was only called in one place, parse_file().
But, isCloudUrl() could only return true if the filename was of the
git-repository kind (url[branch]). In such a case, control flow would
never reach the point where isCloudUrl() is called, since
is_git_repository() returns non-NULL and the function returns early.
Therefore, remove this function. Moreover, adapt the affected if-statement
by replacing "str && !strcmp(str, ...)" with the more concise
"same_string(str, ...)".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 341819a96..d26d2eb4d 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -1449,16 +1449,6 @@ extern "C" char *cloud_url() return strdup(filename.toUtf8().data()); } -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(QString(prefs.cloud_git_url) + "/%1[%1]").arg(email) == filename) - return true; - return false; -} - extern "C" bool getProxyString(char **buffer) { if (prefs.proxy_type == QNetworkProxy::HttpProxy) { |