Fixed dual definition of application name and cleaned up code. This fixes a problem with dual config files beeing written in next.
This commit is contained in:
+9
-10
@@ -76,9 +76,15 @@ class MyProxyStyle : public QProxyStyle
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setOrganizationName("OpenTX");
|
||||
QCoreApplication::setOrganizationDomain("open-tx.org");
|
||||
QCoreApplication::setApplicationName("Companion");
|
||||
Q_INIT_RESOURCE(companion);
|
||||
QApplication app(argc, argv);
|
||||
app.setApplicationName("OpenTX Companion");
|
||||
app.setOrganizationName("OpenTX");
|
||||
app.setOrganizationDomain("open-tx.org");
|
||||
|
||||
#ifdef __APPLE__
|
||||
app.setStyle(new MyProxyStyle);
|
||||
#endif
|
||||
|
||||
// Start by borrowing any left over settings from companion9x
|
||||
QSettings c9x_settings("companion9x", "companion9x");
|
||||
@@ -91,13 +97,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
Q_INIT_RESOURCE(companion);
|
||||
QApplication app(argc, argv);
|
||||
app.setApplicationName("OpenTX Companion");
|
||||
#ifdef __APPLE__
|
||||
app.setStyle(new MyProxyStyle);
|
||||
#endif
|
||||
|
||||
QString dir;
|
||||
if (argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user