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:
Tobias Doerffel
2014-08-18 23:17:47 +02:00
parent d1658a40cb
commit a09fd51060
2 changed files with 50 additions and 0 deletions

View File

@@ -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 );