diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-27 19:42:30 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-27 19:42:30 +0100 |
commit | 6ab284d4f3e759be939bd8948b1b842300984f87 (patch) | |
tree | f4911422831ce5c18cf53a44592d37c0e4a4e077 /src/bookmarks/bookmarkstreemodel.cpp | |
parent | Merge commit 'refs/merge-requests/107' of git://gitorious.org/rekonq/mainline... (diff) | |
parent | - Fix a crash when the cancel button of the add bookmark menu is clicked (diff) | |
download | rekonq-6ab284d4f3e759be939bd8948b1b842300984f87.tar.xz |
Merge commit 'refs/merge-requests/107' of git://gitorious.org/rekonq/mainline into HistoryBookmarksImprovements
Diffstat (limited to 'src/bookmarks/bookmarkstreemodel.cpp')
-rw-r--r-- | src/bookmarks/bookmarkstreemodel.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp index d63c92d3..836401a6 100644 --- a/src/bookmarks/bookmarkstreemodel.cpp +++ b/src/bookmarks/bookmarkstreemodel.cpp @@ -148,8 +148,9 @@ BookmarksTreeModel::BookmarksTreeModel(QObject *parent) , m_root(0) { resetModel(); - connect( this, SIGNAL(bookmarkChangedFinished()), parent, SLOT(callAutoExpand())); - connect( Application::bookmarkProvider()->bookmarkManager(), SIGNAL( changed(QString,QString) ), this, SLOT( bookmarksChanged(QString) ) ); + connect( this, SIGNAL(bookmarksUpdated()), parent, SLOT(loadFoldedState())); + connect( Application::bookmarkProvider()->bookmarkManager(), SIGNAL( changed(QString,QString) ), this, SLOT( bookmarksChanged() ) ); + connect( parent, SIGNAL(saveOnlyRequested()), this, SLOT(saveOnly()) ); } @@ -283,11 +284,10 @@ QVariant BookmarksTreeModel::data(const QModelIndex &index, int role) const } -void BookmarksTreeModel::bookmarksChanged( const QString &groupAddress ) +void BookmarksTreeModel::bookmarksChanged() { - Q_UNUSED(groupAddress); resetModel(); - emit bookmarkChangedFinished(); + emit bookmarksUpdated(); } @@ -336,6 +336,20 @@ KBookmark BookmarksTreeModel::bookmarkForIndex(const QModelIndex index) const } +void BookmarksTreeModel::saveOnly() +{ + disconnect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(QString,QString)), this, SLOT(bookmarksChanged())); + connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(QString,QString)), this, SLOT(reconnectManager())); + Application::bookmarkProvider()->bookmarkManager()->emitChanged(); +} + + +void BookmarksTreeModel::reconnectManager() +{ + connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL( changed(QString,QString) ), this, SLOT(bookmarksChanged())); +} + + Qt::DropActions BookmarksTreeModel::supportedDropActions () const { return Qt::MoveAction; |