Skip to content
Snippets Groups Projects
Commit 5c8e19b6 authored by DonLakeFlyer's avatar DonLakeFlyer
Browse files

Remove missing support for QGCView fact missing overlays
parent 79b05758
Branches
No related tags found
Loading
...@@ -35,30 +35,6 @@ FactPanelController::FactPanelController() ...@@ -35,30 +35,6 @@ FactPanelController::FactPanelController()
connect(&_missingParametersTimer, &QTimer::timeout, this, &FactPanelController::_checkForMissingParameters); connect(&_missingParametersTimer, &QTimer::timeout, this, &FactPanelController::_checkForMissingParameters);
} }
void FactPanelController::_notifyPanelMissingParameter(const QString& missingParam)
{
if (qgcApp()->mainRootWindow()) {
QVariant returnedValue;
QMetaObject::invokeMethod(
qgcApp()->mainRootWindow(),
"showMissingParameterOverlay",
Q_RETURN_ARG(QVariant, returnedValue),
Q_ARG(QVariant, missingParam));
}
}
void FactPanelController::_notifyPanelErrorMsg(const QString& errorMsg)
{
if(qgcApp()->mainRootWindow()) {
QVariant returnedValue;
QMetaObject::invokeMethod(
qgcApp()->mainRootWindow(),
"showFactError",
Q_RETURN_ARG(QVariant, returnedValue),
Q_ARG(QVariant, errorMsg));
}
}
void FactPanelController::_reportMissingParameter(int componentId, const QString& name) void FactPanelController::_reportMissingParameter(int componentId, const QString& name)
{ {
if (componentId == FactSystem::defaultComponentId) { if (componentId == FactSystem::defaultComponentId) {
...@@ -66,20 +42,7 @@ void FactPanelController::_reportMissingParameter(int componentId, const QString ...@@ -66,20 +42,7 @@ void FactPanelController::_reportMissingParameter(int componentId, const QString
} }
qgcApp()->reportMissingParameter(componentId, name); qgcApp()->reportMissingParameter(componentId, name);
qCWarning(FactPanelControllerLog) << "Missing parameter:" << QString("%1:%2").arg(componentId).arg(name);
QString missingParam = QString("%1:%2").arg(componentId).arg(name);
qCWarning(FactPanelControllerLog) << "Missing parameter:" << missingParam;
// If missing parameters a reported from the constructor of a derived class we
// will not have access to _factPanel yet. Just record list of missing facts
// in that case instead of notify. Once _factPanel is available they will be
// send out for real.
if (qgcApp()->mainRootWindow()) {
_notifyPanelMissingParameter(missingParam);
} else {
_delayedMissingParams += missingParam;
}
} }
bool FactPanelController::_allParametersExists(int componentId, QStringList names) bool FactPanelController::_allParametersExists(int componentId, QStringList names)
...@@ -116,13 +79,6 @@ bool FactPanelController::parameterExists(int componentId, const QString& name) ...@@ -116,13 +79,6 @@ bool FactPanelController::parameterExists(int componentId, const QString& name)
return _vehicle ? _vehicle->parameterManager()->parameterExists(componentId, name) : false; return _vehicle ? _vehicle->parameterManager()->parameterExists(componentId, name) : false;
} }
void FactPanelController::_showInternalError(const QString& errorMsg)
{
_notifyPanelErrorMsg(tr("Internal Error: %1").arg(errorMsg));
qCWarning(FactPanelControllerLog) << "Internal Error" << errorMsg;
qgcApp()->showAppMessage(errorMsg);
}
void FactPanelController::getMissingParameters(QStringList rgNames) void FactPanelController::getMissingParameters(QStringList rgNames)
{ {
for (const QString& name: rgNames) { for (const QString& name: rgNames) {
......
...@@ -57,11 +57,6 @@ private slots: ...@@ -57,11 +57,6 @@ private slots:
void _checkForMissingParameters(void); void _checkForMissingParameters(void);
private: private:
void _notifyPanelMissingParameter(const QString& missingParam);
void _notifyPanelErrorMsg(const QString& errorMsg);
void _showInternalError(const QString& errorMsg);
QStringList _delayedMissingParams;
QStringList _missingParameterWaitList; QStringList _missingParameterWaitList;
QTimer _missingParametersTimer; QTimer _missingParametersTimer;
}; };
...@@ -532,14 +532,6 @@ ApplicationWindow { ...@@ -532,14 +532,6 @@ ApplicationWindow {
} }
} }
function showMissingParameterOverlay(missingParamName) {
showError(qsTr("Parameters missing: %1").arg(missingParamName))
}
function showFactError(errorMsg) {
showError(qsTr("Fact error: %1").arg(errorMsg))
}
Popup { Popup {
id: systemMessageArea id: systemMessageArea
y: ScreenTools.defaultFontPixelHeight y: ScreenTools.defaultFontPixelHeight
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment