From 832782fa736d75ec4138e3b747881b3c729da0c9 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 18 Sep 2008 21:53:52 +0000 Subject: [PATCH] * proper invokeMethod call, now items actually get notified when the tip is hidden * allow throttling of the show call to prevent multiple method invokations on create->show svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=862467 --- private/tooltip.cpp | 7 +++---- private/tooltip_p.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/private/tooltip.cpp b/private/tooltip.cpp index c22f5e45d..fecceb2da 100644 --- a/private/tooltip.cpp +++ b/private/tooltip.cpp @@ -68,7 +68,7 @@ void ToolTip::hideEvent(QHideEvent *e) { QWidget::hideEvent(e); if (d->source) { - QMetaObject::invokeMethod(d->source, SLOT(toolTipHidden())); + QMetaObject::invokeMethod(d->source, "toolTipHidden"); } } @@ -123,9 +123,9 @@ void ToolTip::setContent(const ToolTipManager::ToolTipContent &data) } } -void ToolTip::prepareShowing() +void ToolTip::prepareShowing(bool cueUpdate) { - if (d->source) { + if (cueUpdate && d->source) { QMetaObject::invokeMethod(d->source, "toolTipAboutToShow"); } @@ -138,7 +138,6 @@ void ToolTip::prepareShowing() layout()->activate(); resize(sizeHint()); - } void ToolTip::setActivated(bool value) diff --git a/private/tooltip_p.h b/private/tooltip_p.h index 9518fb3f9..610b02c76 100644 --- a/private/tooltip_p.h +++ b/private/tooltip_p.h @@ -39,7 +39,7 @@ public: void updateTheme(); void setContent(const ToolTipManager::ToolTipContent &data); - void prepareShowing(); + void prepareShowing(bool cueUpdate); void setActivated(bool value); bool isActivated();