This all functionality is already in KColorSchemeManager and konsole is working just fine without this code