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

emit a signal when webpage launching external url

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 5.15.1
    • WebEngine
    • None
    • All

    Description

      Sometimes when webpage launching external url,  user maybe want to get a prompt dialog just like chrome, or get a choice to decide whether launch external application or not.

      This means in src/core/web_contents_delegate_qt.cpp

      void WebContentsDelegateQt::launchExternalURL(const QUrl &url, ui::PageTransition page_transition, bool is_main_frame, bool has_user_gesture)
      { 
      ........ 
      if (navigationRequestAccepted)     
          QDesktopServices::openUrl(url); 
      ....... 
      } 

      it is better not call "QDesktopServices::openUrl" directly,  I suggest it should just emit a signal, let developer who use qtwebengine to handle it.

      Attachments

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              wangjuna Jun Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change