Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 How to exclude some code depend on #define?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Teerayoot
New Member

2 Posts

Posted - May 03 2007 :  04:19:19 AM  Show Profile  Reply with Quote
I'm working on some project that use Qt framework 4.2.3

and Qt header contain
a conditional defination (#ifdef QT3_SUPPORT) that is for support old code

VS2005 mark that code gray ,but VSX not

method that for old code still show in VAView ,ToolTIP,etc


How to prevent it from show old code,that has many method i need to see.


Thank in advance.

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 03 2007 :  3:04:25 PM  Show Profile  Reply with Quote
We are considering doing this in the future:

case=4059

For now, if you can modify the Qt header files slightly then you try the following method, which should work. The Qt header becomes:

#define VA_IGNORE_THIS_START
#define VA_IGNORE_THIS_END

class QWidget
{
    // code...

VA_IGNORE_THIS_START
#ifdef QT3_SUPPORT
    // old style code
#endif
VA_IGNORE_THIS_END

    // code...
};


Then edit VA's "StdAfx.h" file as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and add the entries:

#define VA_IGNORE_THIS_START /*
#define VA_IGNORE_THIS_END */


at the bottom. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

zen is the art of being at one with the two'ness
Go to Top of Page

Teerayoot
New Member

2 Posts

Posted - May 05 2007 :  11:12:39 AM  Show Profile  Reply with Quote
ok,I got more easy solution

Your method need to edit every header files.
My method is

push this line of code to VA stdafx.h


#define QT3_SUPPORT #if 0


Now nomore old code show. :)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 07 2007 :  3:08:44 PM  Show Profile  Reply with Quote
I would not have expected that to work, but I am very happy it does

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000