The purpose of this patch is to make icon handling in KMyMoney easier.
Moreover QIcon::fromTheme(QString, QString) make lots of QIcon::isNull(), which are costly. That can be avoided by providing correct icon name right from the beginning. That's what this patch does.
Advantages:
- Deduplication of QStringLiterals with icon names.
- New kmm_icons shared object allows to get icon names from every place in KMM without code size overhead.
- One place to add icon names and icon replacements.
- QIcon::isNull() isn't called explicitly, because we can't do anything useful if icon is null, so power isn't wasted on that.
- Pixmap cache names are unified now, so there will be no two identical icons in cache under different names.
- Simplified KMyMoneyUtils::overlayIcon and MyMoneyAccount::accountPixmap as lots of allocations go through them.
- Very easy to add new icon themes and easier to change theme on the fly.