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

Not quite appropriate fix offered for adding char constants/ chars

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • Qt Creator 4.0.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • WIndows

    Description

      Do standard exercise when triaging bugs (adding title with version):

      QWidget mainWin;
      mainWin.setWindowTitle(QT_VERSION_STR + 'a' + QString::number(2));
      

      Note line is highlighted and Quick fix on QT_VERSION_STR is "Apply fix: Use array indexing" which results in

      mainWin.setWindowTitle(&QT_VERSION_STR [ 'a'] + QString::number(2));
      

      Expected Quick fix would be "Enclose QT_VERSION_STR in QLatin1String()" (as reported before and was under rare circumstances working with the old model).

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              kleint Friedemann Kleint
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes