The KPixmapSequence constructor needs the full path of the icon, so the
current code doesn't work and generates a "Invalid pixmap specified"
warning at runtime. By using KIconLoader we can fix this issue.
Details
- Reviewers
aacid - Group Reviewers
Okular - Commits
- R223:1364d0e97b22: Properly create KPixmapSequence
Search something and reach the end of document to make the animation start.
Diff Detail
- Repository
- R223 Okular
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Whoever decided to change from iconName to fullpath deserves some punishment for having a class constructor that has exactly signature but behaves totally different.
every single instance is broken
https://lxr.kde.org/source/frameworks/kpeople/src/widgets/mergedialog.cpp#0082
https://lxr.kde.org/source/frameworks/knewstuff/src/uploaddialog.cpp#0147
https://lxr.kde.org/source/calligra/krita/libs/ui/widgets/kis_cie_tongue_widget.cpp#0162
https://lxr.kde.org/source/extragear/base/nepomuk-webminer/src/lib/ui/fetcherdialog.cpp#0140
meh, i'll forget this to make my life better.
I had a look, kdelibs has
KPixmapSequence::KPixmapSequence(const QString &xdgIconName, int size) : d(new Private) { d->loadSequence(QPixmap(KIconLoader::global()->iconPath(xdgIconName, -size)), QSize(size, size)); }
while kwidgetaddons has
KPixmapSequence::KPixmapSequence(const QString &fullPath, int size) : d(new Private) { d->loadSequence(QPixmap(fullPath), QSize(size, size)); }
The weird thing is that I can't find the change with git blame. Shouldn't we just restore the old implementation?