From 2d5d2c6c06feb868f8690235b0211037f80a216b Mon Sep 17 00:00:00 2001 From: James Graham Date: Tue, 15 Apr 2025 19:09:42 +0100 Subject: [PATCH] Move relevant models to devtools --- src/CMakeLists.txt | 10 ++-------- src/devtools/CMakeLists.txt | 14 ++++++++++++-- src/{ => devtools}/models/statefiltermodel.cpp | 0 src/{ => devtools}/models/statefiltermodel.h | 0 src/{ => devtools}/models/statekeysmodel.cpp | 0 src/{ => devtools}/models/statekeysmodel.h | 0 src/{ => devtools}/models/statemodel.cpp | 0 src/{ => devtools}/models/statemodel.h | 0 8 files changed, 14 insertions(+), 10 deletions(-) rename src/{ => devtools}/models/statefiltermodel.cpp (100%) rename src/{ => devtools}/models/statefiltermodel.h (100%) rename src/{ => devtools}/models/statekeysmodel.cpp (100%) rename src/{ => devtools}/models/statekeysmodel.h (100%) rename src/{ => devtools}/models/statemodel.cpp (100%) rename src/{ => devtools}/models/statemodel.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f798aafe..42dc75aee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,6 +12,7 @@ add_subdirectory(login) add_subdirectory(rooms) add_subdirectory(timeline) add_subdirectory(spaces) +add_subdirectory(devtools) add_library(neochat STATIC controller.cpp @@ -34,10 +35,6 @@ add_library(neochat STATIC windowcontroller.h models/serverlistmodel.cpp models/serverlistmodel.h - models/statemodel.cpp - models/statemodel.h - models/statefiltermodel.cpp - models/statefiltermodel.h logger.cpp logger.h jobs/neochatgetcommonroomsjob.cpp @@ -48,8 +45,6 @@ add_library(neochat STATIC proxycontroller.h mediamanager.cpp mediamanager.h - models/statekeysmodel.cpp - models/statekeysmodel.h sharehandler.cpp sharehandler.h foreigntypes.h @@ -168,7 +163,6 @@ ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE ) add_subdirectory(settings) -add_subdirectory(devtools) add_subdirectory(chatbar) if(NOT ANDROID AND NOT WIN32) @@ -228,7 +222,7 @@ else() endif() target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models) -target_link_libraries(neochat PRIVATE Settingsplugin Roomsplugin Timelineplugin Spacesplugin devtoolsplugin Loginplugin chatbarplugin) +target_link_libraries(neochat PRIVATE Settingsplugin Roomsplugin Timelineplugin Spacesplugin Devtoolsplugin Loginplugin chatbarplugin) target_link_libraries(neochat PUBLIC LibNeoChat Timeline diff --git a/src/devtools/CMakeLists.txt b/src/devtools/CMakeLists.txt index ae53d93dd..3865022ab 100644 --- a/src/devtools/CMakeLists.txt +++ b/src/devtools/CMakeLists.txt @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: 2024 James Graham # SPDX-License-Identifier: BSD-2-Clause -qt_add_library(devtools STATIC) -ecm_add_qml_module(devtools GENERATE_PLUGIN_SOURCE +qt_add_library(Devtools STATIC) +ecm_add_qml_module(Devtools GENERATE_PLUGIN_SOURCE URI org.kde.neochat.devtools OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/devtools QML_FILES @@ -13,4 +13,14 @@ ecm_add_qml_module(devtools GENERATE_PLUGIN_SOURCE RoomData.qml ServerData.qml StateKeys.qml + SOURCES + models/statefiltermodel.cpp + models/statekeysmodel.cpp + models/statemodel.cpp +) + +target_include_directories(Devtools PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models) +target_link_libraries(Devtools PRIVATE + Qt::Core + LibNeoChat ) diff --git a/src/models/statefiltermodel.cpp b/src/devtools/models/statefiltermodel.cpp similarity index 100% rename from src/models/statefiltermodel.cpp rename to src/devtools/models/statefiltermodel.cpp diff --git a/src/models/statefiltermodel.h b/src/devtools/models/statefiltermodel.h similarity index 100% rename from src/models/statefiltermodel.h rename to src/devtools/models/statefiltermodel.h diff --git a/src/models/statekeysmodel.cpp b/src/devtools/models/statekeysmodel.cpp similarity index 100% rename from src/models/statekeysmodel.cpp rename to src/devtools/models/statekeysmodel.cpp diff --git a/src/models/statekeysmodel.h b/src/devtools/models/statekeysmodel.h similarity index 100% rename from src/models/statekeysmodel.h rename to src/devtools/models/statekeysmodel.h diff --git a/src/models/statemodel.cpp b/src/devtools/models/statemodel.cpp similarity index 100% rename from src/models/statemodel.cpp rename to src/devtools/models/statemodel.cpp diff --git a/src/models/statemodel.h b/src/devtools/models/statemodel.h similarity index 100% rename from src/models/statemodel.h rename to src/devtools/models/statemodel.h