[poppler] poppler/qt4/tests: test-poppler-qt4.cpp,1.6,1.7
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat May 13 08:58:41 PDT 2006
Update of /cvs/poppler/poppler/qt4/tests
In directory kemper:/tmp/cvs-serv23092/qt4/tests
Modified Files:
test-poppler-qt4.cpp
Log Message:
* qt4/src/poppler-document.cc: leak--
* qt4/src/poppler-private.h: Refcount globalparams
* qt4/tests/test-poppler-qt4.cpp: Some leaks less
Index: test-poppler-qt4.cpp
===================================================================
RCS file: /cvs/poppler/poppler/qt4/tests/test-poppler-qt4.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test-poppler-qt4.cpp 10 Dec 2005 10:52:16 -0000 1.6
+++ test-poppler-qt4.cpp 13 May 2006 15:58:39 -0000 1.7
@@ -25,6 +25,7 @@
PDFDisplay::PDFDisplay( Poppler::Document *d, bool arthur )
{
doc = d;
+ pixmap = 0;
m_currentPage = 0;
useArthur = arthur;
display();
@@ -35,16 +36,16 @@
if (doc) {
Poppler::Page *page = doc->page(m_currentPage);
if (page) {
- pixmap = new QPixmap(page->pageSize());
if (useArthur)
{
qDebug() << "Displaying page using Arthur backend: " << m_currentPage;
+ pixmap = new QPixmap(page->pageSize());
page->renderToPixmap(pixmap, 72.0, 72.0);
}
else
{
qDebug() << "Displaying page using Splash backend: " << m_currentPage;
- delete pixmap;
+ delete pixmap;
pixmap = page->splashRenderToPixmap();
}
update();
@@ -140,6 +141,7 @@
Poppler::Page *page = doc->page(0);
qDebug() << " Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches";
+ delete page;
if (argc == 2 || (argc == 3 && strcmp(argv[2], "-arthur") == 0))
{
More information about the poppler
mailing list