Port some code away kdelibs4support still more code to porting

Authored by mlaurent on Sep 11 2019, 5:05 AM.