From 54e97bd5d7e0e7638b4e53dd5a2f2bfb9d2914e5 Mon Sep 17 00:00:00 2001 From: Jussi Laitinen Date: Wed, 1 Sep 2010 15:13:57 +0300 Subject: [PATCH] Panel tab enabling/disabling when logged in/out reviewed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed by: Sami Rämö. --- src/ui/paneltab.cpp | 2 -- src/ui/paneltabbar.cpp | 2 +- src/ui/paneltabbar.h | 2 +- src/ui/tabbedpanel.cpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/paneltab.cpp b/src/ui/paneltab.cpp index b048f51..c3ce81f 100644 --- a/src/ui/paneltab.cpp +++ b/src/ui/paneltab.cpp @@ -109,8 +109,6 @@ void PanelTab::paintEvent(QPaintEvent *event) if (isDown()) icon().paint(&painter, m_tabRect, Qt::AlignCenter, QIcon::Selected); - else if (isChecked()) - icon().paint(&painter, m_tabRect, Qt::AlignCenter, QIcon::Normal); else if (!isEnabled()) icon().paint(&painter, m_tabRect, Qt::AlignCenter, QIcon::Disabled); else diff --git a/src/ui/paneltabbar.cpp b/src/ui/paneltabbar.cpp index 2560886..7efca18 100644 --- a/src/ui/paneltabbar.cpp +++ b/src/ui/paneltabbar.cpp @@ -129,7 +129,7 @@ void PanelTabBar::setUpTabLayout() emit sizeChangeRequested(); } -QButtonGroup *PanelTabBar::tabs() const +QButtonGroup * PanelTabBar::tabs() const { qDebug() << __PRETTY_FUNCTION__; diff --git a/src/ui/paneltabbar.h b/src/ui/paneltabbar.h index ddf170e..5a69357 100644 --- a/src/ui/paneltabbar.h +++ b/src/ui/paneltabbar.h @@ -83,7 +83,7 @@ public: * * @return All tabs */ - QButtonGroup *tabs() const; + QButtonGroup * tabs() const; private: /** diff --git a/src/ui/tabbedpanel.cpp b/src/ui/tabbedpanel.cpp index 807409f..af58c61 100644 --- a/src/ui/tabbedpanel.cpp +++ b/src/ui/tabbedpanel.cpp @@ -268,7 +268,7 @@ void TabbedPanel::setTabsEnabled(const QList &tabIndexes, bool enabled) QAbstractButton *tabButton = tabs->button(tabIndex); if (tabButton) { - if (tabButton == tabs->checkedButton()) + if (tabButton->isChecked()) closePanel(); tabButton->setEnabled(enabled); -- 1.7.9.5