[SOLVED] Watch Window doesn’t display values



  • I've upgraded my MacBook Pro to OSX Lion recently and when I started to debug a program that I'd written in Qt I noticed that when I put variables in the watch list, the value of the variable (in this case a QString) is not being displayed. The output from the watch list and the code that is being is below. I'm sure that the data is there as I output the data to a list window and it's correct.

    Any thoughts on what the problem might be? It compiler that I'm using is xCode 4.1 and the Qt environment is 4.7.4

    ** Code
    @
    QHashIterator<QString, GraphNode*> hash(graphData.getHash());
    while( hash.hasNext() )
    {
    hash.next();

        QString sValue = hash.value()->getName();
        int sPop = hash.value()->getHeuristic();
    
        QListWidgetItem *item = new QListWidgetItem(cityList);
        item->setData(Qt::DisplayRole, sValue);
        item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
    
        cityList->sortItems();
    }
    

    @

    ** Watch list output
    @
    graphData Graph
    sPop 636 int
    sValue QString
    d @0x101ccebb0 QString::Data *.
    alloc 12 int
    array [1] ushort [1]
    [0] 80 ushort
    asciiCache 0 ushort
    capacity 0 ushort
    clean 0 ushort
    data @0x101ccebca ushort *.
    *data 80 short unsigned int
    ref QBasicAtomicInt
    _q_value 3 int
    reserved 1247 ushort
    righttoleft 0 ushort
    simpletext 0 ushort
    size 8 int
    @



  • The problem was that the debugging helpers had not bee built. I've put a link to where I found the solution.

    Link:

    https://bugreports.qt.nokia.com/browse/QTSDK-1047


Log in to reply
 

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