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
 Error refactoring QVector<Data> g, Data - my class
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

daimon
New Member

Ukraine
4 Posts

Posted - May 31 2010 :  11:23:45 AM  Show Profile  Reply with Quote
error in curves[j].x_widget
x_widget - refactoring not available on symbol
Data - my class
x_widget is in Data
VS 2008 Proff
Please, help me.

Edited by - daimon on May 31 2010 1:02:24 PM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 31 2010 :  2:09:38 PM  Show Profile  Reply with Quote
There is a blog entry about how you can setup your environment to work with QT and Visual Assist:

http://blog.wholetomato.com/2008/11/20/using-qt-44-with-visual-assist-x/

Please let me know if it doesn't help.

Edited by - accord on May 31 2010 2:10:56 PM
Go to Top of Page

daimon
New Member

Ukraine
4 Posts

Posted - May 31 2010 :  4:35:03 PM  Show Profile  Reply with Quote
Qt well works,but doesn`t work QVector with my class
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - May 31 2010 :  5:50:10 PM  Show Profile  Reply with Quote
Using VS2008 and VA 1823 I have tried the following test code:

struct testQVectorArrayAccess
{
	int x_widget;
	int y_widget;
};

static void testGeneralCode()
{
	QVector<testQVectorArrayAccess> vecTest;
	vecTest[0].x_widget;  // refactoring offered here on "x_widget"
}


and refactoring is offered just fine for me. Can you try this test code on your system please?

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

daimon
New Member

Ukraine
4 Posts

Posted - May 31 2010 :  7:37:04 PM  Show Profile  Reply with Quote
Definition of Data class is in other header. Your examples fine work, but my code doesn`t work

data.h:

class Data
{
...
};
////////////////////////////
#include "data.h"

class SettingsGraph
{
QVector<Data> curves;
....
};//////////////

Edited by - daimon on May 31 2010 7:38:12 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 01 2010 :  4:33:32 PM  Show Profile  Reply with Quote
Are you able to rename the class "Data" to give it a more unique and distinct name? It looks like this class name is part of the problem.

I have managed to reproduce this problem with a QVector<Data> but there is no sign so far of a problem with a QVector<testQVectorArrayAccess
>


case=45135

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

daimon
New Member

Ukraine
4 Posts

Posted - Jun 02 2010 :  10:00:53 AM  Show Profile  Reply with Quote
Thanks, Rename Data to Curve => VisualAssist X work!!! But why "Data" is invalid name for class.

Edited by - daimon on Jun 02 2010 7:15:44 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19024 Posts

Posted - Jun 03 2010 :  11:51:56 AM  Show Profile  Reply with Quote
Looking inside the qvector.h file on my test system, inside the QVector class there is the line:

    typedef QVectorTypedData<T> Data;


which is probably the cause of this problem. VA is seeing "Data" as part of the QVector code, but also in your code, and somehow things are getting confused.

Sometimes duplicate class names can confuse VA, and this is probably another example of that effect.

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