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

QVector / QList with enum shows raw view or wrong value during debugging.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 2.7.2 (rev.02)
    • Debug/test integration
    • None
    • Visual Studio Community 2015 Update 3, Qt 5.9.1 msvc2015_64
    • Windows

    Description

      When debugging in Visual Studio 2015, variables of QVector or QList containing an enum type may have incorrect display in DataTip and Watch Windows.

      Case 1: When the enum type and the QVector/QList variable are in the same function, the variable only shows raw view.
      Case 2: When the enum type is outside the function or in the header file, the QVector displays correctly, but the QList shows random int.

      Example:

      enum E_Types
      {
          Type_One,
          Type_Two,
          Type_Three,
      };
      // In case 1: vt.d displayed.
      // In case 2: vt's three elements displayed correctly.
      QVector<E_Types> vt;
      vt << Type_One << Type_Two << Type_Three;
      // In case 1: lt.p, lt.d displayed.
      // In case 2: lt's three elements displayed in random int.
      QList<E_Types> lt;
      lt << Type_One << Type_Two << Type_Three;

      Attachments

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

        Activity

          People

            mecfc Miguel Costa
            wym YM W
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes