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

QWebEngineView is giving wrong geolocation coordinates

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • None
    • 5.14.0
    • Location
    • None
    • Archlinux 64bit Geoclue2
    • 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

            paangele Paolo Angelelli
            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