mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:13:24 +00:00
Notes from planned dives contain html. Convert to text for printing.
Otherwise we would be printing html source with too many tags for humans to spot the content. [Dirk Hohndel: changed the string comparison to use our helper] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dfc1e36c0e
commit
97e53649fd
1 changed files with 8 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <QtConcurrent>
|
||||
#include <QFont>
|
||||
#include <QApplication>
|
||||
#include <QTextDocument>
|
||||
|
||||
#include <libxslt/documents.h>
|
||||
|
||||
|
@ -216,7 +217,13 @@ void Dive::put_temp()
|
|||
|
||||
void Dive::put_notes()
|
||||
{
|
||||
m_notes = QString::fromUtf8(dive->notes);
|
||||
if (same_string(dive->dc.model, "planned dive")) {
|
||||
QTextDocument notes;
|
||||
notes.setHtml(QString::fromUtf8(dive->notes));
|
||||
m_notes = notes.toPlainText();
|
||||
} else {
|
||||
m_notes = QString::fromUtf8(dive->notes);
|
||||
}
|
||||
if (m_notes.isEmpty()) {
|
||||
m_notes = "--";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue