From 7c8907060f7da556a3e398b871838b3b7cc93a3b Mon Sep 17 00:00:00 2001 From: zynfly Date: Thu, 16 Dec 2021 22:42:59 +0800 Subject: [PATCH] add setting --- CMakeLists.txt | 5 ++++- ServiceStatus.rep | 4 ++++ main.cpp | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 ServiceStatus.rep diff --git a/CMakeLists.txt b/CMakeLists.txt index a965ab5..fe64fd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,10 @@ find_package(Qt5 COMPONENTS ${QT_LIBS} REQUIRED) -add_executable(${PROJECT_NAME} main.cpp) +set(QT_REGISTRY_SRCS main.cpp) +qt_generate_repc(QT_REGISTRY_SRCS ServiceStatus.rep SOURCE) + +add_executable(${PROJECT_NAME} ${QT_REGISTRY_SRCS}) target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::RemoteObjects diff --git a/ServiceStatus.rep b/ServiceStatus.rep new file mode 100644 index 0000000..940cccd --- /dev/null +++ b/ServiceStatus.rep @@ -0,0 +1,4 @@ +class ServiceStatus{ + MODEL StatusModel(name, status, latestUpdateTime); + SLOT(void update(QString appName)); +} \ No newline at end of file diff --git a/main.cpp b/main.cpp index e870961..5036662 100644 --- a/main.cpp +++ b/main.cpp @@ -6,5 +6,6 @@ int main(int argc, char *argv[]) { QRemoteObjectRegistryHost registryHost(QUrl("tcp://*:7478")); + return QCoreApplication::exec(); }