1
0
Fork 0

Launcher: silence 'Unknown aircraft URI scheme' warning on empty selection

------------------------------------------------------------------------
If no aircraft is selected in the launcher, the routine
AircraftItemModel::indexOfAircraftURI is called with an empty QUri,
triggering a warning in the terminal.

This commit removes such warning by ignoring QUris with empty schemes
(the routine still returns an invalid index).
This commit is contained in:
Alessandro Menti 2016-04-14 16:41:19 +02:00 committed by James Turner
parent 550dde314f
commit 98a6b60b00

View file

@ -862,6 +862,8 @@ QModelIndex AircraftItemModel::indexOfAircraftURI(QUrl uri) const
}
} // of linear package scan
}
} else if (uri.scheme() == "") {
// Empty URI scheme (no selection), nothing to do
} else {
qWarning() << "Unknown aircraft URI scheme" << uri << uri.scheme();
}