avoid recursive calls to updateToolTip by doing what we *really* want to be doing here, which is updating the data. this also prevents the case where a tooltip is updated randomly, causing the tooltip to show. i wonder if that's what has been the cause of the occasional taskbar tooltip showing when it shouldn't?
reviewed by Rafał Miłecki svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=794638
This commit is contained in:
parent
30b0cef28a
commit
1f6d6175a7
@ -230,6 +230,13 @@ ToolTip::~ToolTip()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void ToolTip::setData(Plasma::Widget *widget, const Plasma::ToolTipData &data)
|
||||
{
|
||||
if (d->currentWidget && d->currentWidget == widget) {
|
||||
setData(data);
|
||||
}
|
||||
}
|
||||
|
||||
void ToolTip::setData(const Plasma::ToolTipData &data)
|
||||
{
|
||||
//reset our size
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
void hide();
|
||||
|
||||
Plasma::Widget *currentWidget() const;
|
||||
void setData(Plasma::Widget *widget, const Plasma::ToolTipData &data);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
|
@ -393,13 +393,13 @@ void Widget::setToolTip(const ToolTipData &tip)
|
||||
|
||||
*d->toolTip = tip;
|
||||
|
||||
if (ToolTip::self()->currentWidget() == this) {
|
||||
ToolTip::self()->show(this);
|
||||
}
|
||||
// this does a check to ensure the current widget is us
|
||||
ToolTip::self()->setData(this, *d->toolTip);
|
||||
}
|
||||
|
||||
void Widget::updateToolTip(bool update)
|
||||
{
|
||||
Q_UNUSED(update)
|
||||
}
|
||||
|
||||
void Widget::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
Loading…
Reference in New Issue
Block a user