Optimise setting up the palette
Summary:
For every setBrush/setColor we're initialising a new QBrush instance that
allocates some space in memory. At the moment we were creating and destroying
QBrush instances like crazy, this check aloen saves 23K calls only starting
Discover.
Test Plan: Tried with Discover, KAlgebra and Kirgami Gallery
Reviewers: mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: Kirigami
Differential Revision: https://phabricator.kde.org/D14387