FancyToolButton: remove forceVisible

It's never used

Change-Id: Ia2e7ab19685066daf29b5209cb7ea2a7485dfcf2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Daniel Teske
2013-06-19 12:54:53 +02:00
parent 198d125a1c
commit 916ae49b6a
2 changed files with 2 additions and 16 deletions

View File

@@ -52,17 +52,10 @@ using namespace Internal;
FancyToolButton::FancyToolButton(QWidget *parent) FancyToolButton::FancyToolButton(QWidget *parent)
: QToolButton(parent), m_fader(0) : QToolButton(parent), m_fader(0)
{ {
m_hasForceVisible = false;
setAttribute(Qt::WA_Hover, true); setAttribute(Qt::WA_Hover, true);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
} }
void FancyToolButton::forceVisible(bool visible)
{
m_hasForceVisible = true;
setVisible(visible);
}
bool FancyToolButton::event(QEvent *e) bool FancyToolButton::event(QEvent *e)
{ {
switch (e->type()) { switch (e->type()) {
@@ -302,11 +295,9 @@ void FancyToolButton::actionChanged()
{ {
// the default action changed in some way, e.g. it might got hidden // the default action changed in some way, e.g. it might got hidden
// since we inherit a tool button we won't get invisible, so do this here // since we inherit a tool button we won't get invisible, so do this here
if (!m_hasForceVisible) {
if (QAction* action = defaultAction()) if (QAction* action = defaultAction())
setVisible(action->isVisible()); setVisible(action->isVisible());
} }
}
FancyActionBar::FancyActionBar(QWidget *parent) FancyActionBar::FancyActionBar(QWidget *parent)
: QWidget(parent) : QWidget(parent)

View File

@@ -57,13 +57,8 @@ public:
float fader() { return m_fader; } float fader() { return m_fader; }
void setFader(float value) { m_fader = value; update(); } void setFader(float value) { m_fader = value; update(); }
void forceVisible(bool visible);
private slots: private slots:
void actionChanged(); void actionChanged();
private:
bool m_hasForceVisible;
}; };
class FancyActionBar : public QWidget class FancyActionBar : public QWidget