summaryrefslogtreecommitdiff
path: root/src/paneltreeview.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-10-09 17:30:03 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-10-13 21:17:05 +0200
commit25f7a9dc17f047715db0a06729151f8721513800 (patch)
tree87250bb9b16b15e44cd9f4ef7d55d945e339beb4 /src/paneltreeview.cpp
parentEnabling WebKit Page Cache feature: please, refers to (diff)
downloadrekonq-25f7a9dc17f047715db0a06729151f8721513800.tar.xz
- get rid of the selected bookmark in BookmarkOwner
we can now create actions as we want and not only in a context menu - an important cleanup - validOpenUrl() is now useless
Diffstat (limited to 'src/paneltreeview.cpp')
-rw-r--r--src/paneltreeview.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/paneltreeview.cpp b/src/paneltreeview.cpp
index 8e4add2d..e44fa5fe 100644
--- a/src/paneltreeview.cpp
+++ b/src/paneltreeview.cpp
@@ -100,12 +100,12 @@ void PanelTreeView::mouseReleaseEvent(QMouseEvent *event)
return;
if (event->button() == Qt::MidButton || event->modifiers() == Qt::ControlModifier)
- validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewTab);
+ emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewTab);
else if (event->button() == Qt::LeftButton)
{
if (model()->rowCount(index) == 0)
- validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)));
+ emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)));
else
setExpanded(index, !isExpanded(index));
}
@@ -123,7 +123,7 @@ void PanelTreeView::keyPressEvent(QKeyEvent *event)
if (event->key() == Qt::Key_Return)
{
if (model()->rowCount(index) == 0)
- validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)));
+ openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)));
else
setExpanded(index, !isExpanded(index));
}
@@ -135,16 +135,6 @@ void PanelTreeView::keyPressEvent(QKeyEvent *event)
}
-void PanelTreeView::validOpenUrl(const KUrl &url, Rekonq::OpenType openType)
-{
- // To workaround a crash when the url is about:blank
- if (url.url() == "about:blank")
- emit openUrl(KUrl("about:home"), openType);
- else
- emit openUrl(url, openType);
-}
-
-
void PanelTreeView::mouseMoveEvent(QMouseEvent *event)
{
QTreeView::mouseMoveEvent(event);
@@ -164,7 +154,7 @@ void PanelTreeView::openInCurrentTab()
if (!index.isValid())
return;
- validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)));
+ emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)));
}
@@ -185,7 +175,7 @@ void PanelTreeView::openInNewTab()
if (!index.isValid())
return;
- validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewTab);
+ emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewTab);
}
@@ -195,5 +185,5 @@ void PanelTreeView::openInNewWindow()
if (!index.isValid())
return;
- validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewWindow);
+ emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewWindow);
}