summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rosca <[email protected]>2015-03-22 16:50:14 +0100
committerAurélien Gâteau <[email protected]>2015-03-22 16:52:11 +0100
commit5ec88f2b4c3f8f707d9eb7c576048fb8d1d46e0e (patch)
treecb256798c7364b1c28ffc8df547e7b0097a53562
parent9fae79e54f939cbc90c1bd3102c06caca33bcd60 (diff)
Fix loading animations with KPixmapSequence
KPixmapSequence(QString) takes a full path to icon REVIEW: 123086
-rw-r--r--lib/documentview/loadingindicator.cpp3
-rw-r--r--lib/thumbnailview/thumbnailview.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/documentview/loadingindicator.cpp b/lib/documentview/loadingindicator.cpp
index fbc780e..8c1374d 100644
--- a/lib/documentview/loadingindicator.cpp
+++ b/lib/documentview/loadingindicator.cpp
@@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
// Local
// KDE
+#include <KIconLoader>
#include <KPixmapSequence>
// Qt
@@ -43,10 +44,10 @@ struct LoadingIndicatorPrivate
LoadingIndicatorPrivate(LoadingIndicator* qq)
: q(qq)
- , mSequence("process-working", 22)
, mIndex(0)
, mTimer(new QTimer(qq))
{
+ mSequence = KIconLoader::global()->loadPixmapSequence(QStringLiteral("process-working"), 22);
mTimer->setInterval(100);
QObject::connect(mTimer, SIGNAL(timeout()), q, SLOT(showNextFrame()));
}
diff --git a/lib/thumbnailview/thumbnailview.cpp b/lib/thumbnailview/thumbnailview.cpp
index e05a2ce..6f63e24 100644
--- a/lib/thumbnailview/thumbnailview.cpp
+++ b/lib/thumbnailview/thumbnailview.cpp
@@ -189,7 +189,7 @@ struct ThumbnailViewPrivate
void setupBusyAnimation()
{
- mBusySequence = KPixmapSequence("process-working", 22);
+ mBusySequence = KIconLoader::global()->loadPixmapSequence(QStringLiteral("process-working"), 22);
mBusyAnimationTimeLine = new QTimeLine(100 * mBusySequence.frameCount(), q);
mBusyAnimationTimeLine->setCurveShape(QTimeLine::LinearCurve);
mBusyAnimationTimeLine->setEndFrame(mBusySequence.frameCount() - 1);