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
 bug in "rename" refactor fucntion
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jzq740176597
Tomato Guru

China
329 Posts

Posted - Jun 20 2014 :  02:24:25 AM  Show Profile  Reply with Quote
.h file
class CAutoShowToolBtn:public QToolButton
{
	Q_OBJECT
public:
	explicit CAutoShowToolBtn(QWidget * parent=0);
	~CAutoShowToolBtn();
	bool hasSameGroupMenuOpen()const;
private:
	static CAutoShowToolBtn* active_menu_toolBtn_g;(1)
};


.cpp file

CAutoShowToolBtn* CAutoShowToolBtn::active_menu_toolBtn_g = NULL;(2)

CAutoShowToolBtn::CAutoShowToolBtn( QWidget * parent/*=0*/ ) :QToolButton(parent)
{
	connect(this,SIGNAL(clicked()),this,SLOT(slot_showMenu()));
}

bool CAutoShowToolBtn::hasSameGroupMenuOpen()const
{
	return active_menu_toolBtn_g && active_menu_toolBtn_g != this &&!active_menu_toolBtn_g->menu()->isHidden()
		&& active_menu_toolBtn_g->parentWidget() == parentWidget();
}


problem:
trigger "rename" in hasSameGroupMenuOpen() member function.
the find references is only belongs to var in member function excluding the declaretion(1) and the definition(2)
But if you trigger "rename " in definition(2). only find declaretion + definition. total 2 references.

is bug?

Creation come from persist!

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 20 2014 :  7:48:48 PM  Show Profile  Reply with Quote
I always get the same results regardless where I trigger the command:



What Visual Studio and Visual Assist versions are you using?

It might be possible that Q_OBJECT is confusing our parser. Can you please

1. press rebuild button: VA Options -> Performance -> Rebuild
2. exit all instances of Visual Studio
3. create a new file named VA_Stdafx.h in the directory where you sln file is located
4. paste the below 2 lines to that file:
#define Q_OBJECT
// you need EOL after the define
5. save the file
6. start VS
7. load the project

Does it make any difference?

Edited by - accord on Jun 20 2014 7:50:38 PM
Go to Top of Page

NedPat
New Member

4 Posts

Posted - Sep 10 2014 :  08:08:53 AM  Show Profile  Reply with Quote
Tried your suggestions but rename / refactor still skips include file
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Sep 11 2014 :  01:19:03 AM  Show Profile  Reply with Quote
Can you post a code sample to explain what you are doing, and the problem you are having? Do you mean VA is not finding any references inside the include file?

Is this include file in a stable include directory, or part of your local solution?

Are any references to the include file listed when you use Find References?

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

NedPat
New Member

4 Posts

Posted - Sep 11 2014 :  02:38:23 AM  Show Profile  Reply with Quote
If "Find" or "Refactor / Rename" is initialsed from the include file, the reference is found. The include file reference is not found from source code files.

The function I'm trying to use is started from SHFT ALT F and SHFT ALT R

The include file is part of a local solution and this seems to be the problem. Resource header files ARE included by Whole Tomato.

Your advice would be greatly appreciated as these functions are the principle motivation for using Whole Tomato

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Sep 11 2014 :  1:28:26 PM  Show Profile  Reply with Quote
Can you please go to:

VA Options -> System Info -> Copy Info

and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup.

Please make sure the include file in question is closed, it is not open in the IDE, and now show VA's Open File dialog. If you type in the name of the include file, is it found? If VA does not know this include file is part of the solution then this might well explain the problems you are seeing.

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

NedPat
New Member

4 Posts

Posted - Sep 12 2014 :  03:05:39 AM  Show Profile  Reply with Quote
System Info follows. The include file does not appear in the File Open dialog

License: [email protected] (Non-renewable license) Support ends 2014.02.21
Trial extension mode
VA_X.dll file version 10.8.2043.0 built 2014.07.10
DevEnv.exe version 12.0.30110.0 Professional
msenv.dll version 12.0.30110.0
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1 (remote)
4 processors (x86-64, WOW64)
Language info: 1252, 0x809

Platform: Custom
Stable Includes:
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\include;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\um;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\shared;
C:\\Program Files (x86)\\Windows Kits\\8.1\\Include\\winrt;

Other Includes:
C:\\ADevel\\SmallForm\\Headers_AaVim;

Stable Source Directories:
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\mfc;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\crt\\src;

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Sep 12 2014 :  6:58:04 PM  Show Profile  Reply with Quote
Since the header file is not in the Open File dialog, VA won't know it should search the file. So the question becomes, why is this include file not listed.

Since this header file is not part of your solution, what is it? A 3rd party include file header? Something else again?

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

NedPat
New Member

4 Posts

Posted - Sep 15 2014 :  07:33:07 AM  Show Profile  Reply with Quote
The header file is a core part of the solution and included in every compilation whether debug or release. VS picks it up but not W Tomato. The holding directory is the first entry in the project "Additional Include Directories". Now I look, it seems that the header files listed in "Additional Include Directories" are being ignored by VT. I'd appreciate your guidance.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Sep 16 2014 :  2:32:24 PM  Show Profile  Reply with Quote
Can you find one of the #include lines that reference this header file, and place the caret into the file name. What does VA show in the Context and Definition fields? These are normally at the top of the editor, and are where the Alt-M list appears. You should see the full path to the header file.

If you press Alt-G are you taken to this header file?

All of this should work, since VA parses these include directory settings, and looks for include files here.

When you run Rename, you are telling VA that you want to update your solution. So we only search your solution, we don't search and try to update your libraries. If we did, we would be trying to update the standard Win32 libraries, Boost, etc. Things that normally you don't actually want us to try and update.

Clearly here this header file is part of your solution, but we don't have any way of knowing that, since the file is not listed in the IDE's Solution Explorer window. So the solution is to either add the header file to your solution, or to update it manually. I hope all of this makes sense, and you can see why we have made this design decision.

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