Cleaner warning sidestep

This commit is contained in:
Bill Somerville 2019-07-02 21:07:43 +01:00
parent e7ace39e44
commit a27668428b
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 4 additions and 3 deletions

View File

@ -42,8 +42,8 @@ void ColorHighlighting::set_items (DecodeHighlightingModel const& highlighting_m
int index {0};
for (auto const& item : highlighting_model.items ())
{
QLabel * example {nullptr};
QLabel * label {nullptr};
QLabel * example;
QLabel * label;
switch (index++)
{
case 0:
@ -110,8 +110,9 @@ void ColorHighlighting::set_items (DecodeHighlightingModel const& highlighting_m
example = ui->example16_label;
label = ui->p16_label;
break;
default:
continue;
}
if (!example || !label) continue;
auto palette = example->parentWidget ()->palette ();
if (Qt::NoBrush != item.background_.style ())
{