feat: dual time zones, autostart, tray icon, config relocation, tests
- Dual clock (primary/secondary time zone) with IANA picker, persisted in XML - AutoStartManager: macOS LaunchAgent (com.clouck.clock, RunAtLoad) - Tray icon: template image, light/dark adaptation, toggle + quit menu - ConfigManager: default path moved to QStandardPaths::AppConfigLocation - Qt Test suite (ConfigManager, AutoStartManager) wired into CTest - GitHub origin renamed to upstream; private Gitea repo as origin
This commit is contained in:
@@ -4,6 +4,8 @@ project(Clouck)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include(CTest)
|
||||
|
||||
# Find Qt6
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
||||
|
||||
@@ -23,12 +25,14 @@ qt6_standard_project_setup()
|
||||
# Sources
|
||||
set(SOURCES
|
||||
main.cpp
|
||||
autostart_manager.cpp
|
||||
clock_widget.cpp
|
||||
config_manager.cpp
|
||||
window_helper.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
autostart_manager.h
|
||||
clock_widget.h
|
||||
config_manager.h
|
||||
window_helper.h
|
||||
@@ -73,3 +77,27 @@ install(TARGETS Clouck
|
||||
RUNTIME DESTINATION bin
|
||||
BUNDLE DESTINATION bin
|
||||
)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Test)
|
||||
|
||||
qt6_add_executable(ConfigManagerTest
|
||||
tests/config_manager_test.cpp
|
||||
config_manager.cpp
|
||||
config_manager.h
|
||||
)
|
||||
target_include_directories(ConfigManagerTest PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(ConfigManagerTest PRIVATE Qt6::Core Qt6::Gui Qt6::Test)
|
||||
|
||||
add_test(NAME ConfigManagerTest COMMAND ConfigManagerTest)
|
||||
|
||||
qt6_add_executable(AutoStartManagerTest
|
||||
tests/autostart_manager_test.cpp
|
||||
autostart_manager.cpp
|
||||
autostart_manager.h
|
||||
)
|
||||
target_include_directories(AutoStartManagerTest PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(AutoStartManagerTest PRIVATE Qt6::Core Qt6::Test)
|
||||
|
||||
add_test(NAME AutoStartManagerTest COMMAND AutoStartManagerTest)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user