#include #include #include #include "xhr.h" #include "filesystem.h" //#include "qadrawableprovider.h" //#include "androidnative.pri/cpp/AndroidNative/systemdispatcher.h" #include "AndroidNative/systemdispatcher.h" #include "AndroidNative/environment.h" #include "AndroidNative/debug.h" #include "AndroidNative/mediascannerconnection.h" //#include "debugwrapper.h" #ifdef Q_OS_ANDROID #include #include JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) { Q_UNUSED(vm); qDebug("NativeInterface::JNI_OnLoad()"); // It must call this function within JNI_OnLoad to enable System Dispatcher AndroidNative::SystemDispatcher::registerNatives(); return JNI_VERSION_1_6; } #endif int main(int argc, char *argv[]) { QApplication app(argc, argv); QQuickView view; QTranslator qtTranslator; qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"); app.installTranslator(&qtTranslator); // qmlRegisterType("SystemDispatcher", 0, 1, "SystemDispatcher"); XHR* xhr = XHR::instance(); view.rootContext()->setContextProperty("xhr", xhr); FILESYSTEM* filesystem = FILESYSTEM::instance(); view.rootContext()->setContextProperty("filesystem", filesystem); view.setSource(QUrl("qrc:/qml/friendiqa.qml")); view.show(); view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit())); return app.exec(); }