Works perfectly Rated 5 out of 5 stars

Ctrl + Q quits the browser by default. This is unfortunate, because the shortcut is close to Ctrl-W (= close current tab).

This add-on remaps Ctrl + Q to Ctrl + Shift + Q, and also works in recent Firefox versions (and e10s), so you won't close Firefox by accident any more.

Edit: This add-on does not meet my needs on macOS because on macOS there is also a Command-Q shortcut. After being fed up with losing my tabs multiple times, I published an add-on that replaces Command-Q too: https://addons.mozilla.org/en-US/firefox/addon/disable-ctrl-q-and-cmd-q/