diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-06 22:38:29 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-09 12:13:18 -0800 |
commit | 2ec570098b61d0ca9685420c82724633928192dc (patch) | |
tree | 18796a4150e389eab4a0b9c73fc6bd374e4ccf8a /mobile-widgets | |
parent | 5b302235f4a7c3a5c8bf1bc6404171ebef1b321c (diff) | |
download | subsurface-2ec570098b61d0ca9685420c82724633928192dc.tar.gz |
Cleanup: remove exportFunc class
exportFunc was a collections of functions for exporting dive data.
It had no state, therefore there is no reason for it to ever be
instantiated.
Simply remove the class. Rename the saveProfile function to
exportProfile so that all export functions start with "export".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 755aa2112..8a0a410b5 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -2137,36 +2137,36 @@ void QMLManager::exportToFile(export_types type, QString dir, bool anonymize) break; case EX_DIVE_SITES_XML: { - std::vector<const dive_site *> sites = exportFuncs::instance()->getDiveSitesToExport(false); + std::vector<const dive_site *> sites = getDiveSitesToExport(false); save_dive_sites_logic(qPrintable(fileName + ".xml"), &sites[0], (int)sites.size(), anonymize); break; } case EX_UDDF: - exportFuncs::instance()->exportUsingStyleSheet(fileName + ".uddf", true, 0, "uddf-export.xslt", anonymize); + exportUsingStyleSheet(fileName + ".uddf", true, 0, "uddf-export.xslt", anonymize); break; case EX_CSV_DIVE_PROFILE: - exportFuncs::instance()->exportUsingStyleSheet(fileName + ".uddf", true, 0, "xml2csv.xslt", anonymize); + exportUsingStyleSheet(fileName + ".uddf", true, 0, "xml2csv.xslt", anonymize); break; case EX_CSV_DETAILS: - exportFuncs::instance()->exportUsingStyleSheet(fileName + ".uddf", true, 0, "xml2manualcsv.xslt", anonymize); + exportUsingStyleSheet(fileName + ".uddf", true, 0, "xml2manualcsv.xslt", anonymize); break; case EX_CSV_PROFILE: save_profiledata(qPrintable(fileName + ".csv"), true); break; case EX_PROFILE_PNG: - exportFuncs::instance()->exportProfile(qPrintable(fileName + ".png"), false); + exportProfile(qPrintable(fileName + ".png"), false); break; case EX_WORLD_MAP: export_worldmap_HTML(qPrintable(fileName + ".html"), true); break; case EX_TEX: - exportFuncs::instance()->export_TeX(qPrintable(fileName + ".tex"), true, true); + export_TeX(qPrintable(fileName + ".tex"), true, true); break; case EX_LATEX: - exportFuncs::instance()->export_TeX(qPrintable(fileName + ".tex"), true, false); + export_TeX(qPrintable(fileName + ".tex"), true, false); break; case EX_IMAGE_DEPTHS: - exportFuncs::instance()->export_depths(qPrintable(fileName), false); + export_depths(qPrintable(fileName), false); break; default: qDebug() << "export to unknown type " << type << " using " << dir << " remove names " << anonymize; @@ -2174,7 +2174,7 @@ void QMLManager::exportToFile(export_types type, QString dir, bool anonymize) } } -void exportFuncs::saveProfile(const struct dive *dive, const QString filename) +void exportProfile(const struct dive *, const QString) { // TBD } |