aboutsummaryrefslogtreecommitdiff
path: root/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'office/texstudio/texstudio-2.6.4-phonon-build-fix.patch')
-rw-r--r--office/texstudio/texstudio-2.6.4-phonon-build-fix.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch b/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
new file mode 100644
index 0000000000000..2dea40f603dfc
--- /dev/null
+++ b/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
@@ -0,0 +1,51 @@
+--- a/PDFDocument.cpp
++++ b/PDFDocument.cpp
+@@ -781,19 +781,17 @@
+ event->accept();
+ }
+
+-void PDFWidget::annotationClicked(Poppler::Annotation *annotation, const QPointF &scaledPos) {
++void PDFWidget::annotationClicked(Poppler::Annotation *annotation, int page) {
+ switch (annotation->subType()) {
+ case Poppler::Annotation::AMovie: {
+ #ifdef PHONON
+- if (page > -1 && clickedAnnotation->boundary().contains(scaledPos) ) {
+- if (movie) delete movie;
+- movie = new PDFMovie(this, dynamic_cast<Poppler::MovieAnnotation*>(clickedAnnotation), page);
+- movie->place();
+- movie->show();
+- movie->play();
+- }
++ if (movie) delete movie;
++ movie = new PDFMovie(this, dynamic_cast<Poppler::MovieAnnotation*>(annotation), page);
++ movie->place();
++ movie->show();
++ movie->play();
+ #else
+- Q_UNUSED(scaledPos)
++ Q_UNUSED(page)
+ txsWarning("You clicked on a video, but the video playing mode was disabled by you or the package creator.\nRecompile TeXstudio with the option PHONON=true");
+ #endif
+ break;
+@@ -826,7 +824,9 @@
+ int page;
+ QPointF scaledPos;
+ mapToScaledPosition(event->pos(), page, scaledPos);
+- annotationClicked(clickedAnnotation, scaledPos);
++ if (page > -1 && clickedAnnotation->boundary().contains(scaledPos)) {
++ annotationClicked(clickedAnnotation, page);
++ }
+ } else if (currentTool == kPresentation) {
+ if (event->button() == Qt::LeftButton) goNext();
+ else if (event->button() == Qt::RightButton) goPrev();
+--- a/PDFDocument.h
++++ b/PDFDocument.h
+@@ -237,7 +237,7 @@
+ void useMagnifier(const QMouseEvent *inEvent);
+ void goToDestination(const Poppler::LinkDestination& dest);
+ void doLink(const Poppler::Link *link);
+- void annotationClicked(Poppler::Annotation *annotation, const QPointF &scaledPos);
++ void annotationClicked(Poppler::Annotation *annotation, int page);
+ void doZoom(const QPoint& clickPos, int dir, qreal newScaleFactor=1.0);
+
+ PDFScrollArea* getScrollArea();