1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

qt: deprecate kde6

Give users a heads up that option is being removed.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-08-31 12:49:01 -05:00
parent f671e772d3
commit 1e759786e5
3 changed files with 31 additions and 2 deletions

View file

@ -215,6 +215,7 @@ in
"lxqt"
"qtct"
"kde"
"kde6"
]) (lib.types.submodule { options = newOption; })
);
default = null;
@ -290,11 +291,22 @@ in
config =
let
deprecateKde6 =
name: optionPath:
if name == "kde6" then
lib.warn ''
The ${optionPath} value "kde6" has been deprecated and renamed to "kde".
Please update your configuration:
${optionPath} = "kde";
'' "kde"
else
name;
platformTheme =
if (builtins.isString cfg.platformTheme) then
{
option = "qt.platformTheme";
name = cfg.platformTheme;
name = deprecateKde6 cfg.platformTheme "qt.platformTheme";
package = null;
}
else if cfg.platformTheme == null then
@ -306,7 +318,7 @@ in
else
{
option = "qt.platformTheme.name";
name = cfg.platformTheme.name;
name = deprecateKde6 cfg.platformTheme.name "qt.platformTheme.name";
package = cfg.platformTheme.package;
};

View file

@ -3,4 +3,5 @@
qt-platform-theme-gtk = ./qt-platform-theme-gtk.nix;
qt-platform-theme-gtk3 = ./qt-platform-theme-gtk3.nix;
qt-platform-theme-gnome = ./qt-platform-theme-gnome.nix;
qt-platform-theme-kde6-migration = ./qt-platform-theme-kde6-migration.nix;
}

View file

@ -0,0 +1,16 @@
{
qt = {
enable = true;
platformTheme.name = "kde6"; # Should trigger warning and convert to "kde"
};
nmt.script = ''
# Verify that kde6 gets converted to kde in QT_QPA_PLATFORMTHEME
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
'QT_QPA_PLATFORMTHEME="kde"'
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
'QT_PLUGIN_PATH'
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
'QML2_IMPORT_PATH'
'';
}