summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-09-02 11:05:24 +0200
committerJon Ander Peñalba <jonan88@gmail.com>2010-09-02 11:05:24 +0200
commitf6ffa3d0111fecfcc00703b473ed561f437d734c (patch)
tree59af043248bac107a9e4872173b165412357c19a /src
parentThis should improve adblock retrieving by NOT asking for SSL confirmations (diff)
downloadrekonq-f6ffa3d0111fecfcc00703b473ed561f437d734c.tar.xz
Make sure the model is only created ones
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkspanel.cpp4
-rw-r--r--src/bookmarks/bookmarkspanel.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/bookmarks/bookmarkspanel.cpp b/src/bookmarks/bookmarkspanel.cpp
index e88d3060..d082b557 100644
--- a/src/bookmarks/bookmarkspanel.cpp
+++ b/src/bookmarks/bookmarkspanel.cpp
@@ -43,10 +43,12 @@
BookmarksPanel::BookmarksPanel(const QString &title, QWidget *parent, Qt::WindowFlags flags)
: UrlPanel(title, parent, flags)
+ , model(new BookmarksTreeModel(this))
, m_loadingState(false)
{
setObjectName("bookmarksPanel");
setVisible(ReKonfig::showBookmarksPanel());
+ connect(model, SIGNAL(bookmarksUpdated()), this, SLOT(startLoadFoldedState()));
}
@@ -177,7 +179,5 @@ KBookmark BookmarksPanel::bookmarkForIndex(const QModelIndex &index)
QAbstractItemModel* BookmarksPanel::getModel()
{
- BookmarksTreeModel *model = new BookmarksTreeModel(this);
- connect(model, SIGNAL(bookmarksUpdated()), this, SLOT(startLoadFoldedState()));
return model;
}
diff --git a/src/bookmarks/bookmarkspanel.h b/src/bookmarks/bookmarkspanel.h
index 2418ae81..6ee2dc85 100644
--- a/src/bookmarks/bookmarkspanel.h
+++ b/src/bookmarks/bookmarkspanel.h
@@ -37,6 +37,8 @@
#include "urlpanel.h"
// Forward Declarations
+class BookmarksTreeModel;
+
class KBookmark;
class QModelIndex;
@@ -71,6 +73,7 @@ private:
virtual QAbstractItemModel* getModel();
+ BookmarksTreeModel *model;
bool m_loadingState;
};