| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | 
|---|---|
| 2 | // | 
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later | 
| 4 | |
| 5 | #include "sendevents.h" | 
| 6 | #include "framework.h" | 
| 7 | #include "common/common.h" | 
| 8 | |
| 9 | void SendEvents::buildProject(const QString &buildSystem, | 
| 10 | const QString &buildDir, | 
| 11 | const QString &buildFilePath, | 
| 12 | const QStringList &buildArgs) | 
| 13 | { | 
| 14 | dpf::Event event; | 
| 15 | event.setTopic(T_FILEBROWSER); | 
| 16 | event.setData(D_ITEM_MENU_BUILD); | 
| 17 | event.setProperty(P_BUILDSYSTEM, buildSystem); | 
| 18 | event.setProperty(P_BUILDDIRECTORY, buildDir); | 
| 19 | event.setProperty(P_BUILDFILEPATH, buildFilePath); | 
| 20 | event.setProperty(P_BUILDARGUMENTS, buildArgs); | 
| 21 | qInfo() << __FUNCTION__ << event; | 
| 22 | dpf::EventCallProxy::instance().pubEvent(event); | 
| 23 | } | 
| 24 | |
| 25 | void SendEvents::gengrateWorkspace(const QString &projectPath) | 
| 26 | { | 
| 27 | dpf::Event event; | 
| 28 | event.setTopic(T_FILEBROWSER); | 
| 29 | event.setData(D_ITEM_MENU_BUILD); | 
| 30 | event.setProperty(P_PROJECTPATH, projectPath); | 
| 31 | qInfo() << __FUNCTION__ << event; | 
| 32 | dpf::EventCallProxy::instance().pubEvent(event); | 
| 33 | } | 
| 34 |