summaryrefslogtreecommitdiff
path: root/src/urlbar/bookmarkwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar/bookmarkwidget.cpp')
-rw-r--r--src/urlbar/bookmarkwidget.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp
index ccfe4914..5a2e6434 100644
--- a/src/urlbar/bookmarkwidget.cpp
+++ b/src/urlbar/bookmarkwidget.cpp
@@ -31,6 +31,7 @@
// Local includes
#include "application.h"
#include "bookmarksmanager.h"
+#include "bookmarkowner.h"
// KDE Includes
#include <KLocalizedString>
@@ -57,12 +58,12 @@ BookmarkWidget::BookmarkWidget(const KBookmark &bookmark, QWidget *parent)
setLayout(layout);
QHBoxLayout *hLayout = new QHBoxLayout();
-
+
QLabel *bookmarkIcon = new QLabel(this);
bookmarkIcon->setPixmap(KIcon("bookmarks").pixmap(32, 32));
hLayout->addWidget(bookmarkIcon);
hLayout->setSpacing(10);
-
+
QVBoxLayout *vLayout = new QVBoxLayout();
QLabel *bookmarkInfo = new QLabel(this);
@@ -70,13 +71,13 @@ BookmarkWidget::BookmarkWidget(const KBookmark &bookmark, QWidget *parent)
QFont font;
font.setPointSize(font.pointSize() + 2);
bookmarkInfo->setFont(font);
-
+
vLayout->addWidget(bookmarkInfo);
QPushButton *removeButton = new QPushButton(this);
removeButton->setText(i18n("Remove this Bookmark"));
connect(removeButton, SIGNAL(clicked()), this, SLOT(removeBookmark()));
-
+
vLayout->addWidget(removeButton);
hLayout->addLayout(vLayout);
layout->addItem(hLayout);
@@ -152,6 +153,7 @@ void BookmarkWidget::showAt(const QPoint &pos)
void BookmarkWidget::removeBookmark()
{
- Application::bookmarkProvider()->bookmarkOwner()->deleteBookmark(m_bookmark);
+ Application::bookmarkProvider()->bookmarkOwner()->bookmarkSelected(m_bookmark);
+ Application::bookmarkProvider()->bookmarkOwner()->deleteBookmark();
reject();
}