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

High CPU Usage Related to Scroll Bar Position

    XMLWordPrintable

Details

    • macOS
    • af52b65d6a6b4fe50deb074474c55817c669556f (qt-creator/qt-creator/4.11)

    Description

      When I move horizontal scroll bar of the code editor to the right, the cpu goes crazy, if I align it to the left back again, it turns back to normal. I believe I have been encountering this bug for several major Qt versions along the way in the past. I decided to report it. Please watch the video I attached below. (I don't think this is something to do with macOS version)

      Plus I had some similar bug in my own C++ program back in the days when I was coding a QML code editor with QPlainTextEdit. I think problem might be related to the line number painting code within the Qt Creator's codes. I would consider checking out for and while loop usages within the texteditor plugin.

      Possible buggy functions that I would suggest looking at first:

      void paintLineNumbers(QPainter &painter, const ExtraAreaPaintEventData &data,
          const QRectF &blockBoundingRect) const;
      void paintTextMarks(QPainter &painter, const ExtraAreaPaintEventData &data,
          const QRectF &blockBoundingRect) const;
      void paintCodeFolding(QPainter &painter, const ExtraAreaPaintEventData &data,
          const QRectF &blockBoundingRect) const;
      void paintRevisionMarker(QPainter &painter, const ExtraAreaPaintEventData &data,
          const QRectF &blockBoundingRect) const;
      

      Attachments

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

        Activity

          People

            davschul David Schulz
            kozmon Ömer Göktaş
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes