[qet] qet/qet: [4748] Fix wrong way to save number value in xml file. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4748
Author: blacksun
Date: 2016-10-17 21:41:44 +0200 (Mon, 17 Oct 2016)
Log Message:
-----------
Fix wrong way to save number value in xml file. (store without local formating)
Modified Paths:
--------------
trunk/sources/properties/xrefproperties.cpp
trunk/sources/qetgraphicsitem/conductor.cpp
trunk/sources/qetgraphicsitem/qetshapeitem.cpp
Modified: trunk/sources/properties/xrefproperties.cpp
===================================================================
--- trunk/sources/properties/xrefproperties.cpp 2016-10-17 19:08:52 UTC (rev 4747)
+++ trunk/sources/properties/xrefproperties.cpp 2016-10-17 19:41:44 UTC (rev 4748)
@@ -88,7 +88,7 @@
QString snap = m_snap_to == Bottom? "bottom" : "label";
xml_element.setAttribute("snapto", snap);
int offset = m_offset;
- xml_element.setAttribute("offset", offset);
+ xml_element.setAttribute("offset", QString::number(offset));
QString master_label = m_master_label;
xml_element.setAttribute("master_label", master_label);
QString slave_label = m_slave_label;
Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp 2016-10-17 19:08:52 UTC (rev 4747)
+++ trunk/sources/qetgraphicsitem/conductor.cpp 2016-10-17 19:41:44 UTC (rev 4748)
@@ -857,8 +857,8 @@
QDomElement Conductor::toXml(QDomDocument &d, QHash<Terminal *, int> &table_adr_id) const {
QDomElement e = d.createElement("conductor");
- e.setAttribute("x", pos().x());
- e.setAttribute("y", pos().y());
+ e.setAttribute("x", QString::number(pos().x()));
+ e.setAttribute("y", QString::number(pos().y()));
e.setAttribute("terminal1", table_adr_id.value(terminal1));
e.setAttribute("terminal2", table_adr_id.value(terminal2));
Modified: trunk/sources/qetgraphicsitem/qetshapeitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/qetshapeitem.cpp 2016-10-17 19:08:52 UTC (rev 4747)
+++ trunk/sources/qetgraphicsitem/qetshapeitem.cpp 2016-10-17 19:41:44 UTC (rev 4748)
@@ -600,8 +600,8 @@
{
QDomElement point = document.createElement("point");
QPointF pf = mapToScene(p);
- point.setAttribute("x", pf.x());
- point.setAttribute("y", pf.y());
+ point.setAttribute("x", QString::number(pf.x()));
+ point.setAttribute("y", QString::number(pf.y()));
points.appendChild(point);
}
result.appendChild(points);