Code Review
/
apps
/
onscreenapp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
change qml folder to
[apps/onscreenapp.git]
/
sample
/
app
/
main.cpp
diff --git
a/sample/app/main.cpp
b/sample/app/main.cpp
index
69642dc
..
399a5c9
100644
(file)
--- a/
sample/app/main.cpp
+++ b/
sample/app/main.cpp
@@
-21,7
+21,6
@@
#include <QtQml/QQmlApplicationEngine>
#include <QtQuickControls2/QQuickStyle>
#include <QtQuick/QQuickWindow>
#include <QtQml/QQmlApplicationEngine>
#include <QtQuickControls2/QQuickStyle>
#include <QtQuick/QQuickWindow>
-#include <QtCore/QDir>
#include "eventhandler.h"
#include "eventhandler.h"
@@
-57,18
+56,12
@@
int main(int argc, char *argv[])
EventHandler *eventHandler = new EventHandler();
eventHandler->init(port, secret.toStdString().c_str());
engine.rootContext()->setContextProperty("eventHandler", eventHandler);
EventHandler *eventHandler = new EventHandler();
eventHandler->init(port, secret.toStdString().c_str());
engine.rootContext()->setContextProperty("eventHandler", eventHandler);
- QString qmldir = QCoreApplication::applicationDirPath();
- qmldir.replace(QString("bin"), QString("qml"));
- qmldir.append('/');
- qDebug() << "####qmldir=" << qmldir;
- engine.rootContext()->setContextProperty("qmldir", qmldir);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty()) {
HMI_DEBUG(APP_ID, "Fatal Error, rootObject is empty!");
return -1;
}
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty()) {
HMI_DEBUG(APP_ID, "Fatal Error, rootObject is empty!");
return -1;
}
- qDebug() << "####" << QDir::currentPath() << QCoreApplication::applicationDirPath();
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
QObject *root = engine.rootObjects().first();
QQuickWindow *window = qobject_cast<QQuickWindow *>(root);