fix macosx build

This commit is contained in:
Martin Rotter 2020-07-13 11:08:38 +02:00
parent c7543f56a3
commit a695a4f0ff

View File

@ -289,12 +289,12 @@ void AdBlockCustomList::loadSubscription(const QStringList& disabledRules) {
stream.setCodec("UTF-8");
if (!rules.contains(ddg1 + QL1S("\n"))) {
stream << ddg1 << Qt::endl;
if (!rules.contains(ddg1 + QL1C('\n'))) {
stream << ddg1 << QL1C('\n');
}
if (!rules.contains(QL1S("\n") + ddg2)) {
stream << ddg2 << Qt::endl;
if (!rules.contains(QL1C('\n') + ddg2)) {
stream << ddg2 << QL1C('\n');
}
}
@ -313,12 +313,12 @@ void AdBlockCustomList::saveSubscription() {
QTextStream textStream(&file);
textStream.setCodec("UTF-8");
textStream << "Title: " << title() << Qt::endl;
textStream << "Url: " << url().toString() << Qt::endl;
textStream << "[Adblock Plus 1.1.1]" << Qt::endl;
textStream << "Title: " << title() << QL1C('\n');
textStream << "Url: " << url().toString() << QL1C('\n');
textStream << "[Adblock Plus 1.1.1]" << QL1C('\n');
for (const AdBlockRule* rule : m_rules) {
textStream << rule->filter() << Qt::endl;
textStream << rule->filter() << QL1C('\n');
}
file.close();