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

Not quite appropriate fix offered for adding char constants/ chars

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.0.0-beta1
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes