1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#include "commandlinereceiver.h"
6#include "commandexecuter.h"
7
8#include "services/project/projectinfo.h"
9#include "services/project/projectservice.h"
10#include "services/window/windowelement.h"
11#include "services/project/projectgenerator.h"
12#include "services/builder/builderglobals.h"
13#include "common/common.h"
14
15CommandLineReceiver::CommandLineReceiver(QObject *parent)
16 : dpf::EventHandler (parent)
17 , dpf::AutoEventHandlerRegister<CommandLineReceiver> ()
18{
19
20}
21
22dpf::EventHandler::Type CommandLineReceiver::type()
23{
24 return dpf::EventHandler::Type::Sync;
25}
26
27QStringList CommandLineReceiver::topics()
28{
29 return {commandLine.topic, commandLine.topic};
30}
31
32void CommandLineReceiver::eventProcess(const dpf::Event &event)
33{
34 if (event.data() == commandLine.build.name) {
35 CommandExecuter::instance().buildProject();
36 }
37}
38