[poppler] poppler/qt4/tests: test-poppler-qt4.cpp,1.8,1.9

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Jan 31 14:05:11 PST 2007


Update of /cvs/poppler/poppler/qt4/tests
In directory kemper:/tmp/cvs-serv22901/qt4/tests

Modified Files:
	test-poppler-qt4.cpp 
Log Message:
* qt4/src/poppler-page.cc:
  Patch by Pino Toscano <pino at kde.org> to remove a nonsense done by him.

* qt4/tests/test-poppler-qt4.cpp:
  Simply a bit. Patch by Pino Toscano <pino at kde.org>.


Index: test-poppler-qt4.cpp
===================================================================
RCS file: /cvs/poppler/poppler/qt4/tests/test-poppler-qt4.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- test-poppler-qt4.cpp	15 Nov 2006 21:07:50 -0000	1.8
+++ test-poppler-qt4.cpp	31 Jan 2007 22:05:09 -0000	1.9
@@ -19,14 +19,23 @@
     int m_currentPage;
     QImage image;
     Poppler::Document *doc;
-    bool useArthur;
+    QString backendString;
 };
 
 PDFDisplay::PDFDisplay( Poppler::Document *d, bool arthur )
 {
     doc = d;
     m_currentPage = 0;
-    useArthur = arthur;
+    if (arthur)
+    {
+        backendString = "Arthur";
+        doc->setRenderBackend(Poppler::Document::ArthurBackend);
+    }
+    else
+    {
+        backendString = "Splash";
+        doc->setRenderBackend(Poppler::Document::SplashBackend);
+    }
     display();
 }
 
@@ -35,16 +44,7 @@
     if (doc) {
         Poppler::Page *page = doc->page(m_currentPage);
         if (page) {
-            if (useArthur)
-            {
-                qDebug() << "Displaying page using Arthur backend: " << m_currentPage;
-                doc->setRenderBackend(Poppler::Document::ArthurBackend);
-            }
-            else
-            {
-                qDebug() << "Displaying page using Splash backend: " << m_currentPage;
-                doc->setRenderBackend(Poppler::Document::SplashBackend);
-            }
+            qDebug() << "Displaying page using" << backendString << "backend: " << m_currentPage;
             image = page->renderToImage();
             update();
             delete page;



More information about the poppler mailing list