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

OperaImporter: Also import bookmark description and keyword

This commit is contained in:
David Rosca 2014-09-18 16:10:50 +02:00
parent ef01247a80
commit 545e0cd6b9

View File

@ -78,7 +78,7 @@ bool OperaImporter::prepareImport()
BookmarkItem* OperaImporter::importBookmarks()
{
BookmarkItem* root = new BookmarkItem(BookmarkItem::Folder);
root->setTitle("Opera Import");
root->setTitle(QSL("Opera Import"));
QList<BookmarkItem*> folders;
folders.append(root);
@ -116,11 +116,16 @@ BookmarkItem* OperaImporter::importBookmarks()
if (tok == EmptyLine) {
break;
}
else if (tok == KeyValuePair && m_key == QLatin1String("NAME")) {
item->setTitle(m_value);
}
else if (tok == KeyValuePair && m_key == QLatin1String("URL")) {
item->setUrl(QUrl(m_value));
else if (tok == KeyValuePair) {
if (m_key == QL1S("NAME")) {
item->setTitle(m_value);
} else if (m_key == QL1S("URL")) {
item->setUrl(QUrl(m_value));
} else if (m_key == QL1S("DESCRIPTION")) {
item->setDescription(m_value);
} else if (m_key == QL1S("SHORT NAME")) {
item->setKeyword(m_value);
}
}
}
break;