[Qt-creator] Small bug in refactoring
Kris Wong
wongk at seapine.com
Thu Nov 5 14:28:25 CET 2009
> Hi Kris,
>
> On Nov 4, 2009, at 9:07 PM, ext Kris Wong wrote:
>
> > This is a rather simplified version of the test case I am working
> > with, but I assume it reproduces the issue:
> >
> > class Foo
> > {
> > friend class Bar;
> > int m_myint;
> > };
> >
> > class Bar
> > {
> > void doSomething() {
> > foo.m_myint = 5;
> > }
> > Foo foo;
> > };
> >
> > When renaming Foo::m_myint, refactoring misses the use in
> > Bar::doSomething.
>
> Are you sure? I pasted your code in Creator and the
> refactoring engine
> renamed all the uses of "m_myint".
>
> ciao robe
No I am not sure. :P
After messing around with this a bit I have found the difference between my code that reproduces the issue and my test case. The difference is, in my code the method "doSomething" is surround by a #ifdef preprocessor block. The preprocessor definition is defined in my qmake project file. Because of a local modification to creator (preprocessor definitions from my project files are added to the code model), the function is visible to the code model, but the refactoring engine doesn't see it, so I suppose this is not a bug after all.
-Kris Wong
More information about the Qt-creator-old
mailing list