diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-12-07 16:43:28 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-12-09 16:23:57 +0200 |
commit | 551449986701ccfc23cf32388648ec43b4ae1338 (patch) | |
tree | 5df87e8aaeaa65896f7851a61ef8e19ff443d98d /device.c | |
parent | 231e02f97ddcf355855190ed61c71e54c1ab5157 (diff) | |
download | subsurface-551449986701ccfc23cf32388648ec43b4ae1338.tar.gz |
Divelogs.de: improve prepare_dives_for_divelogs()
prepare_dives_for_divelogs() is based on GTK / C code
where we used GLib methods to generate a temp zip file.
Qt has QTemporaryFile, but it seems there is some sort
of a problem when using with with zip_open
(ZIP_CREATE considered) or at least in this particular case.
To workaround that, we generate a random name ourself with qrand()
and simply pass it to zip_open (with ZIP_CREATE) and then return
the filename.
Also (!), there is memory corruption when trying to return
'tempfile'. This wasn't the case with the C compiler,
to my knowledge. Regardless of this fact the generated
zip does not look corrupt.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'device.c')
0 files changed, 0 insertions, 0 deletions