diff options
author | 2022-03-30 04:24:36 +0530 | |
---|---|---|
committer | 2022-03-30 04:24:36 +0530 | |
commit | 474b9212a6630c8404d5f4cf7aa02428deddd3fd (patch) | |
tree | d3ae12704da254acb18c74fd5e741ae2b1c055ea /src/webenginepage.cpp | |
parent | 8f071469453c6dbbe3c3dbc78ee893f239835b5a (diff) | |
download | whatsie-474b9212a6630c8404d5f4cf7aa02428deddd3fd.tar.gz whatsie-474b9212a6630c8404d5f4cf7aa02428deddd3fd.zip |
feat: v4.0 (#35)
* add new widgets
* feat: version 4.0
- SystemTray: tray icon uses png rather than svg
- SystemTray: added settings to lets user change the systemtray icon click behavior(minimize/maximize on right click)
- Download: added settiing that lets user set default download directory, avoid asking while saving files
- Lock: added setting to let user change current set password for lock screen
- Lock: current set password now hidden by default and can be revealed for 5 seconds by pressing view button
- Style/Theme: added ability to change widget style on the fly, added default light palatte (prevent breaking of light theme on KDE EVs)
- Theme: dark theme update
- WebApp: added setting to set zoom factor when window is maximized and fullscreen (gives user ability to set different zoom factor for Normal , Maximized/Fullscreen WindowStates)
- Setting: settings UI is more oraganized
- WebApp: enable JavaScript execCommand("paste")
- WebApp: tested for new WhatsApp Web that lets users use whatsie without requiring the phone connected to internet
Diffstat (limited to 'src/webenginepage.cpp')
-rw-r--r-- | src/webenginepage.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/webenginepage.cpp b/src/webenginepage.cpp index d5ecfff..451d187 100644 --- a/src/webenginepage.cpp +++ b/src/webenginepage.cpp @@ -6,7 +6,6 @@ WebEnginePage::WebEnginePage(QWebEngineProfile *profile, QObject *parent) : QWebEnginePage(profile, parent) { - // Connect signals and slots profile->setHttpUserAgent( profile->httpUserAgent().replace("QtWebEngine/5.13.0", "")); connect(this, &QWebEnginePage::loadFinished, this, @@ -29,8 +28,6 @@ WebEnginePage::WebEnginePage(QWebEngineProfile *profile, QObject *parent) bool WebEnginePage::acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) { - qDebug() << "Navigation request: [" + url.toDisplayString() + "] " + type; - if (QWebEnginePage::NavigationType::NavigationTypeLinkClicked == type) { QDesktopServices::openUrl(url); return false; @@ -132,7 +129,6 @@ void WebEnginePage::handleLoadFinished(bool ok) { void WebEnginePage::fullScreenRequestedByPage( QWebEngineFullScreenRequest request) { - // qDebug()<<"Fullscreen"; request.accept(); } @@ -216,9 +212,9 @@ void WebEnginePage::handleAuthenticationRequired(const QUrl &requestUrl, nullptr, mainWindow)); passwordDialog.m_iconLabel->setPixmap(icon.pixmap(32, 32)); - QString introMessage(tr("Enter username and password for \"%1\" at %2") - .arg(auth->realm()) - .arg(requestUrl.toString().toHtmlEscaped())); + QString introMessage( + tr("Enter username and password for \"%1\" at %2") + .arg(auth->realm(), requestUrl.toString().toHtmlEscaped())); passwordDialog.m_infoLabel->setText(introMessage); passwordDialog.m_infoLabel->setWordWrap(true); @@ -264,11 +260,10 @@ void WebEnginePage::handleProxyAuthenticationRequired( //! [registerProtocolHandlerRequested] void WebEnginePage::handleRegisterProtocolHandlerRequested( QWebEngineRegisterProtocolHandlerRequest request) { - auto answer = - QMessageBox::question(view()->window(), tr("Permission Request"), - tr("Allow %1 to open all %2 links?") - .arg(request.origin().host()) - .arg(request.scheme())); + auto answer = QMessageBox::question( + view()->window(), tr("Permission Request"), + tr("Allow %1 to open all %2 links?") + .arg(request.origin().host(), request.scheme())); if (answer == QMessageBox::Yes) request.accept(); else @@ -283,7 +278,7 @@ void WebEnginePage::handleSelectClientCertificate( selection.select(selection.certificates().at(0)); qDebug() << __FUNCTION__; - for (QSslCertificate cert : selection.certificates()) { + for (const QSslCertificate &cert : selection.certificates()) { qDebug() << cert; selection.select(cert); // select the first available cert break; |