1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Fixed rendering pages with Qt 5

Filtering "\" from AdBlock CSS rules.
This commit is contained in:
nowrep 2012-12-20 22:57:58 +01:00
parent 365c0d5efd
commit cadfd63b1e
3 changed files with 5 additions and 2 deletions

View File

@ -370,6 +370,7 @@ void AdBlockRule::parseFilter()
}
m_cssSelector = parsedLine.mid(pos + 2);
m_cssSelector.remove('\\');
// CSS rule cannot have more options -> stop parsing
return;
}

View File

@ -357,6 +357,7 @@ void MainApplication::loadSettings()
m_websettings->enablePersistentStorage(m_activeProfil);
m_websettings->setAttribute(QWebSettings::LocalStorageEnabled, settings.value("HTML5StorageEnabled", true).toBool());
}
m_websettings->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
m_websettings->setAttribute(QWebSettings::PluginsEnabled, settings.value("allowFlash", true).toBool());
m_websettings->setAttribute(QWebSettings::JavascriptEnabled, settings.value("allowJavaScript", true).toBool());
@ -854,8 +855,7 @@ QUrl MainApplication::userStyleSheet(const QString &filePath) const
{
// Set default white background for all sites
// Fixes issue with dark themes when sites don't set background
QString userStyle /*= "body{background-color:white;}"*/;
QString userStyle /*= "html{background-color:white;}"*/;
userStyle += AdBlockManager::instance()->elementHidingRules() + "{ display:none !important;}";
QFile file(filePath);

View File

@ -62,6 +62,8 @@ RSSNotification::RSSNotification(const QString &title, const QUrl &url, WebView*
<< RssApp("Yahoo!", "http://add.my.yahoo.com/rss?url=", QIcon(":/icons/sites/yahoo.png"));
#ifdef Q_WS_X11
// TODO: Not really clever solution.
// It should look in PATH
if (QFile("/usr/bin/akregator").exists()) {
m_rssApps << RssApp("Akregator", "/usr/bin/akregator -a ", QIcon(":/icons/sites/akregator.png"), DesktopApplication);
}