1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Coding style

[ci-skip]
This commit is contained in:
David Rosca 2014-09-18 16:16:02 +02:00
parent 545e0cd6b9
commit 40e476e626

View File

@ -93,12 +93,10 @@ BookmarkItem* OperaImporter::importBookmarks()
item = new BookmarkItem(BookmarkItem::Folder, PARENT);
while (!m_stream.atEnd()) {
Token tok = parseLine(m_stream.readLine());
if (tok == EmptyLine) {
if (tok == EmptyLine)
break;
}
else if (tok == KeyValuePair && m_key == QLatin1String("NAME")) {
else if (tok == KeyValuePair && m_key == QLatin1String("NAME"))
item->setTitle(m_value);
}
}
folders.append(item);
break;
@ -117,15 +115,14 @@ BookmarkItem* OperaImporter::importBookmarks()
break;
}
else if (tok == KeyValuePair) {
if (m_key == QL1S("NAME")) {
if (m_key == QL1S("NAME"))
item->setTitle(m_value);
} else if (m_key == QL1S("URL")) {
else if (m_key == QL1S("URL"))
item->setUrl(QUrl(m_value));
} else if (m_key == QL1S("DESCRIPTION")) {
else if (m_key == QL1S("DESCRIPTION"))
item->setDescription(m_value);
} else if (m_key == QL1S("SHORT NAME")) {
else if (m_key == QL1S("SHORT NAME"))
item->setKeyword(m_value);
}
}
}
break;
@ -159,7 +156,7 @@ BookmarkItem* OperaImporter::importBookmarks()
OperaImporter::Token OperaImporter::parseLine(const QString &line)
{
QString str = line.trimmed();
const QString str = line.trimmed();
if (str.isEmpty()) {
return EmptyLine;