diff --git a/src/AutoPilotPlugins/Common/RadioComponentController.cc b/src/AutoPilotPlugins/Common/RadioComponentController.cc index 2f88a4840046345d90f47ca25e0166f4d950ae27..b4e8cb3fb68cfc66507cd41cf7be0771b009aa84 100644 --- a/src/AutoPilotPlugins/Common/RadioComponentController.cc +++ b/src/AutoPilotPlugins/Common/RadioComponentController.cc @@ -26,8 +26,8 @@ /// @author Don Gagne diff --git a/src/FactSystem/ParameterLoader.cc b/src/FactSystem/ParameterLoader.cc index 0fbd59e6727d51bf31fd3af544b858edb6b015b7..bbaa748bb0328139612c4c72e586709445b5f72f 100644 --- a/src/FactSystem/ParameterLoader.cc +++ b/src/FactSystem/ParameterLoader.cc @@ -657,7 +657,6 @@ void ParameterLoader::_saveToEEPROM(void) QString ParameterLoader::readParametersFromStream(QTextStream& stream) { QString errors; - bool userWarned = false; while (!stream.atEnd()) { QString line = stream.readLine(); @@ -665,16 +664,8 @@ QString ParameterLoader::readParametersFromStream(QTextStream& stream) QStringList wpParams = line.split("\t"); int lineMavId = wpParams.at(0).toInt(); if (wpParams.size() == 5) { - if (!userWarned && (_vehicle->id() != lineMavId)) { - userWarned = true; - QString msg("The parameters in the stream have been saved from System Id %1, but the current vehicle has the System Id %2."); - QGCMessageBox::StandardButton button = QGCMessageBox::warning("Parameter Load", - msg.arg(lineMavId).arg(_vehicle->id()), - QGCMessageBox::Ok | QGCMessageBox::Cancel, - QGCMessageBox::Cancel); - if (button == QGCMessageBox::Cancel) { - return QString(); - } + if (_vehicle->id() != lineMavId) { + return QString("The parameters in the stream have been saved from System Id %1, but the current vehicle has the System Id %2.").arg(lineMavId).arg(_vehicle->id()); } int componentId = wpParams.at(1).toInt(); diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index beddbde4b37afb0fc8f37d6b2d0943d5d5113272..921a9f14e8d3490d2a4df6f15f5704285cfc8108 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -455,9 +455,7 @@ bool QGCApplication::_initForNormalAppBoot(void) /// settings. QString savedFilesLocation = settings.value(_savedFilesLocationKey).toString(); if (savedFilesLocation.isEmpty()) { - QGCMessageBox::warning( - tr("Bad save location"), - tr("The location to save files to is invalid, or cannot be written to. Please provide a new one.")); + showMessage("The location to save files to is invalid, or cannot be written to. Please provide a new one."); mainWindow->showSettings(); } @@ -705,10 +703,7 @@ void QGCApplication::_missingParamsDisplay(void) } _missingParams.clear(); - QGCMessageBox::critical( - "Missing Parameters", - QString("Parameters missing from firmware: %1.\n\n" - "You should quit QGroundControl immediately and update your firmware.").arg(params)); + showMessage(QString("Parameters missing from firmware: %1.\n\nYou should quit QGroundControl immediately and update your firmware.").arg(params)); } void QGCApplication::showMessage(const QString& message) @@ -717,6 +712,6 @@ void QGCApplication::showMessage(const QString& message) if (mainWindow) { mainWindow->showToolbarMessage(message); } else { - QGCMessageBox::information("", message); + qWarning() << "showMessage with no mainWindow" << message; } } diff --git a/src/QGCQuickWidget.cc b/src/QGCQuickWidget.cc index da302323eba82b43c1a665269a454998a5487325..5a5b24ca0a6c859dbc6f63b0f151d8672bc4aeff 100644 --- a/src/QGCQuickWidget.cc +++ b/src/QGCQuickWidget.cc @@ -60,7 +60,7 @@ bool QGCQuickWidget::setSource(const QUrl& qmlUrl) errorList += error.toString(); errorList += "\n"; } - QGCMessageBox::warning(tr("Qml Error"), tr("Source not ready: Status(%1)\nErrors:\n%2").arg(status()).arg(errorList)); + qgcApp()->showMessage(QString("Source not ready: Status(%1)\nErrors:\n%2").arg(status()).arg(errorList)); return false; }