Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Qt and signals and slots

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
joracine Posted - Jun 01 2009 : 4:14:33 PM
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
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 04 2009 : 5:22:02 PM
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.
joracine Posted - Jun 04 2009 : 11:25:42 AM
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
feline Posted - Jun 03 2009 : 2:00:57 PM
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.
joracine Posted - Jun 01 2009 : 4:29:18 PM
Probably a duplicate/similar to this post: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5415&SearchTerms=qt,signals

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000