HTML export progress
Gehad Elrobey
gehadelrobey at gmail.com
Tue Jun 3 09:23:07 PDT 2014
Thanks tomaz I will fix this.
Also I am not sure if this will work on other platforms.
+ QDir dir(filename);
+ if (!dir.exists()) {
+ QDir::home().mkpath(filename);
+ }
I think QDir::home() in windows is c:/ which may be false as a root
directory for the chosen folder.
I don't know if this .
On 06/03/2014 06:31 PM, Tomaz Canabrava wrote:
On Tue, Jun 3, 2014 at 11:51 AM, Miika Turkia <miika.turkia at gmail.com>
<miika.turkia at gmail.com> wrote:
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 + QDir::separator() + "file.json";
+ QString json_settings = filename + QDir::separator() + "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 + QDir::separator() +
"dive_export.html");
+ tmpFile->copy(filename + QDir::separator() + "dive_export.html");
+ delete tmpFile;
_______________________________________________
subsurface mailing
listsubsurface at hohndel.orghttp://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
--
Regards,
Gehad Elrobey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140603/5ee7cb92/attachment.html>
More information about the subsurface
mailing list