summaryrefslogtreecommitdiff
path: root/office/texstudio/phonon-fix.patch
blob: 867759f34ecb2b09751ac687c9ece68cc11cf4f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/pdfviewer/PDFDocument.cpp
+++ b/pdfviewer/PDFDocument.cpp
@@ -360,7 +360,7 @@
 }
 
 #ifdef PHONON
-PDFMovie::PDFMovie(PDFWidget *parent, Poppler::MovieAnnotation *annot, int page): VideoPlayer(parent), page(page)
+PDFMovie::PDFMovie(PDFWidget *parent, QSharedPointer<Poppler::MovieAnnotation> annot, int page): VideoPlayer(parent), page(page)
 {
 	REQUIRE(parent && annot && parent->getPDFDocument());
 	REQUIRE(annot->subType() == Poppler::Annotation::AMovie);
@@ -862,7 +862,7 @@
 	case Poppler::Annotation::AMovie: {
 #ifdef PHONON
 		if (movie) delete movie;
-		movie = new PDFMovie(this, dynamic_cast<Poppler::MovieAnnotation *>(annotation), page);
+		movie = new PDFMovie(this, qSharedPointerDynamicCast<Poppler::MovieAnnotation>(annotation), page);
 		movie->place();
 		movie->show();
 		movie->play();
--- a/pdfviewer/PDFDocument.h
+++ b/pdfviewer/PDFDocument.h
@@ -104,7 +104,7 @@
 {
 	Q_OBJECT
 public:
-	PDFMovie(PDFWidget *parent, Poppler::MovieAnnotation *annot, int page);
+	PDFMovie(PDFWidget *parent, QSharedPointer<Poppler::MovieAnnotation> annot, int page);
 	void place();
 protected:
 	void contextMenuEvent(QContextMenuEvent *);