mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 02:45:38 +00:00
Port away from deprecated Phonon API
This commit is contained in:
parent
fc09e52fc3
commit
d8fdb14941
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <QtGui/QImage>
|
||||
|
||||
SnapshotTaker::SnapshotTaker( const QString &url, QObject *parent )
|
||||
SnapshotTaker::SnapshotTaker(const QUrl &url, QObject *parent )
|
||||
: QObject( parent )
|
||||
, m_player( new Phonon::VideoPlayer( Phonon::NoCategory, 0 ) )
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ class SnapshotTaker : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SnapshotTaker( const QString &url, QObject *parent = Q_NULLPTR );
|
||||
SnapshotTaker( const QUrl &url, QObject *parent = Q_NULLPTR );
|
||||
~SnapshotTaker();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
|
@ -119,7 +119,7 @@ void VideoWidget::Private::load()
|
|||
newurl = QUrl::fromLocalFile(url);
|
||||
}
|
||||
if ( newurl.isLocalFile() )
|
||||
player->load( newurl.toLocalFile() );
|
||||
player->load( newurl );
|
||||
else
|
||||
player->load( newurl );
|
||||
|
||||
|
@ -159,9 +159,9 @@ void VideoWidget::Private::takeSnapshot()
|
|||
|
||||
SnapshotTaker *taker = 0;
|
||||
if ( newurl.isLocalFile() )
|
||||
taker = new SnapshotTaker( newurl.toLocalFile(), q );
|
||||
taker = new SnapshotTaker( newurl, q );
|
||||
else
|
||||
taker = new SnapshotTaker( newurl.url(), q );
|
||||
taker = new SnapshotTaker( newurl, q );
|
||||
|
||||
q->connect( taker, SIGNAL( finished( const QImage& ) ), q, SLOT( setPosterImage( const QImage& ) ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue