diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-07-17 16:46:24 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-07-17 16:46:24 +0200 |
commit | 82167d2422a4b6e3071dca68cf65a66e1da41ab4 (patch) | |
tree | 03c1f95a2aa60c48822a463cc3812b5c3415991e /src/bookmarks/bookmarkspanel.cpp | |
parent | Improving tab previews (diff) | |
download | rekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz |
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/bookmarks/bookmarkspanel.cpp')
-rw-r--r-- | src/bookmarks/bookmarkspanel.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/bookmarks/bookmarkspanel.cpp b/src/bookmarks/bookmarkspanel.cpp index 94a3de94..8ad15309 100644 --- a/src/bookmarks/bookmarkspanel.cpp +++ b/src/bookmarks/bookmarkspanel.cpp @@ -43,9 +43,9 @@ BookmarksPanel::BookmarksPanel(const QString &title, QWidget *parent, Qt::WindowFlags flags) - : UrlPanel(title, parent, flags) - , _bkTreeModel(new BookmarksTreeModel(this)) - , _loadingState(false) + : UrlPanel(title, parent, flags) + , _bkTreeModel(new BookmarksTreeModel(this)) + , _loadingState(false) { setObjectName("bookmarksPanel"); setVisible(ReKonfig::showBookmarksPanel()); @@ -71,7 +71,7 @@ void BookmarksPanel::loadFoldedState() void BookmarksPanel::contextMenu(const QPoint &pos) { - if (_loadingState) + if(_loadingState) return; BookmarksContextMenu menu(bookmarkForIndex(panelTreeView()->indexAt(pos)), @@ -86,7 +86,7 @@ void BookmarksPanel::contextMenu(const QPoint &pos) void BookmarksPanel::deleteBookmark() { QModelIndex index = panelTreeView()->currentIndex(); - if (_loadingState || !index.isValid()) + if(_loadingState || !index.isValid()) return; rApp->bookmarkProvider()->bookmarkOwner()->deleteBookmark(bookmarkForIndex(index)); @@ -95,7 +95,7 @@ void BookmarksPanel::deleteBookmark() void BookmarksPanel::onCollapse(const QModelIndex &index) { - if (_loadingState) + if(_loadingState) return; bookmarkForIndex(index).internalElement().setAttribute("folded", "yes"); @@ -105,7 +105,7 @@ void BookmarksPanel::onCollapse(const QModelIndex &index) void BookmarksPanel::onExpand(const QModelIndex &index) { - if (_loadingState) + if(_loadingState) return; bookmarkForIndex(index).internalElement().setAttribute("folded", "no"); @@ -129,19 +129,19 @@ void BookmarksPanel::setup() void BookmarksPanel::loadFoldedState(const QModelIndex &root) { QAbstractItemModel *model = panelTreeView()->model(); - if (!model) + if(!model) return; int count = model->rowCount(root); QModelIndex index; - for (int i = 0; i < count; ++i) + for(int i = 0; i < count; ++i) { index = model->index(i, 0, root); - if (index.isValid()) + if(index.isValid()) { KBookmark bm = bookmarkForIndex(index); - if (bm.isGroup()) + if(bm.isGroup()) { panelTreeView()->setExpanded(index, bm.toGroup().isOpen()); loadFoldedState(index); @@ -153,7 +153,7 @@ void BookmarksPanel::loadFoldedState(const QModelIndex &root) KBookmark BookmarksPanel::bookmarkForIndex(const QModelIndex &index) { - if (!index.isValid()) + if(!index.isValid()) return KBookmark(); const UrlFilterProxyModel *proxyModel = static_cast<const UrlFilterProxyModel*>(index.model()); |