Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
jontio committed Dec 18, 2015
1 parent 5fe62ac commit 4a40fa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions JAERO/databasetext.cpp
Expand Up @@ -98,6 +98,7 @@ bool DataBaseWorkerText::importdb(const QString &dirname)
QFile file(dirname+"/aircrafts_dump.csv");
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
file.rename(dirname+"/new.aircrafts_dump.csv");
emit dbimported(false,"Cant open csv file");
return false;
}
Expand All @@ -109,6 +110,7 @@ bool DataBaseWorkerText::importdb(const QString &dirname)
db.setDatabaseName(dirname+"/aircrafts_dump.db");
if (!db.open())
{
file.rename(dirname+"/new.aircrafts_dump.csv");
emit dbimported(false,"Cant open SQL database");
return false;
}
Expand All @@ -134,6 +136,7 @@ bool DataBaseWorkerText::importdb(const QString &dirname)
if(values.size()!=9)
{
db.rollback();
file.rename(dirname+"/new.aircrafts_dump.csv");
emit dbimported(false,"CSV file illformed");
return false;
}
Expand All @@ -144,6 +147,7 @@ bool DataBaseWorkerText::importdb(const QString &dirname)
if(!bStatus)
{
db.rollback();
file.rename(dirname+"/new.aircrafts_dump.csv");
emit dbimported(false,"CSV entry error");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion JAERO/gui_classes/settingsdialog.cpp
Expand Up @@ -96,7 +96,7 @@ void SettingsDialog::populatesettings()
ui->linePreamble->setText(settings.value("linePreamble","\\r|\\aNOCALL\\a \\aNOCALL\\a \\aNOCALL\\a\\n").toString());
ui->linePostamble->setText(settings.value("linePostamble","\\n\\a73 NOCALL\\a\\n").toString());
ui->comboBoxDisplayformat->setCurrentIndex(settings.value("comboBoxDisplayformat",2).toInt());
ui->lineEditdonotdisplaysus->setText(settings.value("lineEditdonotdisplaysus","71 18 19").toString());
ui->lineEditdonotdisplaysus->setText(settings.value("lineEditdonotdisplaysus","26 0A C0 00 14 16").toString());
ui->checkBoxdropnontextmsgs->setChecked(settings.value("checkBoxdropnontextmsgs",true).toBool());
ui->comboBoxsoundcard->setCurrentText(settings.value("comboBoxsoundcard","").toString());
ui->lineEditlogdir->setText(settings.value("lineEditlogdir",QStandardPaths::standardLocations(APPDATALOCATIONS)[0]+"/logs").toString());
Expand Down
2 changes: 1 addition & 1 deletion JAERO/mainwindow.cpp
Expand Up @@ -115,7 +115,7 @@ MainWindow::MainWindow(QWidget *parent) :

//load settings
QSettings settings("Jontisoft", "JAERO");
ui->comboBoxafc->setCurrentIndex(settings.value("comboBoxafc",0).toInt());
ui->comboBoxafc->setCurrentIndex(settings.value("comboBoxafc",1).toInt());
ui->comboBoxbps->setCurrentIndex(settings.value("comboBoxbps",0).toInt());
ui->comboBoxlbw->setCurrentIndex(settings.value("comboBoxlbw",0).toInt());
ui->comboBoxdisplay->setCurrentIndex(settings.value("comboBoxdisplay",0).toInt());
Expand Down

0 comments on commit 4a40fa8

Please sign in to comment.