1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Look for the default configurations in a platform dependent location,

unfortunately.
This commit is contained in:
James Cotton 2012-08-13 16:18:53 -05:00 committed by PT_Dreamer
parent 1c344bb4fe
commit e9a355077f

View File

@ -272,10 +272,17 @@ void MainWindow::extensionsInitialized()
if ( ! qs->allKeys().count() ){
importSettings * dialog=new importSettings(this);
QDir directory(QCoreApplication::applicationDirPath());
#ifdef Q_OS_MAC
directory.cdUp();
directory.cd("Resources");
#else
directory.cdUp();
directory.cd("share");
directory.cd("openpilotgcs");
#endif
directory.cd("default_configurations");
qDebug() << "Looking for default config files in: " + directory.absolutePath();
dialog->loadFiles(directory.absolutePath());
dialog->exec();
settings=new QSettings(dialog->choosenConfig(), XmlConfig::XmlSettingsFormat);