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

Core and TextEditor plugins should not use Qt private API

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 3.6.1
    • Qt Creator 4.0.0-beta1
    • Editors
    • None

    Description

      This looks easy to fix since both plugins call exactly the same function.

      basetextfind.cpp:395
               d->m_findScopeStart = QTextCursor(document()->docHandle(), qMax(0, cursor.selectionStart()));
      
      texteditoroverlay.cpp:95-96
           selection.m_cursor_begin = QTextCursor(document->docHandle(), begin);
           selection.m_cursor_end = QTextCursor(document->docHandle(), end);
      

      Please stop calling QTextDocument::docHandle and QTextCursor(QTextDocumentPrivate*, int). If you can't write the same functionality without those two functions, please create public equivalent versions of them that don't pass QTextDocumentPrivate pointers.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-15238
          # Subject Branch Project Status CR V

          Activity

            People

              davschul David Schulz
              thiago Thiago Macieira
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes