fix(data-collect):解决埋点上传崩溃问题
This commit is contained in:
parent
f0a447c845
commit
bd9de3c541
|
@ -22,11 +22,14 @@
|
|||
|
||||
void DataCollecter::collectLaunchEvent(const QString &plugin, const QString &button)
|
||||
{
|
||||
KCustomProperty property[2];
|
||||
property[0].key = plugin.toLocal8Bit().data();
|
||||
property[0].value = button.toLocal8Bit().data();
|
||||
KCustomProperty *property = new KCustomProperty;
|
||||
property->key = strdup(plugin.toLocal8Bit().data());
|
||||
property->value = strdup(button.toLocal8Bit().data());
|
||||
KTrackData *node = kdk_dia_data_init(KEVENTSOURCE_DESKTOP,KEVENT_CLICK);
|
||||
kdk_dia_append_custom_property(node,property,1);
|
||||
kdk_dia_upload_default(node, QStringLiteral("launch").toLocal8Bit().data(), plugin.toLocal8Bit().data());
|
||||
kdk_dia_upload_default(node, strdup(QStringLiteral("launch").toLocal8Bit().data()), strdup(plugin.toLocal8Bit().data()));
|
||||
kdk_dia_data_free(node);
|
||||
free(property->key);
|
||||
free(property->value);
|
||||
delete property;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue