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

Qt Help Module: QtHelpContentWidget indexOf Method does not consider fragments in url

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.5
    • Other
    • None

    Description

      I am using Qt Help to integrate Help in my application. I want to

      • scroll to the keyword in the Qt Content Widget and programmatically select the item
      • show the help in QTextBrowser

      I get the index of the keyword by using:

      QMap<QString, QUrl> links = QtHelpEngineCore::linksForKeyword( keyword );

      and then in the QHelpContentWidget is use the method indexOf( url );

      To get the item in the TreeView.

      This does not work, cause always the parent item is selected. Reason seems to be that the QUrl has a fragment (in html an anchor) and the fragment part is not considered in the implementation of the indexOf Method, therefore returning just the parent node.

       

      The ContentWidget shows the childs from the fragments perfectly, and selecting them opens the help like wanted. Just the indexOf method seems not to work.

      The url provided has the fragment #module-flags.flags, the url from the QHelpContentItem has the fragment #name-function-flags cause they link to different parts of the page

       

       

       

       

       

       

       

      Attachments

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

        Activity

          People

            portale Alessandro Portale
            j.kreuzberger Joerg Kreuzberger
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes