diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-17 06:27:33 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-17 09:48:10 -0700 |
commit | 11f457403fb0f005411deca0ab572815760f6295 (patch) | |
tree | 6103b2d9e2ce67ae9a275095cb2d394c077d565e /export-html.cpp | |
parent | ff4b5478b520856d0b9d2b423627050a1672418d (diff) | |
download | subsurface-11f457403fb0f005411deca0ab572815760f6295.tar.gz |
Use saved units in the HTML exporter
Also update the exporter to match the latest changes in the Subsurface
code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'export-html.cpp')
-rw-r--r-- | export-html.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/export-html.cpp b/export-html.cpp index 041c52807..fd92fbd87 100644 --- a/export-html.cpp +++ b/export-html.cpp @@ -16,7 +16,7 @@ QTranslator *qtTranslator, *ssrfTranslator; int main(int argc, char **argv) { - QApplication *application = init_qt(&argc, &argv); + QApplication *application = new QApplication(argc, argv); git_libgit2_init(); setup_system_prefs(); prefs = default_prefs; @@ -41,15 +41,24 @@ int main(int argc, char **argv) qDebug() << "need --source and --output"; exit(1); } - qDebug() << source << output; - fprintf(stderr, "parse_file returned %d\n", parse_file(qPrintable(source))); + int ret = parse_file(qPrintable(source)); + if (ret) + fprintf(stderr, "parse_file returned %d\n", ret); + + // this should have set up the informational preferences - let's grab + // the units from there + + prefs.unit_system = informational_prefs.unit_system; + prefs.units = informational_prefs.units; + + // now set up the export settings to create the HTML export struct htmlExportSetting hes; hes.themeFile = "sand.css"; hes.exportPhotos = true; hes.selectedOnly = false; hes.listOnly = false; hes.yearlyStatistics = true; - exportHtmlInitLogic(output, &hes); + exportHtmlInitLogic(output, hes); exit(0); } |