From 0b8b9695350dd263ede4261e5fefca9996412b49 Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 10 Feb 2014 21:12:08 +0100 Subject: [PATCH] [Bookmarks] Fixed migrating bookmarks Folders in unsorted bookmarks were lost during migration --- src/lib/bookmarks/bookmarkstools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/bookmarks/bookmarkstools.cpp b/src/lib/bookmarks/bookmarkstools.cpp index 853205c78..1906652ef 100644 --- a/src/lib/bookmarks/bookmarkstools.cpp +++ b/src/lib/bookmarks/bookmarkstools.cpp @@ -363,7 +363,8 @@ bool BookmarksTools::migrateBookmarksIfNecessary(Bookmarks* bookmarks) const QString title = query.value(0).toString(); bool subfolder = query.value(1).toString() == QLatin1String("yes"); - BookmarkItem* folder = new BookmarkItem(BookmarkItem::Folder, subfolder ? bookmarks->toolbarFolder() : 0); + BookmarkItem* parent = subfolder ? bookmarks->toolbarFolder() : bookmarks->unsortedFolder(); + BookmarkItem* folder = new BookmarkItem(BookmarkItem::Folder, parent); folder->setTitle(title); folders.insert(folder->title(), folder); }