mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Coding style
[ci-skip]
This commit is contained in:
parent
545e0cd6b9
commit
40e476e626
@ -93,13 +93,11 @@ BookmarkItem* OperaImporter::importBookmarks()
|
|||||||
item = new BookmarkItem(BookmarkItem::Folder, PARENT);
|
item = new BookmarkItem(BookmarkItem::Folder, PARENT);
|
||||||
while (!m_stream.atEnd()) {
|
while (!m_stream.atEnd()) {
|
||||||
Token tok = parseLine(m_stream.readLine());
|
Token tok = parseLine(m_stream.readLine());
|
||||||
if (tok == EmptyLine) {
|
if (tok == EmptyLine)
|
||||||
break;
|
break;
|
||||||
}
|
else if (tok == KeyValuePair && m_key == QLatin1String("NAME"))
|
||||||
else if (tok == KeyValuePair && m_key == QLatin1String("NAME")) {
|
|
||||||
item->setTitle(m_value);
|
item->setTitle(m_value);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
folders.append(item);
|
folders.append(item);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -117,17 +115,16 @@ BookmarkItem* OperaImporter::importBookmarks()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (tok == KeyValuePair) {
|
else if (tok == KeyValuePair) {
|
||||||
if (m_key == QL1S("NAME")) {
|
if (m_key == QL1S("NAME"))
|
||||||
item->setTitle(m_value);
|
item->setTitle(m_value);
|
||||||
} else if (m_key == QL1S("URL")) {
|
else if (m_key == QL1S("URL"))
|
||||||
item->setUrl(QUrl(m_value));
|
item->setUrl(QUrl(m_value));
|
||||||
} else if (m_key == QL1S("DESCRIPTION")) {
|
else if (m_key == QL1S("DESCRIPTION"))
|
||||||
item->setDescription(m_value);
|
item->setDescription(m_value);
|
||||||
} else if (m_key == QL1S("SHORT NAME")) {
|
else if (m_key == QL1S("SHORT NAME"))
|
||||||
item->setKeyword(m_value);
|
item->setKeyword(m_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case StartSeparator:
|
case StartSeparator:
|
||||||
@ -159,7 +156,7 @@ BookmarkItem* OperaImporter::importBookmarks()
|
|||||||
|
|
||||||
OperaImporter::Token OperaImporter::parseLine(const QString &line)
|
OperaImporter::Token OperaImporter::parseLine(const QString &line)
|
||||||
{
|
{
|
||||||
QString str = line.trimmed();
|
const QString str = line.trimmed();
|
||||||
|
|
||||||
if (str.isEmpty()) {
|
if (str.isEmpty()) {
|
||||||
return EmptyLine;
|
return EmptyLine;
|
||||||
|
Loading…
Reference in New Issue
Block a user