浏览代码

minor changes

fiffty-50 4 年之前
父节点
当前提交
e6a2089e9b
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      src/gui/widgets/aircraftwidget.cpp
  2. 1 1
      src/gui/widgets/logbookwidget.cpp
  3. 2 2
      src/gui/widgets/pilotswidget.cpp

+ 2 - 2
src/gui/widgets/aircraftwidget.cpp

@@ -45,7 +45,7 @@ void AircraftWidget::tableView_selectionChanged(const QItemSelection &index, con
     setSelectedAircraft(index.indexes()[0].data().toInt());
     DEB("Selected aircraft with ID#: " << selectedAircraft);
 
-    auto nt = new NewTail(Aircraft("tails", selectedAircraft), Db::editExisting, this);
+    auto nt = new NewTail(Aircraft(selectedAircraft), Db::editExisting, this);
     connect(nt, SIGNAL(accepted()), this, SLOT(on_widget_accepted()));
     connect(nt, SIGNAL(rejected()), this, SLOT(on_widget_accepted()));
 
@@ -58,7 +58,7 @@ void AircraftWidget::on_deleteButton_clicked()
 {
     if (selectedAircraft > 0) {
 
-        auto ac = new Aircraft("tails", selectedAircraft);
+        auto ac = new Aircraft(selectedAircraft);
         ac->remove();
         refreshView();
 

+ 1 - 1
src/gui/widgets/logbookwidget.cpp

@@ -127,7 +127,7 @@ void LogbookWidget::on_deleteFlightPushButton_clicked()
                                       QMessageBox::Yes | QMessageBox::No);
         if (reply == QMessageBox::Yes) {
             DEB("Deleting flight with ID# " << selectedFlight);
-            auto en = new Flight("flights", selectedFlight);
+            auto en = new Flight(selectedFlight);
             en->remove();
             refreshView();
         }

+ 2 - 2
src/gui/widgets/pilotswidget.cpp

@@ -40,7 +40,7 @@ void PilotsWidget::tableView_selectionChanged(const QItemSelection &index, const
     setSelectedPilot(index.indexes()[0].data().toInt());
     DEB("Selected Pilot with ID#: " << selectedPilot);
 
-    auto np = new NewPilot(Pilot("pilots", selectedPilot), Db::editExisting, this);
+    auto np = new NewPilot(Pilot(selectedPilot), Db::editExisting, this);
     connect(np, SIGNAL(accepted()), this, SLOT(on_widget_accepted()));
     connect(np, SIGNAL(rejected()), this, SLOT(on_widget_accepted()));
 
@@ -68,7 +68,7 @@ void PilotsWidget::on_deletePushButton_clicked()
 {
     if (selectedPilot > 0) {
 
-        auto pil = new Pilot("pilots", selectedPilot);
+        auto pil = new Pilot(selectedPilot);
         pil->remove();
         refreshView();