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
 Feature Requests
 Qt and signals and slots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

joracine
Senior Member

36 Posts

Posted - Jun 01 2009 :  4:14:33 PM  Show Profile  Reply with Quote
This is a long shot and I am suggesting it knowing it is very unlikely to ever be a feature. But anyway, here it comes.

When using Qt's signals and slots, connections are made this way:

connect(ptrObj1, SIGNAL(MethodOfObject1(int)), ptrObj2, SLOT(MethodOfObject2(int)));

Because the method name is not directly associated with the object, it is not renamed during a refactor->rename operation.

Because this is a very specific case to Qt and I assume that, because of the Meta Object Compiler (MOC) of Qt, there would be other such cases, the features request could be stated as:

"Would it be possible to support Qt's syntax/MOC in VAX?"


One could even imagine a certain level of cooperation between Qt/Trolltech/Nokia and VAX/Whole Tomato.

Long shot, but worth mentioning I think.

Keep up the good work!
J-O

joracine
Senior Member

36 Posts

Posted - Jun 01 2009 :  4:29:18 PM  Show Profile  Reply with Quote
Probably a duplicate/similar to this post: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5415&SearchTerms=qt,signals
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jun 03 2009 :  2:00:57 PM  Show Profile  Reply with Quote
Do you always have this problem? Or does it only fail in some situations?

I have just done a quick test here, using VS2003 and VA 1724 on an old Qt 3 project of mine, and renaming a slot function from the function declaration in the .h file correctly updated the connect statement in the cpp file.

Find References also found the connect statement quite happily.

VA does have some support for Qt, so this is a reasonable request. So step 1 is to find out why it fails for you but worked for me.

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

joracine
Senior Member

36 Posts

Posted - Jun 04 2009 :  11:25:42 AM  Show Profile  Reply with Quote
Well, here's an example:

I have class A and class B. Both with a signal called MySignal().

B.h

class B
{
public:
signals:
  void MySignal();
}


A.h

class A
{
public:

signals:
  void MySignal();

private:
  B* m_B;
};


B.cpp

A::A()
{
  m_B = new B;
  connect(B, SIGNAL(MySignal()), this, SIGNAL(MySignal()));
}


What happens:
1) If I do a Refactor->Rename on A.h:void MySignal(), I get in the list MySignal from A.h and both signals from the "connect" line in A.cpp.
2) If I do a Refactor->Rename on B.h:void MySignal(), I get in the list MySignal from B.h only.

What should happen:
1) MySignal from A.h and the second MySignal in the connect of A.cpp.
2) MySignal from B.h and the first MySignal in the connect of A.cpp.

I am conscious this means explicit parsing of the "connect" call from VAX and this is why I called it a long shot...

Hope this helps!
J-O
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jun 04 2009 :  5:22:02 PM  Show Profile  Reply with Quote
Since we have already done some work to support Qt, and I am seeing the same problem with this code I have put in a feature request for this:

case=27888

I don't know how likely this is to be done, but it is worth asking.

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