views:

76

answers:

3

when i download a fresh copy from our SVN, make then run my program, Qt tells me that one of my SLOTS doesn't work but with a handy-dandy make clean then make, it seems to solve the problem. i continue to make changes in the code on my PC and that message never shows again.

C++ Qt 4.6 gcc

has anyone had this problem? and ideas?

thanks

+1  A: 

My guess? There's a file in your repository that's removed by make clean but not recreated by make (probably because it's no longer necessary), and it's something in this file that is causing problems.

Anon.
+1  A: 

If you store your .moc files in the repository (you shouldn't) then they could get out of sync with reality. Does a make includes fix the problem too?

What all gets deleted when you do a make clean? What all is there after you remake the project? All files cleaned should be remade. If they're not, like Anon. says, one of them could be doing strange things.

Bill
+4  A: 

Qt creates a whole bunch of metadata about your Q_OBJECT classes when you build. That metadata is stored in 'moc' files, one of which may have become inconsistent with your C++ code. It's usually a bad idea to store intermediate build stages in your version control system. I'd suggest running make clean, then looking at your VCS to find out what files got deleted, then commit the result.

In svn:

make clean
svn st     # you should see some files deleted
svn rm <all the deleted files that svn st showed>
svn ci -m "Cleaned out intermediate build stages"
nornagon