Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Accessibility
Kontrast
Commits
be6c8dcd
Commit
be6c8dcd
authored
Sep 12, 2022
by
Vlad Rakhmanin
Browse files
Fixed switch statements.
Edited switch statements to ensure that the relevant functions always return a value.
parent
314b2750
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kontrast.cpp
View file @
be6c8dcd
...
...
@@ -346,26 +346,35 @@ QString Kontrast::getFontSizeQualityLabel()
}
else
{
currentQuality
=
currentQualities
.
small
;
}
QString
fontSizeQualityLabel
;
switch
(
currentQuality
)
{
case
Bad
:
return
i18n
(
"Font size %1px is bad with the current contrast"
,
m_fontSize
);
fontSizeQualityLabel
=
i18n
(
"Font size %1px is bad with the current contrast"
,
m_fontSize
);
break
;
case
Good
:
return
i18n
(
"Font size %1px is good with the current contrast"
,
m_fontSize
);
fontSizeQualityLabel
=
i18n
(
"Font size %1px is good with the current contrast"
,
m_fontSize
);
break
;
case
Perfect
:
return
i18n
(
"Font size %1px is perfect with the current contrast"
,
m_fontSize
);
}
fontSizeQualityLabel
=
i18n
(
"Font size %1px is perfect with the current contrast"
,
m_fontSize
);
break
;
}
return
fontSizeQualityLabel
;
}
QString
Kontrast
::
getStringFromEnum
(
Quality
quality
)
{
QString
qualityDescription
;
switch
(
quality
)
{
case
Bad
:
return
i18nc
(
"A bad quality"
,
"bad"
);
qualityDescription
=
i18nc
(
"A bad quality"
,
"bad"
);
break
;
case
Good
:
return
i18nc
(
"A good quality"
,
"good"
);
qualityDescription
=
i18nc
(
"A good quality"
,
"good"
);
break
;
case
Perfect
:
return
i18nc
(
"A perfect quality"
,
"perfect"
);
qualityDescription
=
i18nc
(
"A perfect quality"
,
"perfect"
);
break
;
}
return
qualityDescription
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment