From 769919d746cdc5a51620c2a6ce4f0b8a46102394 Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Sun, 28 Apr 2024 17:26:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(data-collect):=E8=A1=A5=E5=85=85AI=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=9A=84=E6=95=B0=E6=8D=AE=E5=9F=8B=E7=82=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/aisearch/ai-search-plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libsearch/aisearch/ai-search-plugin.cpp b/libsearch/aisearch/ai-search-plugin.cpp index 39b464a..26889a1 100644 --- a/libsearch/aisearch/ai-search-plugin.cpp +++ b/libsearch/aisearch/ai-search-plugin.cpp @@ -23,6 +23,7 @@ #include "file-utils.h" #include "thumbnail-creator.h" #include "file-indexer-config.h" +#include "data-collecter.h" #include #include #include @@ -107,6 +108,7 @@ void AiSearchPlugin::openAction(int actionkey, QString key, int type) //TODO add some return message here. switch (actionkey) { case 0: + DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFile")); if(FileUtils::openFile(key) == -1) { QMessageBox msgBox(m_detailPage); msgBox.setModal(true); @@ -117,9 +119,11 @@ void AiSearchPlugin::openAction(int actionkey, QString key, int type) } break; case 1: + DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFileInDir")); FileUtils::openFile(key, true); break; case 2: + DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("copyPath")); FileUtils::copyPath(key); default: break; @@ -237,6 +241,7 @@ void AiSearchPlugin::initDetailPage() m_detailLyt->addStretch(); connect(m_actionLabel1, &ActionLabel::actionTriggered, [ & ](){ + DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFile")); if(FileUtils::openFile(m_currentActionKey) == -1) { QMessageBox msgBox(m_detailPage); msgBox.setModal(true); @@ -247,9 +252,11 @@ void AiSearchPlugin::initDetailPage() } }); connect(m_actionLabel2, &ActionLabel::actionTriggered, [ & ](){ + DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFileInDir")); FileUtils::openFile(m_currentActionKey, true); }); connect(m_actionLabel3, &ActionLabel::actionTriggered, [ & ](){ + DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("copyPath")); FileUtils::copyPath(m_currentActionKey); }); }