On Sat, Sep 24, 2016 at 6:38 PM, Dirk Hohndel <[email protected]> wrote: > Miika, > > Can you take a look at the DivelogImportDialog for me? This code worries > me: > > int DiveLogImportDialog::parseTxtHeader(QString fileName, char **params, int > pnr) > { > QFile f(fileNames.first()); > > (and fileName is unused in the function) > > The only two call sites of parseTxtHeader look like this: > > pnr = parseTxtHeader(fileNames[i], params, pnr); > > So the caller seems to think that the parseTxtHeader function will use > item number 'i' in the array of fileNames, but instead the function > ignores the parameter and always uses the first entry. > > git blame tells me that you wrote this :-)
A bit late reviewing the code :D But this works as well. Patch sent. There is still a limitation when importing multiple files on one go. The files must use same field separator. I wonder, if I should try to detect the separator file-by-file or just let it be. After all, same source of logs should use same separator for all exports. miika _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
