From ebb14758adb5ef3157b3364ff1ff6901420fbac4 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 25 Dec 2014 15:59:02 -0800 Subject: [PATCH] Move messagebox from MainWindow --- src/comm/QGCFlightGearLink.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index d42ccdce7..cc2de3169 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -69,7 +69,7 @@ QGCFlightGearLink::QGCFlightGearLink(UASInterface* mav, QString startupArguments 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. - 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() @@ -825,7 +825,7 @@ bool QGCFlightGearLink::connectSimulation() } 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."); } - MainWindow::instance()->showCriticalMessage(tr("FlightGear settings"), errMsg); + QGCMessageBox::critical(tr("FlightGear HIL"), errMsg); return false; } #else -- 2.22.0