diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-03-05 19:11:51 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-03-06 21:17:32 +0000 |
commit | 7152ec2f4783027b5c2f4d0c0816e4931acf32cc (patch) | |
tree | 8547b040f2bd2bd1831184ad2ab642cf6225e255 /src/assistant/assistant/bookmarkmanagerwidget.cpp | |
parent | ccbae6677e52f2b02cbd43608777f93c2b663a80 (diff) | |
download | qttools-7152ec2f4783027b5c2f4d0c0816e4931acf32cc.tar.gz |
Assistant: Fix an export and an import of bookmarks
Use the correct root index for BookmarkModel.
Allow to remove top-level bookmark folders if they were
created by importing bookmarks.
Task-number: QTBUG-44042
Change-Id: I423b141d0e64dec8c4cebfdba0d4401d575d1b96
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/assistant/assistant/bookmarkmanagerwidget.cpp')
-rw-r--r-- | src/assistant/assistant/bookmarkmanagerwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assistant/assistant/bookmarkmanagerwidget.cpp b/src/assistant/assistant/bookmarkmanagerwidget.cpp index 6c55ce7f4..3469f5925 100644 --- a/src/assistant/assistant/bookmarkmanagerwidget.cpp +++ b/src/assistant/assistant/bookmarkmanagerwidget.cpp @@ -239,7 +239,7 @@ void BookmarkManagerWidget::removeItem(const QModelIndex &index) { TRACE_OBJ QModelIndex current = index.isValid() ? index : ui.treeView->currentIndex(); - if (!bookmarkModel->parent(current).isValid()) + if (!current.parent().isValid() && current.row() < 2) return; // check if we should delete the "Bookmarks Menu", bail if (bookmarkModel->hasChildren(current)) { |