summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2013-04-07 17:44:12 +0200
committerAlbert Astals Cid <aacid@kde.org>2013-04-07 17:44:12 +0200
commitfcc14682899ff4981bfece74dbc8c290a625b05c (patch)
treebf6bc76b9ca096c09e70bc2637eb0f917dc8db87 /qt4
parentf11e21627121c3ff81c0ec7f4d71936a2dd590c3 (diff)
parente6559a0d836df127ed5061794dc737d435ef534c (diff)
Merge remote-tracking branch 'origin/poppler-0.22'
Diffstat (limited to 'qt4')
-rw-r--r--qt4/src/poppler-link.h6
-rw-r--r--qt4/src/poppler-media.cc6
-rw-r--r--qt4/src/poppler-media.h5
-rw-r--r--qt4/src/poppler-page.cc4
4 files changed, 15 insertions, 6 deletions
diff --git a/qt4/src/poppler-link.h b/qt4/src/poppler-link.h
index ef93bf09..2c4bb556 100644
--- a/qt4/src/poppler-link.h
+++ b/qt4/src/poppler-link.h
@@ -1,5 +1,5 @@
/* poppler-link.h: qt interface to poppler
- * Copyright (C) 2006, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2006, 2013, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2007-2008, 2010, Pino Toscano <pino@kde.org>
* Copyright (C) 2010, 2012, Guillermo Amaral <gamaral@kdab.com>
* Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com>
@@ -471,7 +471,7 @@ class POPPLER_QT4_EXPORT LinkRendition : public Link
* Create a new rendition link.
*
* \param linkArea the active area of the link
- * \param rendition the media rendition object
+ * \param rendition the media rendition object. Ownership is taken
*
* \deprecated Use the constructor that takes all parameter instead
*/
@@ -481,7 +481,7 @@ class POPPLER_QT4_EXPORT LinkRendition : public Link
* Create a new rendition link.
*
* \param linkArea the active area of the link
- * \param rendition the media rendition object
+ * \param rendition the media rendition object. Ownership is taken
* \param operation the numeric operation (action) (@see ::LinkRendition::RenditionOperation)
* \param script the java script code
* \param annotationReference the object reference of the screen annotation associated with this rendition action
diff --git a/qt4/src/poppler-media.cc b/qt4/src/poppler-media.cc
index c3181472..1757fdbb 100644
--- a/qt4/src/poppler-media.cc
+++ b/qt4/src/poppler-media.cc
@@ -1,5 +1,6 @@
/* poppler-media.cc: qt interface to poppler
* Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org>
+ * Copyright (C) 2013 Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,6 +38,11 @@ public:
: rendition(rendition)
{
}
+
+ ~MediaRenditionPrivate()
+ {
+ delete rendition;
+ }
::MediaRendition *rendition;
};
diff --git a/qt4/src/poppler-media.h b/qt4/src/poppler-media.h
index 64ec83c2..34e5c361 100644
--- a/qt4/src/poppler-media.h
+++ b/qt4/src/poppler-media.h
@@ -1,6 +1,6 @@
/* poppler-media.h: qt interface to poppler
* Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org>
- * Copyright (C) 2012 Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2012, 2013 Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -39,6 +39,9 @@ namespace Poppler
*/
class POPPLER_QT4_EXPORT MediaRendition {
public:
+ /**
+ Constructs a MediaRendition. Takes ownership of the passed rendition
+ */
MediaRendition(::MediaRendition *rendition);
~MediaRendition();
diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc
index b5f0a8a0..f7c24273 100644
--- a/qt4/src/poppler-page.cc
+++ b/qt4/src/poppler-page.cc
@@ -1,7 +1,7 @@
/* poppler-page.cc: qt interface to poppler
* Copyright (C) 2005, Net Integration Technologies, Inc.
* Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
- * Copyright (C) 2005-2012, Albert Astals Cid <aacid@kde.org>
+ * Copyright (C) 2005-2013, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
* Copyright (C) 2006-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
@@ -204,7 +204,7 @@ Link* PageData::convertLinkActionToLink(::LinkAction * a, DocumentData *parentDo
if ( lrn->hasScreenAnnot() )
reference = lrn->getScreenAnnot();
- popplerLink = new LinkRendition( linkArea, lrn->getMedia(), lrn->getOperation(), UnicodeParsedString( lrn->getScript() ), reference );
+ popplerLink = new LinkRendition( linkArea, lrn->getMedia()->copy(), lrn->getOperation(), UnicodeParsedString( lrn->getScript() ), reference );
}
break;