Panel tab enabling/disabling when logged in/out reviewed.
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Wed, 1 Sep 2010 12:13:57 +0000 (15:13 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Wed, 1 Sep 2010 12:13:57 +0000 (15:13 +0300)
Reviewed by: Sami Rämö.

src/ui/paneltab.cpp
src/ui/paneltabbar.cpp
src/ui/paneltabbar.h
src/ui/tabbedpanel.cpp

index b048f51..c3ce81f 100644 (file)
@@ -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
index 2560886..7efca18 100644 (file)
@@ -129,7 +129,7 @@ void PanelTabBar::setUpTabLayout()
     emit sizeChangeRequested();
 }
 
-QButtonGroup *PanelTabBar::tabs() const
+QButtonGroup * PanelTabBar::tabs() const
 {
     qDebug() << __PRETTY_FUNCTION__;
 
index ddf170e..5a69357 100644 (file)
@@ -83,7 +83,7 @@ public:
     *
     * @return All tabs
     */
-    QButtonGroup *tabs() const;
+    QButtonGroup * tabs() const;
 
 private:
     /**
index 807409f..af58c61 100644 (file)
@@ -268,7 +268,7 @@ void TabbedPanel::setTabsEnabled(const QList<int> &tabIndexes, bool enabled)
         QAbstractButton *tabButton = tabs->button(tabIndex);
 
         if (tabButton) {
-            if (tabButton == tabs->checkedButton())
+            if (tabButton->isChecked())
                 closePanel();
 
             tabButton->setEnabled(enabled);