diff --git a/src/plugins/StatusBarIcons/sbi_icon.cpp b/src/plugins/StatusBarIcons/sbi_icon.cpp index cc5e541fd..752f84f15 100644 --- a/src/plugins/StatusBarIcons/sbi_icon.cpp +++ b/src/plugins/StatusBarIcons/sbi_icon.cpp @@ -27,19 +27,19 @@ SBI_Icon::SBI_Icon(BrowserWindow* window, const QString &settingsPath) { } -bool SBI_Icon::testCurrentPageWebAttribute(QWebSettings::WebAttribute attr) const +bool SBI_Icon::testCurrentPageWebAttribute(QWebEngineSettings::WebAttribute attr) const { return currentPageSettings() && currentPageSettings()->testAttribute(attr); } -void SBI_Icon::setCurrentPageWebAttribute(QWebSettings::WebAttribute attr, bool value) +void SBI_Icon::setCurrentPageWebAttribute(QWebEngineSettings::WebAttribute attr, bool value) { if (currentPageSettings()) { currentPageSettings()->setAttribute(attr, value); } } -QWebSettings* SBI_Icon::currentPageSettings() const +QWebEngineSettings* SBI_Icon::currentPageSettings() const { if (!m_window->weView()) { return 0; diff --git a/src/plugins/StatusBarIcons/sbi_icon.h b/src/plugins/StatusBarIcons/sbi_icon.h index 65b3ba11f..c450c4989 100644 --- a/src/plugins/StatusBarIcons/sbi_icon.h +++ b/src/plugins/StatusBarIcons/sbi_icon.h @@ -18,7 +18,7 @@ #ifndef SBI_ICON_H #define SBI_ICON_H -#include +#include #include "clickablelabel.h" @@ -33,10 +33,10 @@ public: explicit SBI_Icon(BrowserWindow* window, const QString &settingsPath = QString()); protected: - bool testCurrentPageWebAttribute(QWebSettings::WebAttribute attr) const; - void setCurrentPageWebAttribute(QWebSettings::WebAttribute attr, bool value); + bool testCurrentPageWebAttribute(QWebEngineSettings::WebAttribute attr) const; + void setCurrentPageWebAttribute(QWebEngineSettings::WebAttribute attr, bool value); - QWebSettings* currentPageSettings() const; + QWebEngineSettings* currentPageSettings() const; WebPage* currentPage() const; BrowserWindow* m_window; diff --git a/src/plugins/StatusBarIcons/sbi_iconsmanager.cpp b/src/plugins/StatusBarIcons/sbi_iconsmanager.cpp index 84c34038b..98fdad24d 100644 --- a/src/plugins/StatusBarIcons/sbi_iconsmanager.cpp +++ b/src/plugins/StatusBarIcons/sbi_iconsmanager.cpp @@ -136,6 +136,7 @@ void SBI_IconsManager::mainWindowCreated(BrowserWindow* window) m_windows[window].append(w); } +#if QTWEBENGINE_DISABLED if (m_showNetworkIcon) { if (!m_networkManager) { m_networkManager = new SBI_NetworkManager(m_settingsPath, this); @@ -145,6 +146,7 @@ void SBI_IconsManager::mainWindowCreated(BrowserWindow* window) window->statusBar()->addPermanentWidget(w); m_windows[window].append(w); } +#endif if (m_showZoomWidget) { SBI_ZoomWidget* w = new SBI_ZoomWidget(window); diff --git a/src/plugins/StatusBarIcons/sbi_imagesicon.cpp b/src/plugins/StatusBarIcons/sbi_imagesicon.cpp index 6e6cc367e..bff994c1d 100644 --- a/src/plugins/StatusBarIcons/sbi_imagesicon.cpp +++ b/src/plugins/StatusBarIcons/sbi_imagesicon.cpp @@ -39,7 +39,7 @@ SBI_ImagesIcon::SBI_ImagesIcon(BrowserWindow* window, const QString &settingsPat m_loadingImages = settings.value("LoadImages", true).toBool(); settings.endGroup(); - QWebSettings::globalSettings()->setAttribute(QWebSettings::AutoLoadImages, m_loadingImages); + QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::AutoLoadImages, m_loadingImages); updateIcon(); @@ -55,7 +55,7 @@ void SBI_ImagesIcon::showMenu(const QPoint &point) QMenu menu; menu.addAction(m_icon, tr("Current Page Settings"))->setFont(boldFont); - if (testCurrentPageWebAttribute(QWebSettings::AutoLoadImages)) { + if (testCurrentPageWebAttribute(QWebEngineSettings::AutoLoadImages)) { menu.addAction(tr("Disable loading images (temporarily)"), this, SLOT(toggleLoadingImages())); } else { @@ -75,8 +75,8 @@ void SBI_ImagesIcon::showMenu(const QPoint &point) void SBI_ImagesIcon::toggleLoadingImages() { - bool current = testCurrentPageWebAttribute(QWebSettings::AutoLoadImages); - setCurrentPageWebAttribute(QWebSettings::AutoLoadImages, !current); + bool current = testCurrentPageWebAttribute(QWebEngineSettings::AutoLoadImages); + setCurrentPageWebAttribute(QWebEngineSettings::AutoLoadImages, !current); // We should reload page on disabling images if (current) { @@ -96,7 +96,7 @@ void SBI_ImagesIcon::setGlobalLoadingImages(bool enable) // Switch it in websettings m_loadingImages = enable; - QWebSettings::globalSettings()->setAttribute(QWebSettings::AutoLoadImages, m_loadingImages); + QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::AutoLoadImages, m_loadingImages); updateIcon(); // We should reload page on disabling images @@ -107,7 +107,7 @@ void SBI_ImagesIcon::setGlobalLoadingImages(bool enable) void SBI_ImagesIcon::updateIcon() { - if (testCurrentPageWebAttribute(QWebSettings::AutoLoadImages)) { + if (testCurrentPageWebAttribute(QWebEngineSettings::AutoLoadImages)) { setGraphicsEffect(0); } else { diff --git a/src/plugins/StatusBarIcons/sbi_javascripticon.cpp b/src/plugins/StatusBarIcons/sbi_javascripticon.cpp index f3043c3eb..0cc72dbc9 100644 --- a/src/plugins/StatusBarIcons/sbi_javascripticon.cpp +++ b/src/plugins/StatusBarIcons/sbi_javascripticon.cpp @@ -23,7 +23,7 @@ #include "jsoptions.h" #include -#include +#include #include SBI_JavaScriptIcon::SBI_JavaScriptIcon(BrowserWindow* window) @@ -49,7 +49,7 @@ void SBI_JavaScriptIcon::showMenu(const QPoint &point) QMenu menu; menu.addAction(m_icon, tr("Current Page Settings"))->setFont(boldFont); - if (testCurrentPageWebAttribute(QWebSettings::JavascriptEnabled)) { + if (testCurrentPageWebAttribute(QWebEngineSettings::JavascriptEnabled)) { menu.addAction(tr("Disable JavaScript (temporarily)"), this, SLOT(toggleJavaScript())); } else { @@ -69,7 +69,7 @@ void SBI_JavaScriptIcon::showMenu(const QPoint &point) void SBI_JavaScriptIcon::updateIcon() { - if (testCurrentPageWebAttribute(QWebSettings::JavascriptEnabled)) { + if (testCurrentPageWebAttribute(QWebEngineSettings::JavascriptEnabled)) { setGraphicsEffect(0); } else { @@ -86,7 +86,7 @@ void SBI_JavaScriptIcon::toggleJavaScript() } - bool current = testCurrentPageWebAttribute(QWebSettings::JavascriptEnabled); + bool current = testCurrentPageWebAttribute(QWebEngineSettings::JavascriptEnabled); currentPage()->setJavaScriptEnabled(!current); m_window->weView()->reload(); diff --git a/src/plugins/StatusBarIcons/sbi_networkicon.cpp b/src/plugins/StatusBarIcons/sbi_networkicon.cpp index c4c2ccfdf..387d6adb7 100644 --- a/src/plugins/StatusBarIcons/sbi_networkicon.cpp +++ b/src/plugins/StatusBarIcons/sbi_networkicon.cpp @@ -105,6 +105,7 @@ void SBI_NetworkIcon::updateToolTip() tooltip = tooltip.arg(tr("Offline")); } +#if QTWEBENGINE_DISABLED switch (mApp->networkManager()->proxyFactory()->proxyPreference()) { case NetworkProxyFactory::SystemProxy: tooltip = tooltip.arg(tr("System proxy")); @@ -126,6 +127,7 @@ void SBI_NetworkIcon::updateToolTip() qWarning() << "Unknown NetworkProxyFactory::ProxyPreference!"; break; } +#endif if (SBINetManager->currentProxy()) { tooltip.append(QString(" (%1)").arg(SBINetManager->currentProxyName())); diff --git a/src/plugins/StatusBarIcons/sbi_networkmanager.cpp b/src/plugins/StatusBarIcons/sbi_networkmanager.cpp index 5d01607b1..6a2e5f981 100644 --- a/src/plugins/StatusBarIcons/sbi_networkmanager.cpp +++ b/src/plugins/StatusBarIcons/sbi_networkmanager.cpp @@ -129,7 +129,9 @@ void SBI_NetworkManager::applyCurrentProxy() settings.endGroup(); settings.sync(); +#if QTWEBENGINE_DISABLED mApp->networkManager()->proxyFactory()->loadSettings(); +#endif } void SBI_NetworkManager::deleteProxies() diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 46bfe9248..1b4d4e4af 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -48,7 +48,6 @@ disablePlugin(GreaseMonkey) disablePlugin(MailHandle) disablePlugin(MouseGestures) disablePlugin(PIM) -disablePlugin(StatusBarIcons) disablePlugin(TabManager) disablePlugin(TestPlugin) disablePlugin(Videoner)