[poppler] qt4/demos

Pino Toscano pino at kemper.freedesktop.org
Tue Dec 30 13:22:17 PST 2008


 qt4/demos/main_viewer.cpp |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 3c07c73e07a9cb59ee4c23ca60d2adce92de45f7
Author: Pino Toscano <pino at kde.org>
Date:   Tue Dec 30 22:21:27 2008 +0100

    [Qt4-demo] load a document when passed via command line

diff --git a/qt4/demos/main_viewer.cpp b/qt4/demos/main_viewer.cpp
index 724c4c3..3f7080f 100644
--- a/qt4/demos/main_viewer.cpp
+++ b/qt4/demos/main_viewer.cpp
@@ -23,7 +23,11 @@
 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
+    const QStringList args = QCoreApplication::arguments();
     PdfViewer *viewer = new PdfViewer();
     viewer->show();
+    if (args.count() > 1) {
+        viewer->loadDocument(args.at(1));
+    }
     return app.exec();
 }


More information about the poppler mailing list