You should obtain a similar result, easier, enabling the hidden config option (about:config).
- In Firefox's address bar, type about:config and accept the warning that it will give. Now it appears in front of you a long list of config options. Filter it typing the keyword quit in the filter bar (up top). After that the filter acts you will have only few lines. Click on browser.showQuitWarning and set it true by clicking on it.
- You can use this filter again with the keyword warnon and see if the options "warn when close tabs" and similar are set to true. 3.In the Firefox's Options/Preferences (or Edit/preferences it depends from system and version), go to the Tabs section and check the option "Warn me when closing multiple tabs". This will prevent you to close a window with multiple tab.
You will not completely disable CTRL-Q but at least you will make it harmless.