From 905112a29237696a906b8b90ae448fc28e825011 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 9 Jun 2017 15:43:04 -0700 Subject: [PATCH] Disable geolocations because WinRT location crashes on Win10 --- src/webwidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webwidget.cpp b/src/webwidget.cpp index 801d9802..a2a6fa18 100644 --- a/src/webwidget.cpp +++ b/src/webwidget.cpp @@ -67,6 +67,7 @@ WebWidget::WebWidget(QString widgetName, const QJsonObject& dat, QWidget* parent webview->page()->setBackgroundColor(Qt::transparent); } + /* // Handle geolocation access permission connect(page, &QWebEnginePage::featurePermissionRequested, [=](const QUrl& securityOrigin, QWebEnginePage::Feature feature) { if (feature != QWebEnginePage::Geolocation) @@ -88,7 +89,7 @@ WebWidget::WebWidget(QString widgetName, const QJsonObject& dat, QWidget* parent else { QMessageBox msgBox(this); - msgBox.setText(tr("Widget %1 wants to know your location").arg(this->getName())); + msgBox.setText(tr("Widget %1 (%2) wants to know your location").arg(this->getName()).arg(securityOrigin.host())); msgBox.setInformativeText(tr("Do you want to send your current location to this widget?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); @@ -108,6 +109,7 @@ WebWidget::WebWidget(QString widgetName, const QJsonObject& dat, QWidget* parent allowgeo[data[WGT_DEF_FULLPATH].toString()] = (perm == QWebEnginePage::PermissionGrantedByUser); settings.setValue(QUASAR_CONFIG_ALLOWGEO, allowgeo); }); + */ // Overlay for catching drag and drop events overlay = new OverlayWidget(this);