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

acceptTouchEvents is misleading

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.15.0
    • Widgets: GraphicsView
    • None
    • All

    Description

      The name of QGraphicsItem::acceptTouchEvents is misleading, as in the following code:

      auto* pItem = new MyTouchButtonItem();
      pItem->acceptTouchEvent();
      pMyScene->addItem(pItem);
      

      I understand that changing the name would be a breaking change, so I suggest an alternative:

      Make the return value [[nodiscard]], so the code above would at least trigger a warning.

      Attachments

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

        Activity

          People

            bibr Andreas Aardal Hanssen
            asperamanca Robert Schimkowitsch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes