HTML export progress

Miika Turkia miika.turkia at gmail.com
Tue Jun 3 07:51:31 PDT 2014


A quick questions to people familiar with Qt. Will the following work on
all our supported platforms? I suspect that export_HTML will not be able to
open the file given as parameter (with fopen), but how about QFile
functions, do they take care of the Windows directory separator by
themselves?

+       QString json_dive_data = filename + "/file.json";
+       QString json_settings = filename + "/settings.json";
+
+       exportHTMLsettings(json_settings);
+       export_HTML(json_dive_data.toUtf8().data(),
ui->exportSelectedDives->isChecked());
+
+       QString searchPath = getSubsurfaceDataPath("theme");
+
+       if (searchPath == "") {
+               return;
+       }
+
+       QFile *tmpFile;
+
+       tmpFile = new QFile(searchPath + "/dive_export.html");
+       tmpFile->copy(filename + "/dive_export.html");
+       delete tmpFile;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140603/dca9c544/attachment.html>


More information about the subsurface mailing list