Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-3610

Code completion for nested struct/unions

XMLWordPrintable

    • 080bf4ecb8b7b70d6410e3342e37dacd5aef8ff3

      I just did a test with Qt Creator 2.0.94 (2.1.0-rc1) Linux and there is still a problem with completing nested structs/union (see attached picture).

      Thanks in advance.

      #include "mainwindow.h"
      #include "ui_mainwindow.h"
      
      typedef union {
      	int Word;
      	struct {
      		int Test1: 1;
      		int Test2: 1;
      		int Test3: 1;
      		int Test4: 1;
      	} Bit;
      } TTestUnion;
      
      MainWindow::MainWindow(QWidget *parent) :
      	QMainWindow(parent),
      	ui(new Ui::MainWindow)
      {
      	ui->setupUi(this);
      }
      
      MainWindow::~MainWindow()
      {
      	delete ui;
      }
      
      void MainWindow::on_pushButton_clicked()
      {
      	TTestUnion tu;
      
      	tu.Bit.Test1 = 1;
      }
      

        1. creator21rc.png
          68 kB
          André Hartmann
        2. test.png
          86 kB
          car sprayer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            erikv Erik Verbruggen
            aha_1980 André Hartmann
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes