Settings: Add "homemade" XDG_CONFIG_DIRS support
The LXQt::Settings uses the Qt's QSettings which doesn't support the xdg spec regarding th XDG_CONFIG_DIRS -> https://bugreports.qt.io/browse/QTBUG-34919. This commit adds a workaround by searching the directories for system wide configuration file and if found, all keys from it are copied into the user configuration file.
This commit is contained in:
parent
177ffdecde
commit
524a6062b3
|
@ -124,6 +124,7 @@ list(APPEND CMAKE_MODULE_PATH
|
|||
)
|
||||
|
||||
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
||||
option(WITH_XDG_DIRS_FALLBACK "Use our XDG_CONFIG_DIRS fallback" ON)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
@ -325,6 +326,12 @@ target_compile_definitions(${LXQT_LIBRARY_NAME}
|
|||
PRIVATE "$<$<CONFIG:Release>:QT_NO_WARNING_OUTPUT>"
|
||||
)
|
||||
|
||||
if (WITH_XDG_DIRS_FALLBACK)
|
||||
target_compile_definitions(${LXQT_LIBRARY_NAME}
|
||||
PRIVATE "WITH_XDG_DIRS_FALLBACK"
|
||||
)
|
||||
endif ()
|
||||
|
||||
target_include_directories(${LXQT_LIBRARY_NAME}
|
||||
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${LXQT_LIBRARY_NAME}>"
|
||||
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${LXQT_LIBRARY_NAME}/LXQt>"
|
||||
|
|
Loading…
Reference in New Issue