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

QWebEngineView is giving wrong geolocation coordinates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Out of scope
    • Affects Version/s: 5.14.0
    • Fix Version/s: None
    • Component/s: Location
    • Labels:
      None
    • Environment:
      Archlinux 64bit Geoclue2
    • Platform/s:
      Linux/X11

      Description

      With the following code:

      #include <QApplication>
      #include <QWebEngineView>
      #include <QWebEngineProfile>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QWebEngineView w;
          QObject::connect(w.page(), &QWebEnginePage::featurePermissionRequested, [&](const QUrl &securityOrigin, QWebEnginePage::Feature feature)
          {
              w.page()->setFeaturePermission(securityOrigin, feature, QWebEnginePage::PermissionGrantedByUser);
          });
          w.setUrl(QUrl("https://mycurrentlocation.net/"));
          w.show();
          return a.exec();
      }
      

      and a USB dongle connected to my 64bit Archlinux system (with geoclue2 installed and working), I don't get the correct geolocation coordinates (which I get on the same website with Google Chrome).

      There are both in France but 200km apart.

      A similar issue with the same coordinates seems to appear when centering on my position with a QML Map componenent.

        Attachments

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

          Activity

            People

            Assignee:
            paangele Paolo Angelelli
            Reporter:
            xavi-b xavi-b
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes