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

Don't show unused variable warnings/highlights for e.g. qScopeGuard

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • None
    • C/C++/Obj-C++ Support
    • None

    Description

      The following variable will be highlighted by Creator, presumably because it thinks it is unused:

      auto panelSplitViewOpacityRollback = qScopeGuard([=](){ panelSplitView->setOpacity(1); });
      

      This doesn't give a good impression of Creator's understanding of Qt API, as this is the intended usage of qScopeGuard:

      https://doc.qt.io/qt-5/qscopeguard.html#qScopeGuard

      Qt Creator 4.9.0
      Based on Qt 5.12.2 (Clang 10.0 (Apple), 64 bit)
      Built on Apr 11 2019 21:11:58
      From revision 7885bc899f
      

      The clang code model plugin is disabled.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes