[poppler] qt4/tests

Pino Toscano pino at kemper.freedesktop.org
Mon Jan 4 05:18:17 PST 2010


 qt4/tests/stress-poppler-dir.cpp |    3 ++-
 qt4/tests/stress-poppler-qt4.cpp |    3 ++-
 qt4/tests/test-password-qt4.cpp  |    4 +++-
 qt4/tests/test-poppler-qt4.cpp   |    4 +++-
 4 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit f9accdb878b23ebd2152dd05d61cfcc71d46cd03
Author: Pino Toscano <pino at kde.org>
Date:   Mon Jan 4 14:13:13 2010 +0100

    [Qt4/tests] use getPdfVersion() instead of the deprecated pdfVersion()

diff --git a/qt4/tests/stress-poppler-dir.cpp b/qt4/tests/stress-poppler-dir.cpp
index 1ec7ec3..6eeab6f 100644
--- a/qt4/tests/stress-poppler-dir.cpp
+++ b/qt4/tests/stress-poppler-dir.cpp
@@ -28,7 +28,8 @@ int main( int argc, char **argv )
 		    delete doc;
 		}
 	    } else {
-		doc->pdfVersion();
+		int major = 0, minor = 0;
+		doc->getPdfVersion( &major, &minor );
 		doc->info("Title");
 		doc->info("Subject");
 		doc->info("Author");
diff --git a/qt4/tests/stress-poppler-qt4.cpp b/qt4/tests/stress-poppler-qt4.cpp
index 7fedae2..5684454 100644
--- a/qt4/tests/stress-poppler-qt4.cpp
+++ b/qt4/tests/stress-poppler-qt4.cpp
@@ -35,7 +35,8 @@ int main( int argc, char **argv )
 	    if (!doc) {
 		qWarning() << "doc not loaded";
 	    } else {
-		doc->pdfVersion();
+		int major = 0, minor = 0;
+		doc->getPdfVersion( &major, &minor );
 		doc->info("Title");
 		doc->info("Subject");
 		doc->info("Author");
diff --git a/qt4/tests/test-password-qt4.cpp b/qt4/tests/test-password-qt4.cpp
index abc2f4f..c961874 100644
--- a/qt4/tests/test-password-qt4.cpp
+++ b/qt4/tests/test-password-qt4.cpp
@@ -101,7 +101,9 @@ int main( int argc, char **argv )
     }
   
     // output some meta-data
-    qDebug() << "    PDF Version: " << doc->pdfVersion();
+    int major = 0, minor = 0;
+    doc->getPdfVersion( &major, &minor );
+    qDebug() << "    PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor));
     qDebug() << "          Title: " << doc->info("Title");
     qDebug() << "        Subject: " << doc->info("Subject");
     qDebug() << "         Author: " << doc->info("Author");
diff --git a/qt4/tests/test-poppler-qt4.cpp b/qt4/tests/test-poppler-qt4.cpp
index 1726bfd..2f0f924 100644
--- a/qt4/tests/test-poppler-qt4.cpp
+++ b/qt4/tests/test-poppler-qt4.cpp
@@ -166,7 +166,9 @@ int main( int argc, char **argv )
     }
   
     // output some meta-data
-    qDebug() << "    PDF Version: " << doc->pdfVersion();
+    int major = 0, minor = 0;
+    doc->getPdfVersion( &major, &minor );
+    qDebug() << "    PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor));
     qDebug() << "          Title: " << doc->info("Title");
     qDebug() << "        Subject: " << doc->info("Subject");
     qDebug() << "         Author: " << doc->info("Author");


More information about the poppler mailing list