From 98a6b60b0055a7e6b245a21a44f6959b8c8fc22e Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Thu, 14 Apr 2016 16:41:19 +0200 Subject: [PATCH] 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). --- src/GUI/AircraftModel.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GUI/AircraftModel.cxx b/src/GUI/AircraftModel.cxx index b4fe7f675..5783a1237 100644 --- a/src/GUI/AircraftModel.cxx +++ b/src/GUI/AircraftModel.cxx @@ -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(); } -- 2.39.5