I will wrap the unsafe global settings operations in a application data object.
I have found several bugs in the current model, where settings labels have been spelled badly or been of the wrong type.
Main and the preferences dialog are done.
At least as far as the simple values. I have not made support for complex values like profiles yet.
Profile date is now type safe. Semi working, not complete yet.
Profiles working.
Next all duplicated variables will be removed from global and only exists in profile.
Almost all global settings wrapped in protective object to guarantee type safety and protect against tag spelling errors (I have found and corrected a lot of those!).
Joystick settings and burner configuration is not yet within the global object.
Merge branch 'origin/next'
Modeledit added
Changed every single QSetting in Companion.
Next step: Function renaming
Merge branch 'origin/next'
All function names changed to a consistent standard.
Cleaned up indentation of appdata.h
Merge branch 'origin/next'
Defined missed global variable (lastUpdatesDir).
Renamed lastDir to eepromDir, which is a better name.
Fixed name space collisions introduced by included QT header. Now compiles on Windows. Finally!
Broke up definitions and declarations in separate files.
Declared base storage class as protected member.
Forgot the updated CMakeLists.txt file
Merge branch 'origin/next'

Conflicts:
	companion/src/eeprominterface.cpp
	companion/src/firmwares/opentx/opentxinterface.cpp
	companion/src/mainwindow.cpp
	companion/src/simulatordialog.cpp
	companion/src/xsimulatordialog.cpp
First merge problem fixed (there are more)
Simulator updated with last Kjell improvements
Merge remote-tracking branch 'origin/next' into dvogonen/making_settings_type_safe
Merge pull request #728 from opentx/dvogonen/making_settings_type_safe

Merging this one myself since both Bertrand and I have been throug it over and over. Better merge it fast before something else changes and forces new changes.