diff --git a/private/tooltip.cpp b/private/tooltip.cpp index 21d28c355..81a767e07 100644 --- a/private/tooltip.cpp +++ b/private/tooltip.cpp @@ -241,12 +241,8 @@ void ToolTip::setContent(QObject *tipper, const ToolTipContent &data) } } -void ToolTip::prepareShowing(bool cueUpdate) +void ToolTip::prepareShowing() { - if (cueUpdate && d->source) { - QMetaObject::invokeMethod(d->source, "toolTipAboutToShow"); - } - if (d->preview->windowId() != 0) { // show/hide the preview area d->preview->show(); diff --git a/private/tooltip_p.h b/private/tooltip_p.h index 5346a54dd..78c86726b 100644 --- a/private/tooltip_p.h +++ b/private/tooltip_p.h @@ -38,7 +38,7 @@ public: ~ToolTip(); void setContent(QObject *tipper, const ToolTipContent &data); - void prepareShowing(bool cueUpdate); + void prepareShowing(); void moveTo(const QPoint &to); bool autohide() const; void setDirection(Plasma::Direction); diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 466d5b5b3..3ed192a8f 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -300,36 +300,21 @@ void ToolTipManagerPrivate::showToolTip() return; } + QMetaObject::invokeMethod(currentWidget, "toolTipAboutToShow"); QHash::const_iterator tooltip = tooltips.constFind(currentWidget); - if (tooltip == tooltips.constEnd()) { + if (tooltip == tooltips.constEnd() || tooltip.value().isEmpty()) { return; } - bool justCreated = false; - - if (tooltip.value().isEmpty()) { - // give the object a chance for delayed loading of the tip - QMetaObject::invokeMethod(currentWidget, "toolTipAboutToShow"); - tooltip = tooltips.constFind(currentWidget); - //kDebug() << "attempt to make one ... we gots" << tooltip.isEmpty(); - - if (tooltip == tooltips.constEnd() || tooltip.value().isEmpty()) { - currentWidget = 0; - return; - } - - justCreated = true; - } - Containment *c = dynamic_cast(currentWidget->topLevelItem()); - kDebug() << "about to show" << justCreated << (QObject*)c; + //kDebug() << "about to show" << (QObject*)c; if (c) { tipWidget->setDirection(Plasma::locationToDirection(c->location())); } tipWidget->setContent(currentWidget, tooltip.value()); - tipWidget->prepareShowing(!justCreated); + tipWidget->prepareShowing(); tipWidget->moveTo(ToolTipManager::self()->m_corona->popupPosition(currentWidget, tipWidget->size())); tipWidget->show(); isShown = true; //ToolTip is visible