Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72980

Uic generates invalid code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.13.0 Alpha 1
    • Build tools: uic
    • None
    • Linux/X11, Windows
    • 07580a8d7bc92085c7585e3cbe447562bf28ab85 (qt/qtbase/wip/qt6)

    Description

      Since commit "uic: Small refactorings" b86d0b62156993936bf93169a895a92ad60adf7d https://codereview.qt-project.org/#/c/245483/ I am getting a compile error in a ui_.h file:

      ./ui_form.h:49:41: error: 'QIcon' does not refer to a value
              tabWidget->addTab(tab1,         QIcon icon1;
                                              ^
      ../qtbase/src/widgets/kernel/qwidget.h:90:7: note: declared here
      class QIcon;
            ^
      

      The generated code looks like this:

              tabWidget->addTab(tab1,         QIcon icon1;
              icon1.addFile(QString::fromUtf8(":/icons.png"), QSize(), QIcon::Normal, QIcon::Off);
      icon1, QString());
      

      Attachments

        1. bug_uic.zip
          0.8 kB
        2. qtbug72980.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            mkrems Marcel Krems
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes