diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2019-03-22 21:33:17 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-03-27 07:36:33 -0700 |
commit | 9ea32a015870638c2a848d4ceab13a204b05c2ae (patch) | |
tree | 9e0295e4839147aa0fc8db5115e3c9badfaef91e /core/divelogexportlogic.cpp | |
parent | bf9a526d63854f1ebb5bf102d54cc170f29ce370 (diff) | |
download | subsurface-9ea32a015870638c2a848d4ceab13a204b05c2ae.tar.gz |
avoid duplicate and inconsistent applying of QDir::separator()
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
Diffstat (limited to 'core/divelogexportlogic.cpp')
-rw-r--r-- | core/divelogexportlogic.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/core/divelogexportlogic.cpp b/core/divelogexportlogic.cpp index 1a0779422..dff7eefc9 100644 --- a/core/divelogexportlogic.cpp +++ b/core/divelogexportlogic.cpp @@ -10,7 +10,7 @@ #include "statistics.h" #include "save-html.h" -void file_copy_and_overwrite(const QString &fileName, const QString &newName) +static void file_copy_and_overwrite(const QString &fileName, const QString &newName) { QFile file(newName); if (file.exists()) @@ -18,7 +18,7 @@ void file_copy_and_overwrite(const QString &fileName, const QString &newName) QFile::copy(fileName, newName); } -void exportHTMLsettings(const QString &filename, struct htmlExportSetting &hes) +static void exportHTMLsettings(const QString &filename, struct htmlExportSetting &hes) { QString fontSize = hes.fontSize; QString fontFamily = hes.fontFamily; @@ -128,21 +128,19 @@ void exportHtmlInitLogic(const QString &filename, struct htmlExportSetting &hes) QFile file(filename); QFileInfo info(file); QDir mainDir = info.absoluteDir(); - mainDir.mkdir(file.fileName() + "_files"); - QString exportFiles = file.fileName() + "_files"; + QString exportFiles = file.fileName() + "_files" + QDir::separator(); + mainDir.mkdir(exportFiles); - QString json_dive_data = exportFiles + QDir::separator() + "file.js"; - QString json_settings = exportFiles + QDir::separator() + "settings.js"; - QString translation = exportFiles + QDir::separator() + "translation.js"; - QString stat_file = exportFiles + QDir::separator() + "stat.js"; - exportFiles += "/"; + QString json_dive_data = exportFiles + "file.js"; + QString json_settings = exportFiles + "settings.js"; + QString translation = exportFiles + "translation.js"; + QString stat_file = exportFiles + "stat.js"; if (hes.exportPhotos) { - photosDirectory = exportFiles + QDir::separator() + "photos" + QDir::separator(); + photosDirectory = exportFiles + "photos" + QDir::separator(); mainDir.mkdir(photosDirectory); } - exportHTMLsettings(json_settings, hes); exportHTMLstatistics(stat_file, hes); export_translation(qPrintable(translation)); |