summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/dom/qdom.cpp')
-rw-r--r--src/xml/dom/qdom.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 39cf0c2653..022de70090 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -65,6 +65,7 @@
#include <stdio.h>
+#include <limits>
QT_BEGIN_NAMESPACE
@@ -4364,7 +4365,7 @@ void QDomElement::setAttribute(const QString& name, float value)
if (!impl)
return;
QString x;
- x.setNum(value);
+ x.setNum(value, 'g', 8);
IMPL->setAttribute(name, x);
}
@@ -4378,7 +4379,7 @@ void QDomElement::setAttribute(const QString& name, double value)
if (!impl)
return;
QString x;
- x.setNum(value);
+ x.setNum(value, 'g', 17);
IMPL->setAttribute(name, x);
}
@@ -4547,7 +4548,7 @@ void QDomElement::setAttributeNS(const QString& nsURI, const QString& qName, dou
if (!impl)
return;
QString x;
- x.setNum(value);
+ x.setNum(value, 'g', 17);
IMPL->setAttributeNS(nsURI, qName, x);
}