HTML export progress

Tomaz Canabrava tcanabrava at kde.org
Tue Jun 3 08:31:07 PDT 2014


On Tue, Jun 3, 2014 at 11:51 AM, Miika Turkia <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 list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>


More information about the subsurface mailing list