From 0528a2526e5a3e2760d13a54fa7edce6d9d60698 Mon Sep 17 00:00:00 2001 From: blacksun Date: Sun, 31 Mar 2019 13:33:48 +0000 Subject: [PATCH] Minor fix : remove from the element information the html hexadecimal and decimal characters of line feed and carriage return. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5815 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/ui/elementinfowidget.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 06da50d30..115381d78 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -231,9 +231,19 @@ DiagramContext ElementInfoWidget::currentInfo() const { DiagramContext info_; - for (ElementInfoPartWidget *eipw : m_eipw_list) { - if (!eipw->text().isEmpty()) { //add value only if they're something to store - info_.addValue(eipw->key(), eipw->text()); + for (ElementInfoPartWidget *eipw : m_eipw_list) + { + //add value only if they're something to store + if (!eipw->text().isEmpty()) + { + QString txt = eipw->text(); + //Replace html line feed + txt.replace(" ", " "); //hexa + txt.replace(" ", " "); //decimal + //Replace html carriage return + txt.replace(" ", " "); //hexa + txt.replace(" ", " "); //decimal + info_.addValue(eipw->key(), txt); } }