Handle applyPrefixes with an empty string
Summary: When setting an empty QStringList as prefix, it can lead to unexpected results, such as the prefix not changing. BUG: 377441 Reviewers: #plasma Subscribers: plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D5000
This commit is contained in:
parent
fe3fd0cf17
commit
547a34d346
@ -556,7 +556,13 @@ void FrameSvgItem::updateDevicePixelRatio()
|
|||||||
|
|
||||||
void FrameSvgItem::applyPrefixes()
|
void FrameSvgItem::applyPrefixes()
|
||||||
{
|
{
|
||||||
if (m_prefixes.isEmpty() || m_frameSvg->imagePath().isEmpty()) {
|
|
||||||
|
if (m_frameSvg->imagePath().isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_prefixes.isEmpty()) {
|
||||||
|
m_frameSvg->setElementPrefix(QString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user