[poppler] poppler/qt4/tests: stress-poppler-qt4.cpp, 1.1, 1.2 test-poppler-qt4.cpp, 1.1, 1.2

Brad Hards bradh at freedesktop.org
Mon Jul 4 01:18:54 PDT 2005


Update of /cvs/poppler/poppler/qt4/tests
In directory gabe:/tmp/cvs-serv10495

Modified Files:
	stress-poppler-qt4.cpp test-poppler-qt4.cpp 
Log Message:
Update to reflect changes to rendering API.


Index: stress-poppler-qt4.cpp
===================================================================
RCS file: /cvs/poppler/poppler/qt4/tests/stress-poppler-qt4.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- stress-poppler-qt4.cpp	28 Jun 2005 10:00:09 -0000	1.1
+++ stress-poppler-qt4.cpp	4 Jul 2005 08:18:52 -0000	1.2
@@ -51,10 +51,10 @@
 		doc->okToAddNotes();
 		doc->pageMode();
 
-		QPixmap *pixmap = new QPixmap;
 		for( int index = 0; index < doc->numPages(); ++index ) {
 		    Poppler::Page *page = doc->page( index );
-		    page->renderToPixmap(&pixmap, page->pageSize());
+		    QPixmap *pixmap = new QPixmap(page->pageSize());
+		    page->renderToPixmap(pixmap);
 		    page->pageSize();
 		    page->orientation();
 		    std::cout << ".";

Index: test-poppler-qt4.cpp
===================================================================
RCS file: /cvs/poppler/poppler/qt4/tests/test-poppler-qt4.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test-poppler-qt4.cpp	28 Jun 2005 10:00:09 -0000	1.1
+++ test-poppler-qt4.cpp	4 Jul 2005 08:18:52 -0000	1.2
@@ -24,7 +24,8 @@
     if (doc) {
 	Poppler::Page *page = doc->page("1");
 	if (page) {
-	    page->renderToPixmap(&pixmap, page->pageSize());
+	    pixmap = new QPixmap(page->pageSize());
+	    page->renderToPixmap(pixmap);
 	    delete page;
 	}
     } else {



More information about the poppler mailing list