fix(data-collect):修复埋点数据上传失败的问题
This commit is contained in:
parent
2cb7f2a378
commit
2e372c14eb
|
@ -23,11 +23,11 @@
|
||||||
void DataCollecter::collectLaunchEvent(const QString &plugin, const QString &button)
|
void DataCollecter::collectLaunchEvent(const QString &plugin, const QString &button)
|
||||||
{
|
{
|
||||||
KCustomProperty *property = new KCustomProperty;
|
KCustomProperty *property = new KCustomProperty;
|
||||||
property->key = strdup(plugin.toLocal8Bit().data());
|
property->key = strdup(QStringLiteral("pluginName").toLocal8Bit().data());
|
||||||
property->value = strdup(button.toLocal8Bit().data());
|
property->value = strdup(button.toLocal8Bit().data());
|
||||||
KTrackData *node = kdk_dia_data_init(KEVENTSOURCE_DESKTOP,KEVENT_CLICK);
|
KTrackData *node = kdk_dia_data_init(KEVENTSOURCE_DESKTOP,KEVENT_CLICK);
|
||||||
kdk_dia_append_custom_property(node,property,1);
|
kdk_dia_append_custom_property(node,property,1);
|
||||||
kdk_dia_upload_default(node, strdup(QStringLiteral("launch").toLocal8Bit().data()), strdup(plugin.toLocal8Bit().data()));
|
kdk_dia_upload_default(node, strdup(QStringLiteral("search_plugin_launch_event").toLocal8Bit().data()), strdup(plugin.toLocal8Bit().data()));
|
||||||
kdk_dia_data_free(node);
|
kdk_dia_data_free(node);
|
||||||
free(property->key);
|
free(property->key);
|
||||||
free(property->value);
|
free(property->value);
|
||||||
|
|
|
@ -138,7 +138,7 @@ int FileUtils::openFile(QString &path, bool openInDir)
|
||||||
"ShowItems");
|
"ShowItems");
|
||||||
message.setArguments({list, "ukui-search"});
|
message.setArguments({list, "ukui-search"});
|
||||||
QDBusMessage messageRes = QDBusConnection::sessionBus().call(message);
|
QDBusMessage messageRes = QDBusConnection::sessionBus().call(message);
|
||||||
if (QDBusMessage::ReplyMessage == messageRes.ReplyMessage) {
|
if (QDBusMessage::ReplyMessage == messageRes.type()) {
|
||||||
res = 0;
|
res = 0;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Error! QDBusMessage reply error! ReplyMessage:" << messageRes.ReplyMessage;
|
qDebug() << "Error! QDBusMessage reply error! ReplyMessage:" << messageRes.ReplyMessage;
|
||||||
|
|
Loading…
Reference in New Issue