why don't you DRY this up with a helper function that takes a QMenu* param?