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

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.2, 5.10.0
    • Fix Version/s: 5.9.4, 5.10.1
    • Component/s: WebView
    • Labels:
      None
    • Platform/s:
      macOS
    • Commits:
      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

            Assignee:
            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            Reporter:
            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