Example 4. For what integer values of $m$ does the equation $x^{2}-(m-1) x-2 m^{2}-5 m-3=0$ have integer solutions?

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.