Refactor Native Messages (#4738)
* refactor: move ipc queue into its own class * refactor: move windows.h related functions to AW * refactor: make NM-Client methods static * refactor: json access * refactor: use struct initializer * refactor: move `handleMessage` to anon-namespace * refactor: clean-up includes * refactor: move action handler to functions * refactor: cleanup `handleSelect` * fix: cleanup clang-tidy warnings * chore: simplify json * revert: keep handlers as methods This is more readable and extensible. * fix: typo * fix: namespace * fix: rename define * refactor: `IpcQueue` to be simpler * fix: rename cmake option * fix: use variant when constructing * fix: make it a ref * fix: its a pair now
This commit is contained in:
@@ -3,6 +3,9 @@ set(VERSION_PROJECT "${LIBRARY_PROJECT}-version")
|
||||
set(EXECUTABLE_PROJECT "${PROJECT_NAME}")
|
||||
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00)
|
||||
|
||||
# registers the native messageing host
|
||||
option(CHATTERINO_DEBUG_NATIVE_MESSAGES "Debug native messages" OFF)
|
||||
|
||||
set(SOURCE_FILES
|
||||
Application.cpp
|
||||
Application.hpp
|
||||
@@ -408,6 +411,8 @@ set(SOURCE_FILES
|
||||
util/IncognitoBrowser.hpp
|
||||
util/InitUpdateButton.cpp
|
||||
util/InitUpdateButton.hpp
|
||||
util/IpcQueue.cpp
|
||||
util/IpcQueue.hpp
|
||||
util/LayoutHelper.cpp
|
||||
util/LayoutHelper.hpp
|
||||
util/NuulsUploader.cpp
|
||||
@@ -847,6 +852,9 @@ if (WIN32)
|
||||
set_target_properties(${EXECUTABLE_PROJECT} PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||
endif ()
|
||||
endif ()
|
||||
if (CHATTERINO_DEBUG_NATIVE_MESSAGES)
|
||||
target_compile_definitions(${LIBRARY_PROJECT} PRIVATE CHATTERINO_DEBUG_NM)
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(${LIBRARY_PROJECT} PUBLIC /EHsc /bigobj)
|
||||
|
||||
Reference in New Issue
Block a user