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/rekonqwindow.cpp | 6 +++--- src/tabwindow/rekonqwindow.h | 2 +- src/tabwindow/tabbar.cpp | 22 +++++++++++----------- src/tabwindow/tabbar.h | 6 +++--- src/tabwindow/tabwindow.cpp | 22 +++++++++++----------- src/tabwindow/tabwindow.h | 6 +++--- 6 files changed, 32 insertions(+), 32 deletions(-) (limited to 'src/tabwindow') diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp index e1f54f28..afebf79c 100644 --- a/src/tabwindow/rekonqwindow.cpp +++ b/src/tabwindow/rekonqwindow.cpp @@ -226,7 +226,7 @@ void RekonqWindow::restoreWindowSize(const KConfigGroup & _cg) { QSize defaultSize = desktopRect.size() * 0.8; resize(defaultSize); - + move((desktopRect.width() - width()) / 2, (desktopRect.height() - height()) / 2); } @@ -405,7 +405,7 @@ void RekonqWindow::checkPosition() // no need to check trivial positions... if (isMaximized()) return; - + QList wList = RekonqWindow::windowList(); int wNumber = wList.count(); @@ -434,7 +434,7 @@ void RekonqWindow::checkPosition() break; case 1: // right top - move(0,0); + move(0, 0); break; default: kDebug() << "OOPS...THIS SHOULD NEVER HAPPEN!!"; diff --git a/src/tabwindow/rekonqwindow.h b/src/tabwindow/rekonqwindow.h index 1c543ce2..ed018e4a 100644 --- a/src/tabwindow/rekonqwindow.h +++ b/src/tabwindow/rekonqwindow.h @@ -89,7 +89,7 @@ public: int insertTab(int index, QWidget *page, const QString &label); int insertTab(int index, QWidget *page, const QIcon &icon, const QString &label); // -------------------------------------------------------------------------------------- - + protected: /** * Save your instance-specific properties. The function is 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()); diff --git a/src/tabwindow/tabbar.h b/src/tabwindow/tabbar.h index b325eab8..c27b238f 100644 --- a/src/tabwindow/tabbar.h +++ b/src/tabwindow/tabbar.h @@ -64,7 +64,7 @@ protected: virtual void tabInserted(int index); virtual void tabRemoved(int index); - + virtual void tabLayoutChange(); Q_SIGNALS: @@ -84,7 +84,7 @@ private Q_SLOTS: void pinTab(); void unpinTab(); - + void contextMenu(int, const QPoint &); void emptyAreaContextMenu(const QPoint &); @@ -92,7 +92,7 @@ private Q_SLOTS: void showTabPreview(); void hideTabPreview(); - + private: // highlightAnimation TabHighlightEffect *m_tabHighlightEffect; diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp index e1d239a7..59aa1275 100644 --- a/src/tabwindow/tabwindow.cpp +++ b/src/tabwindow/tabwindow.cpp @@ -97,7 +97,7 @@ TabWindow::TabWindow(WebPage *pg, QWidget *parent) , _ac(new KActionCollection(this)) { init(); - + WebWindow *tab = prepareNewTab(pg); addTab(tab, i18n("new tab")); setCurrentWidget(tab); @@ -170,7 +170,7 @@ void TabWindow::init() _addTabButton->raise(); _addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly); - connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int))); + connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int))); } @@ -185,7 +185,7 @@ KActionCollection *TabWindow::actionCollection() const QAction *TabWindow::actionByName(const QString &name) { - return actionCollection()->action(name); + return actionCollection()->action(name); } @@ -230,7 +230,7 @@ WebWindow *TabWindow::prepareNewTab(WebPage *page) connect(tab, SIGNAL(pageCreated(WebPage *)), this, SLOT(pageCreated(WebPage *))); connect(tab, SIGNAL(setFullScreen(bool)), this, SLOT(setFullScreen(bool))); - + return tab; } @@ -283,7 +283,7 @@ void TabWindow::newTab(WebPage *page) // no need to load an url if we already have a page... if (page) return; - + switch (ReKonfig::newTabsBehaviour()) { case 0: // new tab page @@ -450,7 +450,7 @@ void TabWindow::tabLoadFinished(bool ok) movie->stop(); delete movie; } - + label->setMovie(0); KIcon ic = IconManager::self()->iconForUrl(tab->url()); @@ -514,7 +514,7 @@ void TabWindow::closeTab(int index, bool del) history.title = tabToClose->title(); history.url = tabToClose->url().url(); history.position = index; - + m_recentlyClosedTabs.removeAll(history); if (m_recentlyClosedTabs.count() == recentlyClosedTabsLimit) m_recentlyClosedTabs.removeLast(); @@ -623,7 +623,7 @@ void TabWindow::reloadAllTabs() void TabWindow::bookmarkAllTabs() { KBookmarkGroup rGroup = BookmarkManager::self()->rootGroup(); - KBookmarkGroup folderGroup = rGroup.createNewFolder( i18n("Bookmarked tabs: ") + QDate::currentDate().toString()); + KBookmarkGroup folderGroup = rGroup.createNewFolder(i18n("Bookmarked tabs: ") + QDate::currentDate().toString()); for (int i = 0; i < count(); ++i) { WebWindow *tab = webWindow(i); @@ -642,7 +642,7 @@ void TabWindow::restoreLastClosedTab() QUrl u = QUrl(history.url); int restorePosition = history.position; - + WebWindow *tab = prepareNewTab(); if (restorePosition < count()) @@ -663,10 +663,10 @@ void TabWindow::setFullScreen(bool makeFullScreen) { tabBar()->setVisible(!makeFullScreen); _addTabButton->setVisible(!makeFullScreen); - + KToggleFullScreenAction::setFullScreen(this, makeFullScreen); - for(int i = 0; i < count(); i++) + for (int i = 0; i < count(); i++) webWindow(i)->setWidgetsHidden(makeFullScreen); } diff --git a/src/tabwindow/tabwindow.h b/src/tabwindow/tabwindow.h index fc2cc4de..4da4f213 100644 --- a/src/tabwindow/tabwindow.h +++ b/src/tabwindow/tabwindow.h @@ -76,7 +76,7 @@ public: public Q_SLOTS: void loadUrl(const KUrl &, Rekonq::OpenType type = Rekonq::CurrentTab, TabHistory *history = 0); void newTab(WebPage *page = 0); - + private: /** * Prepares the new WebWindow to be open @@ -84,7 +84,7 @@ private: WebWindow *prepareNewTab(WebPage *page = 0); void init(); - + private Q_SLOTS: /** * Updates new tab button position @@ -113,7 +113,7 @@ private Q_SLOTS: void restoreLastClosedTab(); void setFullScreen(bool); - + private: // the new tab button QToolButton *_addTabButton; -- cgit v1.2.1