Skip to content

Commit

Permalink
Disable geolocations because WinRT location crashes on Win10
Browse files Browse the repository at this point in the history
  • Loading branch information
r52 committed Jun 9, 2017
1 parent 0cc0008 commit 905112a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 905112a

Please sign in to comment.