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

AdBlock + GreaseMonkey: Fixed downloading UTF-8 subscriptions / scripts

This commit is contained in:
nowrep 2012-07-12 15:14:02 +02:00
parent f65b30fda7
commit f70d77a413
2 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ void AdBlockSubscription::subscriptionDownloaded()
return;
}
QByteArray response = m_reply->readAll();
QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
if (m_reply->error() == QNetworkReply::NoError && response.startsWith("[Adblock")) {
// Prepend subscription info

View File

@ -52,7 +52,7 @@ void GM_Downloader::scriptDownloaded()
return;
}
QByteArray response = m_reply->readAll();
QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
if (m_reply->error() == QNetworkReply::NoError && response.contains("// ==UserScript==")) {
const QString &filePath = m_manager->scriptsDirectory() + qz_getFileNameFromUrl(m_reply->url());
@ -97,7 +97,7 @@ void GM_Downloader::requireDownloaded()
return;
}
QByteArray response = m_reply->readAll();
QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
if (m_reply->error() == QNetworkReply::NoError && !response.isEmpty()) {
const QString &filePath = m_manager->settinsPath() + "/greasemonkey/requires/require.js";