In order to safely keep "Quit All" in the Dock and to prevent from quitting all applications after a misclick on the icon, you will be asked for a confirmation at launch. If any open documents remain unsaved, you will be asked to save changes Quit All is an Automator Workflow. It requires Mac Os 10.4 and above, and Automator installed.
Quit All is free. You can use it and redistribute it freely.
Quit All is distributed "as-is" and without warranty. I'm not in any way responsible for software or hardware damage that may result from its use.