Now In homescreen-service used application_id to identify
different application, so use appid instead of appname
in "tap_shortcut" parameter.
Bug-AGL: SPEC-1764
Change-Id: I2fdda76167c7af9af65b1135b838da1742515b8b
Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
ListModel {
id: applicationModel
ListElement {
+ appid: 'launcher'
name: 'launcher'
application: 'launcher@0.1'
}
ListElement {
+ appid: 'mediaplayer'
name: 'MediaPlayer'
application: 'mediaplayer@0.1'
}
ListElement {
+ appid: 'hvac'
name: 'HVAC'
application: 'hvac@0.1'
}
ListElement {
+ appid: 'navigation'
name: 'Navigation'
application: 'navigation@0.1'
}
console.warn(model.application)
console.warn("app cannot be launched!")
}
- homescreenHandler.tapShortcut(model.name)
+ homescreenHandler.tapShortcut(model.appid)
}
}
}
}
-void HomescreenHandler::tapShortcut(QString application_name)
+void HomescreenHandler::tapShortcut(QString application_id)
{
- HMI_DEBUG("HomeScreen","tapShortcut %s", application_name.toStdString().c_str());
- mp_hs->tapShortcut(application_name.toStdString().c_str());
+ HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str());
+ mp_hs->tapShortcut(application_id.toStdString().c_str());
}
void HomescreenHandler::onRep_static(struct json_object* reply_contents)
void init(int port, const char* token);
- Q_INVOKABLE void tapShortcut(QString application_name);
+ Q_INVOKABLE void tapShortcut(QString application_id);
void onRep(struct json_object* reply_contents);
void onEv(const string& event, struct json_object* event_contents);