FrameSVG: Delete redundant checks

Summary:
There is no need to check whether `cachedBackground` is null, and if
it's null, return a null pixmap.

Reviewers: #plasma, #frameworks, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D13287
This commit is contained in:
Vlad Zagorodniy 2018-06-02 18:51:15 +03:00
parent a363815a79
commit b169aa50f9

View File

@ -449,9 +449,6 @@ QPixmap FrameSvgPrivate::alphaMask()
if (maskPrefix.isNull()) {
if (frame->cachedBackground.isNull()) {
generateBackground(frame);
if (frame->cachedBackground.isNull()) {
return QPixmap();
}
}
return frame->cachedBackground;
@ -496,10 +493,6 @@ QPixmap FrameSvgPrivate::alphaMask()
maskFrame->cachedBackground = QPixmap();
generateBackground(maskFrame);
if (maskFrame->cachedBackground.isNull()) {
return QPixmap();
}
}
return maskFrame->cachedBackground;