qmlFrontend/main.cpp
branchqmlfrontend
changeset 10436 084e046f6bd5
parent 10420 02c573d19224
child 10886 99273b7afbff
equal deleted inserted replaced
10434:1614b13ad35e 10436:084e046f6bd5
     2 #include <QQmlEngine>
     2 #include <QQmlEngine>
     3 
     3 
     4 #include "qtquick2applicationviewer/qtquick2applicationviewer.h"
     4 #include "qtquick2applicationviewer/qtquick2applicationviewer.h"
     5 #include "hwengine.h"
     5 #include "hwengine.h"
     6 #include "previewimageprovider.h"
     6 #include "previewimageprovider.h"
       
     7 #include "themeiconprovider.h"
     7 
     8 
     8 
     9 
     9 int main(int argc, char *argv[])
    10 int main(int argc, char *argv[])
    10 {
    11 {
    11     QGuiApplication app(argc, argv);
    12     QGuiApplication app(argc, argv);
    13     HWEngine::exposeToQML();
    14     HWEngine::exposeToQML();
    14 
    15 
    15     QtQuick2ApplicationViewer viewer;
    16     QtQuick2ApplicationViewer viewer;
    16 
    17 
    17     viewer.engine()->addImageProvider(QLatin1String("preview"), new PreviewImageProvider());
    18     viewer.engine()->addImageProvider(QLatin1String("preview"), new PreviewImageProvider());
       
    19     viewer.engine()->addImageProvider(QLatin1String("theme"), new ThemeIconProvider());
    18 
    20 
    19     viewer.setMainQmlFile(QStringLiteral("qml/qmlFrontend/main.qml"));
    21     viewer.setMainQmlFile(QStringLiteral("qml/qmlFrontend/main.qml"));
    20     viewer.showExpanded();
    22     viewer.showExpanded();
    21 
    23 
    22     return app.exec();
    24     return app.exec();