Commit graph

9 commits

Author SHA1 Message Date
Thiago Macieira
8f35b7324e Move the qtTranslator and ssrfTranslator pointers to qt-init.cpp
No point in having it defined in each main program's .cpp. Especially
since the unit tests don't define them.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02 07:07:21 -07:00
Dirk Hohndel
09d6913161 export-html needs to actually calculate the statistics
Otherwise they will always be empty.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07 22:09:15 +01:00
Dirk Hohndel
ea6f6b959e Prevent crash in export-html
We need to instantiate the window title updater...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-07 21:57:26 +01:00
Dirk Hohndel
9d8b0addf9 Correctly copy preferences
When just assigning one structure to the other we copy the string
pointers. If we then modify those strings in the copy, we happily free
the strings of the original. And then resetting the preferences equally
happily reused those strings, pointing to long since freed memory.

I think what I did now is excessive for the current use case in that it
copies a ton of strings that are unset in the default_prefs. But I figured
this is a rarely used function and I might as well do it correctly.

Also, once we implement multi user support with per user preferences we
will be copying completely populated preferences around (at least that's
my guess).

Fixes #940

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-06 10:19:43 +01:00
Dirk Hohndel
6ad3453af0 HTML standalone exporter: use Subsurface dive numbers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18 12:23:30 -07:00
Dirk Hohndel
d11b3743eb HTML standalone exporter: give up if parsing the input fails
There's no point in trying to export after not being able to read the data
in the first place.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18 12:23:15 -07:00
Dirk Hohndel
befa8cf32e HTML standalone exporter: don't setup preferences
We don't need them and they can cause the application to crash when called
in a git hook.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 12:39:40 -07:00
Dirk Hohndel
11f457403f Use saved units in the HTML exporter
Also update the exporter to match the latest changes in the Subsurface
code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 09:48:10 -07:00
Dirk Hohndel
226e9a7e85 Implement a standalone HTML exporter
This is mostly a proof of concept right now; it shows that it is possible
to create a headless server application that exports a git repository
based data file as html.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16 14:09:21 -07:00