I have a Qt project with precompiled headers enabled. Compilation was working fine until recently. But since a dew days I've noticed that Qt Creator is always running MOC on all my Q_OBJECT files, even those that haven't been changed. Because of that, many CPP files also need to be rebuilt for no reason.

Is there any reason why that could happen? I'm looking at the compile output but I'm not seeing anything special. Any idea?

有帮助吗?

解决方案

Okay I just figured it out. I was playing with my system's date a few days ago to test some time-related functions. Problem is, I edited a few files in Qt Creator at that time so their dates was now in the future. Because of that, qmake was detecting changes where there weren't any.

I've now set back the dates of the files to today's date and the compilation is working again.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top