X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git;a=blobdiff_plain;f=sample-qml%2Fmain.cpp;h=670decc5d953459745d30ccd0a71a1fdbccf1108;hp=9238a9bf09b584f2f0d4961cb8560401e0defd03;hb=346d1b3492fcbc26e7bff085b5d480fd7a627911;hpb=6130b67afe48de7eb0e4594d3210963b88e93fe5 diff --git a/sample-qml/main.cpp b/sample-qml/main.cpp index 9238a9b..670decc 100644 --- a/sample-qml/main.cpp +++ b/sample-qml/main.cpp @@ -30,22 +30,10 @@ int main(int argc, char *argv[]) enabled = mp_libHomeScreen->renderAppToAreaAllowed(appcategory, FULLSCREEN); if(enabled) { - QString target(getenv("AFM_APP_INSTALL_DIR")); - qDebug("AFM_APP_INSTALL_DIR is " + target.toLatin1()); + engine.addImportPath(QStringLiteral(":/imports")); + engine.addImportPath(QStringLiteral(":/dummyimports")); - if(NULL == target) - { - target = "."; - } - - QString load_path; - load_path = target + "/imports"; - engine.addImportPath(load_path); - load_path = target + "/dummyimports"; - engine.addImportPath(load_path); - load_path = target + "/main.qml"; - - engine.load(QUrl(load_path)); + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); std::vector surfaceIdList; int pid = getpid();