refactor: move socket and datastream types to Io module

This commit is contained in:
outfoxxed 2024-03-03 01:59:31 -08:00
parent f45d298b66
commit 14e1d2d162
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
12 changed files with 26 additions and 13 deletions

View file

@ -56,6 +56,7 @@ find_package(Qt6 REQUIRED COMPONENTS ${QT_FPDEPS})
qt_standard_project_setup(REQUIRES 6.6)
add_subdirectory(src/core)
add_subdirectory(src/io)
if (WAYLAND)
add_subdirectory(src/wayland)

2
docs

@ -1 +1 @@
Subproject commit 5aaacb9a1eea9086d6da9e21eed6e30456c6c5d6
Subproject commit 79579222a31dc1f6355e0c3020917c29165f766c

View file

@ -15,17 +15,8 @@ qt_add_executable(quickshell
windowinterface.cpp
floatingwindow.cpp
panelinterface.cpp
datastream.cpp
)
qt_add_qml_module(quickshell URI Quickshell)
if (SOCKETS)
target_sources(quickshell PRIVATE socket.cpp)
endif()
target_link_libraries(quickshell PRIVATE ${QT_DEPS})
if (TESTS)
add_subdirectory(test)
endif()

View file

@ -12,7 +12,5 @@ headers = [
"windowinterface.hpp",
"panelinterface.hpp",
"floatingwindow.hpp",
"datastream.hpp",
"socket.hpp",
]
-----

16
src/io/CMakeLists.txt Normal file
View file

@ -0,0 +1,16 @@
qt_add_library(quickshell-io STATIC
datastream.cpp
)
if (SOCKETS)
target_sources(quickshell-io PRIVATE socket.cpp)
endif()
qt_add_qml_module(quickshell-io URI Quickshell.Io)
target_link_libraries(quickshell-io PRIVATE ${QT_DEPS})
target_link_libraries(quickshell PRIVATE quickshell-ioplugin)
if (TESTS)
add_subdirectory(test)
endif()

7
src/io/module.md Normal file
View file

@ -0,0 +1,7 @@
name = "Quickshell.Io"
description = "Io types"
headers = [
"datastream.hpp",
"socket.hpp",
]
-----

View file

@ -9,7 +9,7 @@
#include <qtmetamacros.h>
#include "datastream.hpp"
#include "reload.hpp"
#include "../core/reload.hpp"
///! Unix socket listener.
class Socket: public DataStream {