Commit 1364d0e9 authored by Elvis Angelaccio's avatar Elvis Angelaccio

Properly create KPixmapSequence

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.

Test Plan: Search something and reach the end of document to make the animation start.

Subscribers: #okular

Tags: #okular

Differential Revision:
parent e80972e1
......@@ -18,6 +18,7 @@
#include <qlayout.h>
#include <qtimer.h>
#include <kcolorscheme.h>
#include <kiconloader.h>
#include <kpixmapsequence.h>
#include <kpixmapsequencewidget.h>
#include <kmessagebox.h>
......@@ -327,7 +328,7 @@ void SearchLineWidget::slotTimedout()
if ( m_anim->sequence().isEmpty() )
const KPixmapSequence seq( QStringLiteral("process-working"), 22 );
const KPixmapSequence seq = KIconLoader::global()->loadPixmapSequence(QStringLiteral("process-working"), 22);
if ( seq.frameCount() > 0 )
m_anim->setInterval( 1000 / seq.frameCount() );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment