49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
|
#fixing the dynamic_cast issue with patches provided by the texstudio author here:
|
||
|
# ) https://sourceforge.net/p/texstudio/bugs/1927/
|
||
|
# ) https://sourceforge.net/p/texstudio/hg/ci/5f9e814ad8f20c0e9653a49f793aad713628e66c/
|
||
|
# ) https://sourceforge.net/p/texstudio/hg/ci/5903721d443a01780dae861fa3cf6c05d67868f9/
|
||
|
|
||
|
--- pdfviewer/PDFDocument.h 2016-11-25 11:50:49.758719915 +0100
|
||
|
+++ pdfviewer/PDFDocument.h 2016-11-25 11:53:47.580496837 +0100
|
||
|
@@ -98,7 +98,7 @@
|
||
|
};
|
||
|
|
||
|
#ifdef PHONON
|
||
|
-#include <Phonon/VideoPlayer>
|
||
|
+#include <phonon/VideoPlayer>
|
||
|
|
||
|
class PDFMovie: public Phonon::VideoPlayer
|
||
|
{
|
||
|
@@ -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 *);
|
||
|
|
||
|
|
||
|
--- pdfviewer/PDFDocument.cpp 2016-10-11 22:02:43.000000000 +0200
|
||
|
+++ pdfviewer/PDFDocument.cpp 2016-11-25 11:51:06.366512289 +0100
|
||
|
@@ -359,7 +359,8 @@
|
||
|
}
|
||
|
|
||
|
#ifdef PHONON
|
||
|
-PDFMovie::PDFMovie(PDFWidget *parent, Poppler::MovieAnnotation *annot, int page): VideoPlayer(parent), page(page)
|
||
|
+//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);
|
||
|
@@ -861,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();
|