The Ubuntu Creator package installs a "qtcreator.desktop".
Use member variables instead of global statics.

Also include cleanup and more return value checks.