Same as previous commit, for the element editor.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5816 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2019-03-31 13:49:07 +00:00
parent 0528a2526e
commit a7f4be0c12
2 changed files with 15 additions and 7 deletions

View File

@@ -61,7 +61,6 @@ ElementPropertiesEditorWidget::ElementPropertiesEditorWidget(QString &basic_type
ui->setupUi(this); ui->setupUi(this);
setUpInterface(); setUpInterface();
upDateInterface(); upDateInterface();
qDebug() << "const";
} }
/** /**
@@ -180,8 +179,17 @@ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted()
m_kind_info.addValue("type", ui -> m_master_type_cb -> itemData(ui -> m_master_type_cb -> currentIndex())); m_kind_info.addValue("type", ui -> m_master_type_cb -> itemData(ui -> m_master_type_cb -> currentIndex()));
} }
for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren()) { for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren())
m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), qtwi->text(1)); {
QString txt = qtwi->text(1);
//Replace html line feed
txt.replace("&#xa;", " "); //hexa
txt.replace("&#10;", " "); //decimal
//Replace html carriage return
txt.replace("&#xd;", " "); //hexa
txt.replace("&#13;", " "); //decimal
m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), txt);
} }
this->close(); this->close();

View File

@@ -238,11 +238,11 @@ DiagramContext ElementInfoWidget::currentInfo() const
{ {
QString txt = eipw->text(); QString txt = eipw->text();
//Replace html line feed //Replace html line feed
txt.replace("&#xa", " "); //hexa txt.replace("&#xa;", " "); //hexa
txt.replace("&#10", " "); //decimal txt.replace("&#10;", " "); //decimal
//Replace html carriage return //Replace html carriage return
txt.replace("&#xd", " "); //hexa txt.replace("&#xd;", " "); //hexa
txt.replace("&#13", " "); //decimal txt.replace("&#13;", " "); //decimal
info_.addValue(eipw->key(), txt); info_.addValue(eipw->key(), txt);
} }
} }