<table><tr><td style="">joselema created this revision.<br />joselema added reviewers: mart, apol.<br />Herald added a project: Frameworks.<br />Herald removed a subscriber: Frameworks.<br />joselema requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D16742">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Hi,</p>

<p>after this commit<br />
<a href="https://cgit.kde.org/plasma-framework.git/commit/?id=9f08668147d2e99f8b5069ff50d5c54e672a87af" class="remarkup-link" target="_blank" rel="noreferrer">https://cgit.kde.org/plasma-framework.git/commit/?id=9f08668147d2e99f8b5069ff50d5c54e672a87af</a></p>

<p>The iconitemtest started to fail. As we can see from that commit the set of changes starts with this:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (sourceString.endsWith(QLatin1String(".svg")) ||
    sourceString.endsWith(QLatin1String(".svgz"))) {
    m_icon = QIcon(localFile);
    m_imageIcon = QImage();
} else {
    m_icon = QIcon(localFile);
    m_imageIcon = QImage();
}</pre></div>

<p>As we can see the code executed in the "if" block and the "else" block is exactly the same. My guess (and it's just a wild guess because I don't actually understand the code involved) is that you actually wanted to do this:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (sourceString.endsWith(QLatin1String(".svg")) ||
    sourceString.endsWith(QLatin1String(".svgz"))) {
    m_icon = QIcon(localFile);
    m_imageIcon = QImage();
} else {
    m_icon = QIcon();
    m_imageIcon = QImage(localfile);
}</pre></div>

<p>So I'm attaching a patch doing that ↑</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>I have just built the code with the patch, it fixes the test for me, but I'm not sure if the patch is correct.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16742">https://phabricator.kde.org/D16742</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/declarativeimports/core/iconitem.cpp</div></div></div><br /><div><strong>To: </strong>joselema, mart, apol<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>