From 545e0cd6b9d112100f80eed67fa7d0628e8929bf Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 18 Sep 2014 16:10:50 +0200 Subject: [PATCH] OperaImporter: Also import bookmark description and keyword --- .../bookmarks/bookmarksimport/operaimporter.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib/bookmarks/bookmarksimport/operaimporter.cpp b/src/lib/bookmarks/bookmarksimport/operaimporter.cpp index 4def7250c..9f97daa81 100644 --- a/src/lib/bookmarks/bookmarksimport/operaimporter.cpp +++ b/src/lib/bookmarks/bookmarksimport/operaimporter.cpp @@ -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 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;