Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Frameworks
KBookmarks
Commits
4d34879e
Commit
4d34879e
authored
Dec 25, 2013
by
Dawit Alemayehu
Browse files
When a user creates a new bookmark folder make that the current item.
BUG: 152158
REVIEW: 114479 FIXED-IN: 4.12.1
parent
a6b0da5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kbookmarkdialog.cpp
View file @
4d34879e
...
...
@@ -99,12 +99,16 @@ void KBookmarkDialogPrivate::initLayoutPrivate()
layout
=
true
;
}
void
KBookmarkDialogPrivate
::
fillGroup
(
QTreeWidgetItem
*
parentItem
,
const
KBookmarkGroup
&
group
)
void
KBookmarkDialogPrivate
::
fillGroup
(
QTreeWidgetItem
*
parentItem
,
const
KBookmarkGroup
&
group
,
const
KBookmarkGroup
&
selectGroup
)
{
for
(
KBookmark
bk
=
group
.
first
();
!
bk
.
isNull
();
bk
=
group
.
next
(
bk
))
{
if
(
bk
.
isGroup
())
{
QTreeWidgetItem
*
item
=
new
KBookmarkTreeItem
(
parentItem
,
folderTree
,
bk
.
toGroup
());
fillGroup
(
item
,
bk
.
toGroup
());
const
KBookmarkGroup
bkGroup
=
bk
.
toGroup
();
QTreeWidgetItem
*
item
=
new
KBookmarkTreeItem
(
parentItem
,
m_folderTree
,
bkGroup
);
if
(
selectGroup
==
bkGroup
)
{
m_folderTree
->
setCurrentItem
(
item
);
}
fillGroup
(
item
,
bkGroup
,
selectGroup
);
}
}
}
...
...
@@ -370,7 +374,7 @@ void KBookmarkDialog::newFolderButton()
d
->
mgr
->
emitChanged
(
parentGroup
);
d
->
folderTree
->
clear
();
QTreeWidgetItem
*
root
=
new
KBookmarkTreeItem
(
d
->
folderTree
);
d
->
fillGroup
(
root
,
d
->
mgr
->
root
());
d
->
fillGroup
(
root
,
d
->
mgr
->
root
()
,
group
);
}
}
...
...
src/kbookmarkdialog_p.h
View file @
4d34879e
...
...
@@ -43,7 +43,7 @@ public:
// selects the specified bookmark in the folder tree
void
setParentBookmark
(
const
KBookmark
&
bm
);
KBookmarkGroup
parentBookmark
();
void
fillGroup
(
QTreeWidgetItem
*
parentItem
,
const
KBookmarkGroup
&
group
);
void
fillGroup
(
QTreeWidgetItem
*
parentItem
,
const
KBookmarkGroup
&
group
,
const
KBookmarkGroup
&
selectGroup
=
KBookmarkGroup
()
);
KBookmarkDialog
*
q
;
BookmarkDialogMode
mode
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment