qt: write real newlines in new qt5ct/qt6ct config

fixes #3457
port 1.6

(cherry picked from commit 49a639a358)
This commit is contained in:
bbedward
2026-09-17 14:03:53 +00:00
committed by dms-ci[bot]
parent 402a8515ee
commit 2d2502cc67
+3 -1
View File
@@ -22,6 +22,8 @@ apply_qt_colors() {
local config_file="$1"
if [ -f "$config_file" ]; then
sed -i 's/^\[Appearance\]\\ncustom_palette=.*/[Appearance]/' "$config_file"
if grep -q '^\[Appearance\]' "$config_file"; then
if grep -q '^custom_palette=' "$config_file"; then
sed -i 's/^custom_palette=.*/custom_palette=true/' "$config_file"
@@ -43,7 +45,7 @@ apply_qt_colors() {
} >>"$config_file"
fi
else
printf '[Appearance]\\ncustom_palette=true\\ncolor_scheme_path=%s\\n' "$color_scheme_path" >"$config_file"
printf '[Appearance]\ncustom_palette=true\ncolor_scheme_path=%s\n' "$color_scheme_path" >"$config_file"
fi
}