From a1b660daae9dd252d84ec44e8a5102277539b395 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 12 Dec 2012 18:47:35 +0100 Subject: - Code style check (codestyle script round) - restored CTRL + ENTER code - applied Vedant's patch about (thanks!!!) CCMAIL: vedant.kota@gmail.com REVIEW: 107662 REVIEWED-BY: Tirtha and me --- src/tabwindow/tabbar.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/tabwindow/tabbar.cpp') diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp index aaf18dc7..24494f15 100644 --- a/src/tabwindow/tabbar.cpp +++ b/src/tabwindow/tabbar.cpp @@ -109,14 +109,14 @@ QSize TabBar::tabSizeHint(int index) const } } } - + int h = size().height(); // this because it may happen sometimes (eg: exiting fullscreen) // that tabbar height is set to ZERO. And this is NOT good... if (h == 0) h = 30; - + QSize ts = QSize(w, h); return ts; } @@ -351,7 +351,7 @@ void TabBar::tabInserted(int index) TabWindow *w = qobject_cast(parent()); w->moveTab(index, availableIndex); } - + KTabBar::tabInserted(index); } @@ -425,14 +425,14 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event) { // count pinned tabs int pinnedTabs = 0; - for(int i = 0; i < count(); i++) + for (int i = 0; i < count(); i++) { if (tabData(i).toBool()) - pinnedTabs++; + pinnedTabs++; } // fix unpinned ones - for(int i = 0; i < pinnedTabs; i++) + for (int i = 0; i < pinnedTabs; i++) { if (!tabData(i).toBool()) { @@ -448,7 +448,7 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event) if (tabData(i).toBool()) { TabWindow *w = qobject_cast(parent()); - w->moveTab(i, pinnedTabs - 1); + w->moveTab(i, pinnedTabs - 1); w->setCurrentIndex(pinnedTabs - 1); } } @@ -522,7 +522,7 @@ void TabBar::pinTab() KAction *a = qobject_cast(sender()); if (!a) return; - + int index = a->data().toInt(); // Find the available index to move @@ -539,7 +539,7 @@ void TabBar::pinTab() TabWindow *w = qobject_cast(parent()); w->moveTab(index, availableIndex); index = availableIndex; - + // set this tab data true to know this has been pinned setTabData(index, true); @@ -550,7 +550,7 @@ void TabBar::pinTab() QLabel *label = qobject_cast(tabButton(index, QTabBar::LeftSide)); if (!label) label = new QLabel(this); - + setTabButton(index, QTabBar::LeftSide, 0); setTabButton(index, QTabBar::LeftSide, label); @@ -586,7 +586,7 @@ void TabBar::unpinTab() TabWindow *w = qobject_cast(parent()); w->moveTab(index, availableIndex); index = availableIndex; - + tabButton(index, QTabBar::RightSide)->show(); setTabText(index, w->webWindow(index)->title()); -- cgit v1.2.1