fix(data-collect):补充AI搜索的数据埋点.
This commit is contained in:
parent
bbd70d7508
commit
769919d746
|
@ -23,6 +23,7 @@
|
||||||
#include "file-utils.h"
|
#include "file-utils.h"
|
||||||
#include "thumbnail-creator.h"
|
#include "thumbnail-creator.h"
|
||||||
#include "file-indexer-config.h"
|
#include "file-indexer-config.h"
|
||||||
|
#include "data-collecter.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
@ -107,6 +108,7 @@ void AiSearchPlugin::openAction(int actionkey, QString key, int type)
|
||||||
//TODO add some return message here.
|
//TODO add some return message here.
|
||||||
switch (actionkey) {
|
switch (actionkey) {
|
||||||
case 0:
|
case 0:
|
||||||
|
DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFile"));
|
||||||
if(FileUtils::openFile(key) == -1) {
|
if(FileUtils::openFile(key) == -1) {
|
||||||
QMessageBox msgBox(m_detailPage);
|
QMessageBox msgBox(m_detailPage);
|
||||||
msgBox.setModal(true);
|
msgBox.setModal(true);
|
||||||
|
@ -117,9 +119,11 @@ void AiSearchPlugin::openAction(int actionkey, QString key, int type)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFileInDir"));
|
||||||
FileUtils::openFile(key, true);
|
FileUtils::openFile(key, true);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("copyPath"));
|
||||||
FileUtils::copyPath(key);
|
FileUtils::copyPath(key);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -237,6 +241,7 @@ void AiSearchPlugin::initDetailPage()
|
||||||
m_detailLyt->addStretch();
|
m_detailLyt->addStretch();
|
||||||
|
|
||||||
connect(m_actionLabel1, &ActionLabel::actionTriggered, [ & ](){
|
connect(m_actionLabel1, &ActionLabel::actionTriggered, [ & ](){
|
||||||
|
DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFile"));
|
||||||
if(FileUtils::openFile(m_currentActionKey) == -1) {
|
if(FileUtils::openFile(m_currentActionKey) == -1) {
|
||||||
QMessageBox msgBox(m_detailPage);
|
QMessageBox msgBox(m_detailPage);
|
||||||
msgBox.setModal(true);
|
msgBox.setModal(true);
|
||||||
|
@ -247,9 +252,11 @@ void AiSearchPlugin::initDetailPage()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_actionLabel2, &ActionLabel::actionTriggered, [ & ](){
|
connect(m_actionLabel2, &ActionLabel::actionTriggered, [ & ](){
|
||||||
|
DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("openFileInDir"));
|
||||||
FileUtils::openFile(m_currentActionKey, true);
|
FileUtils::openFile(m_currentActionKey, true);
|
||||||
});
|
});
|
||||||
connect(m_actionLabel3, &ActionLabel::actionTriggered, [ & ](){
|
connect(m_actionLabel3, &ActionLabel::actionTriggered, [ & ](){
|
||||||
|
DataCollecter::collectLaunchEvent(QStringLiteral("AISearch"), QStringLiteral("copyPath"));
|
||||||
FileUtils::copyPath(m_currentActionKey);
|
FileUtils::copyPath(m_currentActionKey);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue