diff options
author | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2018-12-06 17:03:23 +0800 |
---|---|---|
committer | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2018-12-06 17:03:23 +0800 |
commit | fe3d069d19d4c11c9d905da1d4412a77295a438d (patch) | |
tree | cbd0cf819a1f688e035f752c4aeda213a9ddab9f /app/eventhandler.cpp | |
parent | f42ae47fe425b8ef353ec72ff9edaff451206cb8 (diff) |
modify onscreen qml file directorysandbox/wangzhiqiang/ons_dev
Diffstat (limited to 'app/eventhandler.cpp')
-rw-r--r-- | app/eventhandler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/eventhandler.cpp b/app/eventhandler.cpp index 39db933..d76fcbe 100644 --- a/app/eventhandler.cpp +++ b/app/eventhandler.cpp @@ -37,6 +37,7 @@ const char _button_press_mode[] = "buttonPressMode"; const char _button_press_state[] = "buttonPressState"; const char _drawing_name[] = "drawing_name"; const char _application_id[] = "application_id"; +const char _onscreen_directory[] = "/usr/lib/qt5/qml/AGL/OnScreen/"; void* EventHandler::myThis = 0; @@ -89,8 +90,9 @@ void EventHandler::init(int port, const char *token) return; } - QFileInfo file_info(file); - if(!file_info.isFile() || !QString(file).contains(QString(_suffix), Qt::CaseSensitive)) { + QString qml_file = QString(_onscreen_directory) + file; + QFileInfo file_info(qml_file); + if(!file_info.isFile() || !qml_file.contains(QString(_suffix), Qt::CaseSensitive)) { HMI_DEBUG(APP_ID, "received qml file error! file=%s.", file); return; } @@ -116,10 +118,10 @@ void EventHandler::init(int port, const char *token) m_dspreq = QString(replyto); if(m_req.contains(m_dspreq)) { - m_req[m_dspreq] = qMakePair(QString(file), QString(data)); + m_req[m_dspreq] = qMakePair(qml_file, QString(data)); } else - m_req.insert(QString(m_dspreq), qMakePair(QString(file), QString(data))); + m_req.insert(QString(m_dspreq), qMakePair(qml_file, QString(data))); if(area == nullptr) this->activateWindow(ROLE_NAME); |