Commit ebb14758 authored by Don Gagne's avatar Don Gagne

Move messagebox from MainWindow

parent d3ad49f3
...@@ -69,7 +69,7 @@ QGCFlightGearLink::QGCFlightGearLink(UASInterface* mav, QString startupArguments ...@@ -69,7 +69,7 @@ QGCFlightGearLink::QGCFlightGearLink(UASInterface* mav, QString startupArguments
setRemoteHost(remoteHost); setRemoteHost(remoteHost);
// We need a mechanism so show error message from our FGLink thread on the UI thread. This signal connection will do that for us. // We need a mechanism so show error message from our FGLink thread on the UI thread. This signal connection will do that for us.
connect(this, SIGNAL(showCriticalMessageFromThread(const QString&, const QString&)), MainWindow::instance(), SLOT(showCriticalMessage(const QString&, const QString&))); connect(this, &QGCFlightGearLink::showCriticalMessageFromThread, qgcApp(), &QGCApplication::criticalMessageBoxOnMainThread);
} }
QGCFlightGearLink::~QGCFlightGearLink() QGCFlightGearLink::~QGCFlightGearLink()
...@@ -825,7 +825,7 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -825,7 +825,7 @@ bool QGCFlightGearLink::connectSimulation()
} else { } else {
errMsg = tr("Unable to automatically determine --fg-scenery directory location. You will need to specify --fg-scenery=directory as an additional command line parameter from ui."); errMsg = tr("Unable to automatically determine --fg-scenery directory location. You will need to specify --fg-scenery=directory as an additional command line parameter from ui.");
} }
MainWindow::instance()->showCriticalMessage(tr("FlightGear settings"), errMsg); QGCMessageBox::critical(tr("FlightGear HIL"), errMsg);
return false; return false;
} }
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment