Thank you for this improvement.
One note:
The red color is probably not visible with the dark theme, because you can not add style only for current semantic element. It would be worth building a version and checking on a dark theme in Mojave.
Using the QSS style – the red color disappears.
The solution would be simply to add a checkmark suggested by BetterRed
here.
Code:
QString added_checkmark = name + " ✓";
item->setText(added_checkmark);