From 2ec570098b61d0ca9685420c82724633928192dc Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 6 Feb 2020 22:38:29 +0100 Subject: 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 --- mobile-widgets/qmlmanager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'mobile-widgets') 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 sites = exportFuncs::instance()->getDiveSitesToExport(false); + std::vector 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 } -- cgit v1.2.3-70-g09d2