1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

WebPage: Bring back windowCloseRequested support

This commit is contained in:
David Rosca 2015-05-22 23:19:39 +02:00
parent 014d0d50ab
commit 286c714593
3 changed files with 5 additions and 5 deletions

View File

@ -99,12 +99,12 @@
</item>
<item>
<property name="text">
<string>Web Camera</string>
<string>Camera</string>
</property>
</item>
<item>
<property name="text">
<string>Microphone and Web Camera</string>
<string>Microphone and Camera</string>
</property>
</item>
<item>

View File

@ -55,12 +55,12 @@ HTML5PermissionsNotification::HTML5PermissionsNotification(const QUrl &origin, Q
case QWebEnginePage::MediaVideoCapture:
ui->iconLabel->setPixmap(QPixmap(":icons/other/webcam.png"));
ui->textLabel->setText(tr("Allow %1 to use your web camera?").arg(site));
ui->textLabel->setText(tr("Allow %1 to use your camera?").arg(site));
break;
case QWebEnginePage::MediaAudioVideoCapture:
ui->iconLabel->setPixmap(QPixmap(":icons/other/microphone-webcam.png"));
ui->textLabel->setText(tr("Allow %1 to use your microphone and web camera?").arg(site));
ui->textLabel->setText(tr("Allow %1 to use your microphone and camera?").arg(site));
break;
case QWebEnginePage::MouseLock:

View File

@ -80,6 +80,7 @@ WebPage::WebPage(QObject* parent)
, m_adjustingScheduled(false)
{
connect(this, &QWebEnginePage::featurePermissionRequested, this, &WebPage::featurePermissionRequested);
connect(this, &QWebEnginePage::windowCloseRequested, this, &WebPage::windowCloseRequested);
#if QTWEBENGINE_DISABLED
m_javaScriptEnabled = QWebEngineSettings::globalSettings()->testAttribute(QWebEngineSettings::JavascriptEnabled);
@ -98,7 +99,6 @@ WebPage::WebPage(QObject* parent)
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(finished()));
connect(this, SIGNAL(printRequested(QWebFrame*)), this, SLOT(printFrame(QWebFrame*)));
connect(this, SIGNAL(downloadRequested(QNetworkRequest)), this, SLOT(downloadRequested(QNetworkRequest)));
connect(this, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
frameCreated(mainFrame());
connect(this, SIGNAL(frameCreated(QWebFrame*)), this, SLOT(frameCreated(QWebFrame*)));