Fixed rendering pages with Qt 5

Filtering "\" from AdBlock CSS rules.
remotes/origin/falkon
nowrep 13 years ago
parent 365c0d5efd
commit cadfd63b1e
  1. 1
      src/lib/adblock/adblockrule.cpp
  2. 4
      src/lib/app/mainapplication.cpp
  3. 2
      src/lib/rss/rssnotification.cpp

@ -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;
}

@ -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);

@ -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);
}

Loading…
Cancel
Save