Really fix the removing of carriage return and line feed.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5817 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2019-03-31 18:43:45 +00:00
parent a7f4be0c12
commit acab6f3dc3
2 changed files with 6 additions and 12 deletions

View File

@@ -182,12 +182,9 @@ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted()
for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren()) for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren())
{ {
QString txt = qtwi->text(1); QString txt = qtwi->text(1);
//Replace html line feed //remove line feed and carriage return
txt.replace("
", " "); //hexa txt.remove("\r");
txt.replace("
", " "); //decimal txt.remove("\n");
//Replace html carriage return
txt.replace("
", " "); //hexa
txt.replace("
", " "); //decimal
m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), txt); m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), txt);
} }

View File

@@ -237,12 +237,9 @@ DiagramContext ElementInfoWidget::currentInfo() const
if (!eipw->text().isEmpty()) if (!eipw->text().isEmpty())
{ {
QString txt = eipw->text(); QString txt = eipw->text();
//Replace html line feed //remove line feed and carriage return
txt.replace("
", " "); //hexa txt.remove("\r");
txt.replace("
", " "); //decimal txt.remove("\n");
//Replace html carriage return
txt.replace("
", " "); //hexa
txt.replace("
", " "); //decimal
info_.addValue(eipw->key(), txt); info_.addValue(eipw->key(), txt);
} }
} }