From 632389517ca496031bb1cbe468d904884961bf57 Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Sat, 27 Mar 2010 19:04:11 +0100 Subject: - Fix a crash when the cancel button of the add bookmark menu is clicked - Use the same behaviour for delete bookmark as the toolbar - Some strings changed - Keep the selection of a folder when it's expanded/collapsed - Fix the name of some methods and properties - Code cleaned a bit --- src/urltreeview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/urltreeview.cpp') diff --git a/src/urltreeview.cpp b/src/urltreeview.cpp index b88dc971..507a7973 100644 --- a/src/urltreeview.cpp +++ b/src/urltreeview.cpp @@ -74,7 +74,7 @@ void UrlTreeView::mousePressEvent(QMouseEvent *event) if(event->button() == Qt::RightButton) { - if(index.model()->rowCount(index) == 0) + if(model()->rowCount(index) == 0) { // An empty group needs to be handle by the panels emit contextMenuItemRequested(event->pos()); @@ -100,7 +100,7 @@ void UrlTreeView::mouseReleaseEvent(QMouseEvent *event) else if(event->button() == Qt::LeftButton) { - if(index.model()->rowCount(index) == 0) + if(model()->rowCount(index) == 0) validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole))); else setExpanded(index, !isExpanded(index)); @@ -118,7 +118,7 @@ void UrlTreeView::keyPressEvent(QKeyEvent *event) if(event->key() == Qt::Key_Return) { - if(index.model()->rowCount(index) == 0) + if(model()->rowCount(index) == 0) validOpenUrl(qVariantValue< KUrl >(index.data(Qt::UserRole))); else setExpanded(index, !isExpanded(index)); -- cgit v1.2.1