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 04151c3f31..04331527f9 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -62,6 +62,7 @@
#include <qshareddata.h>
#include <qdebug.h>
#include <stdio.h>
+#include <limits>
QT_BEGIN_NAMESPACE
@@ -4866,7 +4867,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);
}
@@ -4880,7 +4881,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);
}
@@ -5049,7 +5050,7 @@ void QDomElement::setAttributeNS(const QString nsURI, const QString& qName, doub
if (!impl)
return;
QString x;
- x.setNum(value);
+ x.setNum(value, 'g', 17);
IMPL->setAttributeNS(nsURI, qName, x);
}