DataFile: added nested LocaleHelper class
In order to address issues with differently coded floating points in strings provide a helper class which can be instantiated when loading or saving data.
This commit is contained in:
@@ -77,6 +77,24 @@ public:
|
||||
return m_type;
|
||||
}
|
||||
|
||||
// small helper class for adjusting application's locale settings
|
||||
// when loading or saving floating point values rendered to strings
|
||||
class LocaleHelper
|
||||
{
|
||||
public:
|
||||
enum Modes
|
||||
{
|
||||
ModeLoad,
|
||||
ModeSave,
|
||||
ModeCount
|
||||
};
|
||||
typedef Modes Mode;
|
||||
|
||||
LocaleHelper( Mode mode );
|
||||
~LocaleHelper();
|
||||
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
static Type type( const QString& typeName );
|
||||
|
||||
Reference in New Issue
Block a user