Debugger and static data...



  • I have an object with a large amount of static const char* pointers, in this object I have a QList of the same type:

        QList<clsXMLnode*> mlstChildren;
    

    The class has a method:

        void clsXMLnode::appendChild(clsXMLnode* pobjChild) {
            assert(pobjChild != NULL);
            mlstChildren.append(pobjChild);
            ....
    

    The problem is when I look at pobjChild in the debugger I can see that all the static data is initialised correctly and present, however the node in mlstChildren whilst it has the exact same address as pobjChild, it does not have any of the static data, instead all the static data contains "".

    I then modified my method as follows:

        void clsXMLnode::appendChild(clsXMLnode* pobjChild) {
            assert(pobjChild != NULL);
            int intNewIdx = mlstChildren.length();
            mlstChildren.append(pobjChild);
            clsXMLnode* pobjCheck = mlstChildren.at[intNewIdx];
            ....
    

    Using the debugger I can see that pobjCheck matches pobjChild exactly including all the static data, which is what I expect, but the contents of mlstChildren do not, the pointer address is correct, but the static data displayed in the debug watch window does not match....I can only think that this is a bug in the debugger?

    If I try to expand one of the child nodes in 'mlstChildren' I get:

        can't find linker symbol for virtual table for 'clsXMLnode' value
            found 'clsXMLnode::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' instead
    

    Which is displayed in the 'Application Output' console.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.