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

[REG 5.9.1 => 5.9.2] qwebview_darwin.mm compiler warning on macOS 10.12, 10.13

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.4, 5.10.1
    • 5.9.2, 5.10.0
    • WebView
    • None
    • macOS
    • 4d4b118c1294d96741d71a775ac1c57b5acb96bb

    Description

      While attempting to build binaries for macOS 10.12 and 10.13 using homebrew in this pull request, a compiler warning was discovered in qwebview_darwin.mm that caused the build to fail because `-Werror` was supplied for that specific error:

      21:13:21 qwebview_darwin.mm:261:24: error: 'loadFileURL:allowingReadAccessToURL:' is only available on macOS 10.11 or newer [-Werror,-Wunguarded-availability]
       21:13:21 [wkWebView loadFileURL:url.toNSURL()
       21:13:21 ^~~~~~~~~~~~~~~~~~~~~~~~~
       21:13:21 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:102:1: note: 'loadFileURL:allowingReadAccessToURL:' has been explicitly marked partial here
       21:13:21 - (nullable WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL API_AVAILABLE(macosx(10.11), ios(9.0));
       21:13:21 ^
       21:13:21 qwebview_darwin.mm:261:24: note: enclose 'loadFileURL:allowingReadAccessToURL:' in an @available check to silence this warning
       21:13:21 [wkWebView loadFileURL:url.toNSURL()
       21:13:21 ^~~~~~~~~~~~~~~~~~~~~~~~~
       21:13:21 1 error generated.

      Note that the build succeeded with macOS 10.11.

      Attachments

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

        Activity

          People

            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            scpeters Steven Peters
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes