You might not get a good response on this one because users generally don't do this. They write everything in separate HDL files because it is easier to organize and edit that way. For organization, they might keep it all in a /src sub directory and point to it from Quartus, but I have almost never seen them all in one file. (Unless it's a library of components or it's a real small number of files, like 3).
Also, how come you are calling it a .vqm rather than just a .v? A .vqm is a verilog file used as a netlist to pass synthesis results from 3rd party synthesizers into Quartus. For example, Synplify writes out a .vqm which is a structural representation of its synthesis results. Quartus can write out similar .vqms. I believe the synthesizer is optimized to read in .vqms under the assumption that this is what they are, structural models. So if you put generic verilog into a file and call it a .vqm, you might get sub-optimal results. I don't know this for sure, but would suggest keeping it a .v or .verilog file.