Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

Properly create KPixmapSequence

Summary:
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: https://phabricator.kde.org/D7996
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