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>
This commit is contained in:
Dirk Hohndel 2015-06-15 06:05:00 -07:00
parent 617b105458
commit c593dea119
6 changed files with 12 additions and 13 deletions

View file

@ -1433,7 +1433,7 @@ QString MainWindow::displayedFilename(QString fullFilename)
QFileInfo fileInfo(f);
QString fileName(fileInfo.fileName());
if (fullFilename.contains("https://cloud.subsurface-divelog.org"))
if (fullFilename.contains(prefs.cloud_git_url))
return tr("[cloud storage for] %1").arg(fileName.left(fileName.indexOf('[')));
else
return fileName;