Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-643

QHash Visualizer does not work with const type keys

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 2.5.0, 2.5.1
    • 2.3.2
    • Build-time integration
    • None
    • Qt 5.6.2
    • Windows
    • 194c47822efb3124ed2a3f9782ba901223777e80

    Description

      QHash< int, int > h2;
      h2[1] = 2;

      shows in the 'Autos' debugger tab:

        Name Value Type
      h2 { size = 1 } QHash<int,int>
        [referenced] 1 int
        [0] (empty) QHashNode<int,int>
        [1] (empty) QHashNode<int,int>
        [2] (empty) QHashNode<int,int>
        [3] (empty) QHashNode<int,int>
        [4] (empty) QHashNode<int,int>
        [5] (empty) QHashNode<int,int>
        [6] (empty) QHashNode<int,int>
        [7] (empty) QHashNode<int,int>
        [8] (empty) QHashNode<int,int>
        [9] (empty) QHashNode<int,int>
        [10] (empty) QHashNode<int,int>
        [11] (empty) QHashNode<int,int>
        [12] (empty) QHashNode<int,int>
        [13] (empty) QHashNode<int,int>
        [14] (1, 2) QHashNode<int,int>
        [15] (empty) QHashNode<int,int>
        [16] (empty) QHashNode<int,int>
        [Raw View] {d=0x03cee6e0 {fakeNext=0x00000000 <NULL> buckets=0x03c848e0 {0x03cee6e0 {next=0x00000000 <NULL> h=63457504 }} ...} ...} QHash<int,int>

       

      but

      QHash<const int, int > h1;
      h1[2] = 4711;

      gives this (eg does not work like above):

        Name Value Type
      h1 {d=0x03a9d4f0 {fakeNext=0x00000000 <NULL> buckets=0x03a3d770 {0x03a9d4f0 {next=0x00000000 <NULL> h=61069168 }} ...} ...} QHash<int const ,int>
        ◢ d 0x03a9d4f0 {fakeNext=0x00000000 <NULL> buckets=0x03a3d770 {0x03a9d4f0 {next=0x00000000 <NULL> h=61069168 }} ...} QHashData *
        ▶ fakeNext 0x00000000 <NULL> QHashData::Node *
        ▶ buckets 0x03a3d770 {0x03a9d4f0
      Unknown macro: {next=0x00000000 <NULL> h=61069168 }

      }

      QHashData::Node * *
        ▶ ref {atomic=\{_q_value=1 }

      }

      QtPrivate::RefCount
        size 1 int
        nodeSize 16 int
        userNumBits 4 short
        numBits 4 short
        numBuckets 17 int
        seed 1065579058 unsigned int
        sharable 1 unsigned int
        strictAlignment 0 unsigned int
        reserved 0 unsigned int
        ◢ e 0x03a9d4f0 (empty) QHashNode<int const ,int> *
        [Raw View] 0x03a9d4f0 {next=0x00000000 <NULL> h=61069168 key=1 ...} QHashNode<int const ,int> *

      This problem exists for any const type for QHash keys.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mecfc Miguel Costa
            hexcoder Heiko Eissfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes