Merge branch 'dvogonen/automatically_convert_settings_511' of https://github.com/opentx/opentx into next
Conflicts: companion/src/main.cpp
This commit is contained in:
+12
-1
@@ -76,6 +76,17 @@ class MyProxyStyle : public QProxyStyle
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Start by borrowing any left over settings from companion9x
|
||||
QSettings c9x_settings("companion9x", "companion9x");
|
||||
QSettings com_settings("companion", "companion");
|
||||
if (!com_settings.contains("pos")) {
|
||||
QStringList keys = c9x_settings.allKeys();
|
||||
for( QStringList::iterator i = keys.begin(); i != keys.end(); i++ )
|
||||
{
|
||||
com_settings.setValue( *i, c9x_settings.value( *i ) );
|
||||
}
|
||||
}
|
||||
|
||||
Q_INIT_RESOURCE(companion);
|
||||
QApplication app(argc, argv);
|
||||
app.setApplicationName("OpenTX Companion");
|
||||
@@ -85,7 +96,7 @@ int main(int argc, char *argv[])
|
||||
QString dir;
|
||||
if(argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang";
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString locale = settings.value("locale",QLocale::system().name()).toString();
|
||||
bool showSplash = settings.value("show_splash", true).toBool();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user