- bool aHasDigit = false;
- theText.toDouble(&aHasDigit);
- if (aHasDigit) {
- QLocale aLoc; // create default locale
- QChar aDecPnt = aLoc.decimalPoint();
- if (aDecPnt == '.')
- aHasDigit = theText.contains(aDecPnt) || (!theText.contains(','));
- else if (aDecPnt == ',')
- aHasDigit = theText.contains(aDecPnt) || (!theText.contains('.'));
- }
- return !aHasDigit;
-
+ bool isDouble = false;
+ QLocale::c().toDouble(theText, &isDouble);
+
+// theText.toDouble(&isDouble);
+// if (isDouble) {
+// QLocale aLoc; // create default locale
+// QChar aDecPnt = aLoc.decimalPoint();
+// if (aDecPnt == '.')
+// isDouble = theText.contains(aDecPnt) || (!theText.contains(','));
+// else if (aDecPnt == ',')
+// isDouble = theText.contains(aDecPnt) || (!theText.contains('.'));
+// }
+ return !isDouble;