Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Okular
Commits
d8fdb149
Commit
d8fdb149
authored
Jul 24, 2016
by
Martin Tobias Holmedahl Sandsmark
Browse files
Port away from deprecated Phonon API
parent
fc09e52f
Changes
3
Hide whitespace changes
Inline
Side-by-side
ui/snapshottaker.cpp
View file @
d8fdb149
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include
<QtGui/QImage>
#include
<QtGui/QImage>
SnapshotTaker
::
SnapshotTaker
(
const
Q
String
&
url
,
QObject
*
parent
)
SnapshotTaker
::
SnapshotTaker
(
const
Q
Url
&
url
,
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
,
m_player
(
new
Phonon
::
VideoPlayer
(
Phonon
::
NoCategory
,
0
)
)
,
m_player
(
new
Phonon
::
VideoPlayer
(
Phonon
::
NoCategory
,
0
)
)
{
{
...
...
ui/snapshottaker.h
View file @
d8fdb149
...
@@ -21,7 +21,7 @@ class SnapshotTaker : public QObject
...
@@ -21,7 +21,7 @@ class SnapshotTaker : public QObject
Q_OBJECT
Q_OBJECT
public:
public:
SnapshotTaker
(
const
Q
String
&
url
,
QObject
*
parent
=
Q_NULLPTR
);
SnapshotTaker
(
const
Q
Url
&
url
,
QObject
*
parent
=
Q_NULLPTR
);
~
SnapshotTaker
();
~
SnapshotTaker
();
Q_SIGNALS:
Q_SIGNALS:
...
...
ui/videowidget.cpp
View file @
d8fdb149
...
@@ -119,7 +119,7 @@ void VideoWidget::Private::load()
...
@@ -119,7 +119,7 @@ void VideoWidget::Private::load()
newurl
=
QUrl
::
fromLocalFile
(
url
);
newurl
=
QUrl
::
fromLocalFile
(
url
);
}
}
if
(
newurl
.
isLocalFile
()
)
if
(
newurl
.
isLocalFile
()
)
player
->
load
(
newurl
.
toLocalFile
()
);
player
->
load
(
newurl
);
else
else
player
->
load
(
newurl
);
player
->
load
(
newurl
);
...
@@ -159,9 +159,9 @@ void VideoWidget::Private::takeSnapshot()
...
@@ -159,9 +159,9 @@ void VideoWidget::Private::takeSnapshot()
SnapshotTaker
*
taker
=
0
;
SnapshotTaker
*
taker
=
0
;
if
(
newurl
.
isLocalFile
()
)
if
(
newurl
.
isLocalFile
()
)
taker
=
new
SnapshotTaker
(
newurl
.
toLocalFile
()
,
q
);
taker
=
new
SnapshotTaker
(
newurl
,
q
);
else
else
taker
=
new
SnapshotTaker
(
newurl
.
url
()
,
q
);
taker
=
new
SnapshotTaker
(
newurl
,
q
);
q
->
connect
(
taker
,
SIGNAL
(
finished
(
const
QImage
&
)
),
q
,
SLOT
(
setPosterImage
(
const
QImage
&
)
)
);
q
->
connect
(
taker
,
SIGNAL
(
finished
(
const
QImage
&
)
),
q
,
SLOT
(
setPosterImage
(
const
QImage
&
)
)
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment