Perhaps you didn't run qmake after making the initial changes to your .pro file, in which case the Makefiles would have been incorrect from the outset. In any case, hand-editing Makefiles is a bad idea, since qmake will regenerate them if the .pro file is changed.