Results 1 to 9 of 9

Thread: class functions are not listing [ in VC++ editor]

  1. #1
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default class functions are not listing [ in VC++ editor]

    i am working in Qt 4.2.2, using the VC++ .net versiong( 2007 ).
    Here i am testing some classes using test cases .Instead of write the junk of code [testing code] in main.cpp
    i created a testMacro.h, here i will write the test code as MACRO [ eg: TEST_CASE_1 ].

    Then i am including this "testMacro.h" in the main.cpp.
    In main.cpp i can DISABLE or ENABLE individual test or the whole test cases which is written in testMacro.h
    It's working properly.

    My problem is , in testMacro.h file while creating a object "myObject" of class "MyClass" [just for testing] ,
    then if am puting dot [.] or arrow[->] to list the member functions.It is not listing any of the class member's



    NOTE:
    I have included "MyClass.h,"
    The MyClass contains public members.
    If am creating any "myObject" in main.cpp , it will list the member functions of "MyClass",while putting arrow or dot operator.
    Why it's not working in "testMacro.h" file.


    See my main.cpp
    Qt Code:
    1. #include "MyClass.h"
    2.  
    3. int main( )
    4. {
    5.  
    6. MyClass myObj;
    7.  
    8. myObj.foo(); // here the dot operator [.] will list the foo() automatically in VC++ editor
    9.  
    10.  
    11. }
    To copy to clipboard, switch view to plain text mode 

    see testMacro.h
    Qt Code:
    1. #include "MyClass.h"
    2.  
    3. MyClass myObj;
    4. myObj.foo(); //here the editor will not show the foo()
    5. //even after putting the dot operator [.]
    6.  
    7.  
    8. #define TEST_CASE_1
    9. /* i will attach the code " myObj.foo(); " here in the macro later */
    10.  
    11.  
    12.  
    13.  
    14. #define TEST_CASE_2
    15.  
    16. #define TEST_CASE_3
    To copy to clipboard, switch view to plain text mode 




    please direct me ...if am doing anything wrong.
    Last edited by joseph; 4th April 2007 at 07:00.

  2. #2
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: class functions are not listing [ in VC++ editor]

    have you installed qt-vsaddin-collection-2.1.3 ?

  3. #3
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: class functions are not listing [ in VC++ editor]

    Rajesh thanks for replay.
    But as u asked , in my mcahince Qt plugins are installed in VC++ properly.

    But here i think , VC++ will not support code completion in .h files.
    Bcause if am tring the below code in "testMacro.h"

    Qt Code:
    1. void foo()
    2. {
    3. MyClass myObj;
    4. myObj.foo(); // here the foo() is automatically listing.
    5.  
    6. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by joseph; 4th April 2007 at 07:29.

  4. #4
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: class functions are not listing [ in VC++ editor]

    Joseph,
    you mean foo() is automatically listing in .cpp file but not listing in .h file, right?
    but for me its working similer in both file. I am using VC.Net, Visual Asist, Qt4.2.0


  5. #5
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: class functions are not listing [ in VC++ editor]

    Exactly that's the problem.

    In .cpp i can use the code completion But in .h file am not abel to do .

    Could you please explain how can i enable the "code completion" in .h file with out doing like this

    In testMacro.h
    Qt Code:
    1. #include "MyClass.h"
    2.  
    3. void foo()
    4. {
    5. MyClaass myObj;
    6.  
    7. myObj.foo() // this will work any way
    8.  
    9. }
    To copy to clipboard, switch view to plain text mode 


    I am asking will this[ below code] work on ur machine
    In testMacro.h
    Qt Code:
    1. #include "MyClass.h"
    2.  
    3. myObj.foo(); // Will the foo() will automatically comes in ur machine
    4. // If this is working properly ..plz give me the solution for this
    5. // Any plugin support need..? plzzz let me know
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: class functions are not listing [ in VC++ editor]

    Yes it is working in my computer in both .h & .cpp

  7. #7
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: class functions are not listing [ in VC++ editor]

    Visual Assist also might help (but costs something ...) - I can't live without it

  8. #8
    Join Date
    Feb 2006
    Posts
    157
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: class functions are not listing [ in VC++ editor]

    Rajesh,

    could you plzz tell me how i can enable that in .h file.
    Any other plugin or any configration...??

    If i can enabled this in .h files .it will help a lot

    plzzz give me a reply

  9. #9
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: class functions are not listing [ in VC++ editor]

    Joseph,
    I am not sure how to enable this. but can you try the following steps:
    close VC++ editor
    delete .opt & .ncb file
    open again..

Similar Threads

  1. Replies: 2
    Last Post: 16th March 2007, 09:04
  2. virtual overloaded functions and base class function call...
    By nouknouk in forum General Programming
    Replies: 7
    Last Post: 11th March 2006, 21:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.