[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/graphics/kpovmodeler
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2011-01-08 18:04:45
Message-ID: 20110108180445.E5CFCAC8B0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1212937 by cfeck:

Parse floats in C locale

Use QByteArray::toDouble() instead of atof(). The Qt function
is documented to always use the C locale (which has "." as the
decimal separator), instead of the current locale.

BUG: 261884


 M  +2 -2      pmscanner.cpp  


--- trunk/extragear/graphics/kpovmodeler/pmscanner.cpp #1212936:1212937
@@ -822,7 +822,7 @@
             else if( isseparation( m_char ) )
             {
                consumed = false;
-               m_fvalue = atof( m_svalue );
+               m_fvalue = QByteArray( m_svalue ).toDouble();
 #ifdef PMSCAN_DEBUG
                kDebug( PMArea ) << "Line " << m_line << ": Float: "
                                  << m_fvalue << "\n";
@@ -880,7 +880,7 @@
             else if( isseparation( m_char ) )
             {
                consumed = false;
-               m_fvalue = atof( m_svalue );
+               m_fvalue = QByteArray( m_svalue ).toDouble();
 #ifdef PMSCAN_DEBUG
                kDebug( PMArea ) << "Line " << m_line << ": Float: "
                                  << m_fvalue << "\n";
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic