Results 1 to 3 of 3

Thread: Many Data Memebers For a Class

  1. #1
    Join Date
    Aug 2009
    Location
    Saudi Arabia - Buraidah
    Posts
    48
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Many Data Memebers For a Class

    Hi,

    If I have many data members in my class how can I check if one of these data members is not used in the implementation file?

    Thanks.

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 162 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Many Data Memebers For a Class

    a) manually
    b) compiler: rename (or remove) the member; if the code still compiles it is unused...
    c) use a good ide; there should be ide's that can spot such things

  3. The following user says thank you to caduel for this useful post:

    MIH1406 (3rd June 2010)

  4. #3
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Many Data Memebers For a Class

    Maybe you development environment provides something for this.
    Else a file grep would be the obvious choice, but it is also very tedious. Maybe you can automate this. A script that generates a search script based on the class definition.
    Qt Code:
    1. class MyClass {
    2. int m_aNumber;
    3. char someMethod(char* string);
    4. };
    To copy to clipboard, switch view to plain text mode 
    Out of this will something like the following be generated:
    Qt Code:
    1. grep m_aNumer /path/to/the/source
    2. grep someMethod /path/to/the/source
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QT Class to decode PDU data
    By cutie.monkey in forum Newbie
    Replies: 0
    Last Post: 4th July 2009, 05:52
  2. data rate transfer is decreasing in TCP connection
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2009, 16:15
  3. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 22:46
  4. default on class' public data
    By baray98 in forum General Programming
    Replies: 2
    Last Post: 29th July 2008, 02:04
  5. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.