summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-11-07 11:36:11 +0100
committerJon Ander Peñalba <jonan88@gmail.com>2010-11-07 11:37:11 +0100
commitf55423c33944002c16a57c05d5be520c465ed4cc (patch)
treeab71b40d5e8e3953a62116cb67adf5c5e4430365 /src
parentVariable renamed (diff)
downloadrekonq-f55423c33944002c16a57c05d5be520c465ed4cc.tar.xz
Bug when a bookmark contains a '&' fixed in some cases
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkowner.cpp9
-rw-r--r--src/bookmarks/bookmarkprovider.cpp3
-rw-r--r--src/bookmarks/bookmarkstoolbar.cpp1
3 files changed, 6 insertions, 7 deletions
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp
index 038a2bba..c684897e 100644
--- a/src/bookmarks/bookmarkowner.cpp
+++ b/src/bookmarks/bookmarkowner.cpp
@@ -199,7 +199,7 @@ KBookmark BookmarkOwner::bookmarkCurrentPage(const KBookmark &bookmark)
parent = Application::bookmarkProvider()->rootGroup();
}
- KBookmark newBk = parent.addBookmark(currentTitle().replace('&', "&&"), KUrl(currentUrl()));
+ KBookmark newBk = parent.addBookmark(currentTitle(), KUrl(currentUrl()));
if (!bookmark.isNull())
parent.moveBookmark(newBk, bookmark);
@@ -283,10 +283,8 @@ void BookmarkOwner::editBookmark(KBookmark bookmark)
if (bookmark.isNull())
return;
- bookmark.setFullText(bookmark.fullText().replace("&&", "&"));
KBookmarkDialog *dialog = bookmarkDialog(m_manager, 0);
dialog->editBookmark(bookmark);
- bookmark.setFullText(bookmark.fullText().replace('&', "&&"));
delete dialog;
}
@@ -298,13 +296,12 @@ bool BookmarkOwner::deleteBookmark(const KBookmark &bookmark)
return false;
KBookmarkGroup bmg = bookmark.parentGroup();
- QString name = QString(bookmark.fullText()).replace("&&", "&");
QString dialogCaption, dialogText;
if (bookmark.isGroup())
{
dialogCaption = i18n("Bookmark Folder Deletion");
- dialogText = i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?", name);
+ dialogText = i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?", bookmark.fullText());
}
else if (bookmark.isSeparator())
{
@@ -314,7 +311,7 @@ bool BookmarkOwner::deleteBookmark(const KBookmark &bookmark)
else
{
dialogCaption = i18n("Bookmark Deletion");
- dialogText = i18n("Are you sure you wish to remove the bookmark\n\"%1\"?", name);
+ dialogText = i18n("Are you sure you wish to remove the bookmark\n\"%1\"?", bookmark.fullText());
}
if (KMessageBox::warningContinueCancel(
diff --git a/src/bookmarks/bookmarkprovider.cpp b/src/bookmarks/bookmarkprovider.cpp
index 0924ae30..fe038b2a 100644
--- a/src/bookmarks/bookmarkprovider.cpp
+++ b/src/bookmarks/bookmarkprovider.cpp
@@ -239,7 +239,8 @@ void BookmarkProvider::fillBookmarkBar(BookmarkToolBar *toolBar)
else
{
KBookmarkAction *action = new KBookmarkAction(bookmark, m_owner, this);
- action->setIconText(action->iconText().replace('&', "&&"));
+ //action->s
+ //action->setIconText(action->iconText().replace('&', "&&&"));
action->setIcon(Application::iconManager()->iconForUrl( KUrl(bookmark.url()) ));
connect(action, SIGNAL(hovered()), toolBar, SLOT(actionHovered()));
toolBar->toolBar()->addAction(action);
diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp
index c5ece026..ae5c9d6e 100644
--- a/src/bookmarks/bookmarkstoolbar.cpp
+++ b/src/bookmarks/bookmarkstoolbar.cpp
@@ -169,6 +169,7 @@ BookmarkToolBar::BookmarkToolBar(KToolBar *toolBar, QObject *parent)
connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(QString, QString)), this, SLOT(hideMenu()));
toolBar->setAcceptDrops(true);
toolBar->installEventFilter(this);
+ toolBar->setShortcutEnabled(false);
if (toolBar->isVisible())
{