forked from qt-creator/qt-creator
FancyToolButton: remove forceVisible
It's never used Change-Id: Ia2e7ab19685066daf29b5209cb7ea2a7485dfcf2 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -52,17 +52,10 @@ using namespace Internal;
|
||||
FancyToolButton::FancyToolButton(QWidget *parent)
|
||||
: QToolButton(parent), m_fader(0)
|
||||
{
|
||||
m_hasForceVisible = false;
|
||||
setAttribute(Qt::WA_Hover, true);
|
||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
}
|
||||
|
||||
void FancyToolButton::forceVisible(bool visible)
|
||||
{
|
||||
m_hasForceVisible = true;
|
||||
setVisible(visible);
|
||||
}
|
||||
|
||||
bool FancyToolButton::event(QEvent *e)
|
||||
{
|
||||
switch (e->type()) {
|
||||
@@ -302,10 +295,8 @@ void FancyToolButton::actionChanged()
|
||||
{
|
||||
// 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
|
||||
if (!m_hasForceVisible) {
|
||||
if (QAction* action = defaultAction())
|
||||
setVisible(action->isVisible());
|
||||
}
|
||||
if (QAction* action = defaultAction())
|
||||
setVisible(action->isVisible());
|
||||
}
|
||||
|
||||
FancyActionBar::FancyActionBar(QWidget *parent)
|
||||
|
||||
Reference in New Issue
Block a user