playbacksettings: Don't try to load empty icons
When populating output options, don't attempt to load an icon if that field is empty. This cuts some log noise.
This commit is contained in:
parent
32944a15de
commit
3440f90a6b
@ -63,12 +63,14 @@ void PlaybackSettingsPage::Load() {
|
|||||||
|
|
||||||
ui_->gst_output->clear();
|
ui_->gst_output->clear();
|
||||||
for (const GstEngine::OutputDetails& output : engine->GetOutputsList()) {
|
for (const GstEngine::OutputDetails& output : engine->GetOutputsList()) {
|
||||||
// Strip components off the icon name until we find one.
|
|
||||||
QStringList components = output.icon_name.split("-");
|
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
while (icon.isNull() && !components.isEmpty()) {
|
if (!output.icon_name.isEmpty()) {
|
||||||
icon = IconLoader::Load(components.join("-"), IconLoader::Base);
|
// Strip components off the icon name until we find one.
|
||||||
components.removeLast();
|
QStringList components = output.icon_name.split("-");
|
||||||
|
while (icon.isNull() && !components.isEmpty()) {
|
||||||
|
icon = IconLoader::Load(components.join("-"), IconLoader::Base);
|
||||||
|
components.removeLast();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_->gst_output->addItem(icon, output.description,
|
ui_->gst_output->addItem(icon, output.description,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user