From 82167d2422a4b6e3071dca68cf65a66e1da41ab4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 17 Jul 2011 16:46:24 +0200 Subject: A round of the "new" astyle 2.01... --- src/paneltreeview.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/paneltreeview.cpp') diff --git a/src/paneltreeview.cpp b/src/paneltreeview.cpp index 7b28142e..1c727d78 100644 --- a/src/paneltreeview.cpp +++ b/src/paneltreeview.cpp @@ -40,7 +40,7 @@ PanelTreeView::PanelTreeView(QWidget *parent) - : QTreeView(parent) + : QTreeView(parent) { connect(this, SIGNAL(itemHovered(const QString &)), parent, SIGNAL(itemHovered(const QString &))); connect(this, SIGNAL(openUrl(const KUrl &, Rekonq::OpenType)), parent, SIGNAL(openUrl(const KUrl &, Rekonq::OpenType))); @@ -58,22 +58,22 @@ void PanelTreeView::mousePressEvent(QMouseEvent *event) // A change of an item expansion is handle by mouseReleaseEvent() // So toggle again the item - if (expanded != isExpanded(index)) + if(expanded != isExpanded(index)) setExpanded(index, !isExpanded(index)); - if (!index.isValid()) + if(!index.isValid()) { clearSelection(); setCurrentIndex(QModelIndex()); - if (event->button() == Qt::RightButton) + if(event->button() == Qt::RightButton) emit contextMenuEmptyRequested(event->pos()); return; } - if (event->button() == Qt::RightButton) + if(event->button() == Qt::RightButton) { - if (model()->rowCount(index) == 0) + if(model()->rowCount(index) == 0) { // An empty group needs to be handle by the panels emit contextMenuItemRequested(event->pos()); @@ -91,15 +91,15 @@ void PanelTreeView::mouseReleaseEvent(QMouseEvent *event) QTreeView::mouseReleaseEvent(event); const QModelIndex index = indexAt(event->pos()); - if (!index.isValid()) + if(!index.isValid()) return; - if (event->button() == Qt::MidButton || event->modifiers() == Qt::ControlModifier) + if(event->button() == Qt::MidButton || event->modifiers() == Qt::ControlModifier) emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewTab); - else if (event->button() == Qt::LeftButton) + else if(event->button() == Qt::LeftButton) { - if (model()->rowCount(index) == 0) + if(model()->rowCount(index) == 0) emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole))); else setExpanded(index, !isExpanded(index)); @@ -112,18 +112,18 @@ void PanelTreeView::keyPressEvent(QKeyEvent *event) QTreeView::keyPressEvent(event); QModelIndex index = currentIndex(); - if (!index.isValid()) + if(!index.isValid()) return; - if (event->key() == Qt::Key_Return) + if(event->key() == Qt::Key_Return) { - if (model()->rowCount(index) == 0) + if(model()->rowCount(index) == 0) openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole))); else setExpanded(index, !isExpanded(index)); } - else if (event->key() == Qt::Key_Delete) + else if(event->key() == Qt::Key_Delete) { emit delKeyPressed(); } @@ -134,7 +134,7 @@ void PanelTreeView::mouseMoveEvent(QMouseEvent *event) { QTreeView::mouseMoveEvent(event); const QModelIndex index = indexAt(event->pos()); - if (!index.isValid()) + if(!index.isValid()) { emit itemHovered(""); return; @@ -146,7 +146,7 @@ void PanelTreeView::mouseMoveEvent(QMouseEvent *event) void PanelTreeView::openInCurrentTab() { QModelIndex index = currentIndex(); - if (!index.isValid()) + if(!index.isValid()) return; emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole))); @@ -156,7 +156,7 @@ void PanelTreeView::openInCurrentTab() void PanelTreeView::copyToClipboard() { QModelIndex index = currentIndex(); - if (!index.isValid()) + if(!index.isValid()) return; QClipboard *cb = QApplication::clipboard(); @@ -167,7 +167,7 @@ void PanelTreeView::copyToClipboard() void PanelTreeView::openInNewTab() { QModelIndex index = currentIndex(); - if (!index.isValid()) + if(!index.isValid()) return; emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewTab); @@ -177,7 +177,7 @@ void PanelTreeView::openInNewTab() void PanelTreeView::openInNewWindow() { QModelIndex index = currentIndex(); - if (!index.isValid()) + if(!index.isValid()) return; emit openUrl(qVariantValue< KUrl >(index.data(Qt::UserRole)), Rekonq::NewWindow); -- cgit v1.2.1