~mutse-young/ubuntu-docviewer-app/trunk

« back to all changes in this revision

Viewing changes to src/app/main.cpp

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2015-02-04 15:37:54 UTC
  • mfrom: (63.2.15 20-enable-zoom)
  • Revision ID: tarmac-20150204153754-1jrf9jzk34t9g3ho
Enable zoom in PDF view & multithreading support. Fixes: https://bugs.launchpad.net/bugs/1399978.

Approved by Ubuntu Phone Apps Jenkins Bot, Riccardo Padovani.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 *          Stefano Verzegnassi <stefano92.100@gmail.com>
23
23
 */
24
24
 
 
25
// Uncomment if you need to use QML analyzer
 
26
// #define QT_QML_DEBUG
 
27
 
25
28
#include <QtGui/QGuiApplication>
26
29
#include <QtQuick/QQuickView>
27
30
#include <QtQml/QtQml>
36
39
    QQuickView view;
37
40
    view.setResizeMode(QQuickView::SizeRootObjectToView);
38
41
 
 
42
    view.setPersistentOpenGLContext(false);
 
43
    view.setPersistentSceneGraph(false);
 
44
    view.engine()->rootContext()->setContextProperty("QQuickView", &view);
 
45
 
39
46
    // Set up import paths
40
47
    QStringList importPathList = view.engine()->importPathList();
41
48
    // Prepend the location of the plugin in the build dir,