diff --git a/private/tooltip.cpp b/private/tooltip.cpp index fca9b6715..e1b675a36 100644 --- a/private/tooltip.cpp +++ b/private/tooltip.cpp @@ -308,18 +308,11 @@ void ToolTip::setContent(QObject *tipper, const ToolTipContent &data) d->text->setContent(data); d->imageLabel->setPixmap(data.image()); - if (data.highlightWindows() && (data.windowsToPreview().size() > 1 || data.windowToPreview() != 0)) { + if (data.highlightWindows() && !data.windowsToPreview().isEmpty()) { WindowEffects::highlightWindows(winId(), QList() << winId() << data.windowsToPreview()); } - if (data.windowsToPreview().size() > 1) { - d->preview->setWindowIds(data.windowsToPreview()); - } else { - QListids; - ids.append(data.windowToPreview()); - d->preview->setWindowIds(ids); - } - + d->preview->setWindowIds(data.windowsToPreview()); d->preview->setHighlightWindows(data.highlightWindows()); d->autohide = data.autohide(); diff --git a/tooltipcontent.cpp b/tooltipcontent.cpp index 6a928a08c..b92fc87e1 100644 --- a/tooltipcontent.cpp +++ b/tooltipcontent.cpp @@ -157,21 +157,6 @@ QPixmap ToolTipContent::image() const return d->image; } -void ToolTipContent::setWindowToPreview(WId id) -{ - d->windowsToPreview.clear(); - d->windowsToPreview.append(id); -} - -WId ToolTipContent::windowToPreview() const -{ - if (d->windowsToPreview.size() == 1) { - return d->windowsToPreview.first(); - } else { - return 0; - } -} - void ToolTipContent::setWindowsToPreview(const QList & ids) { d->windowsToPreview = ids; diff --git a/tooltipcontent.h b/tooltipcontent.h index 6ae29bdd3..4f6586e2c 100644 --- a/tooltipcontent.h +++ b/tooltipcontent.h @@ -117,20 +117,6 @@ public: */ QPixmap image() const; - /** - * Sets the ID of the window to show a preview for. - * @deprecated - * @see setWindowsToPreview - */ - void setWindowToPreview(WId id); - - /** - * Id of a window if you want to show a preview - * @deprecated - * @see windowsToPreview - */ - WId windowToPreview() const; - /** * Sets the IDS of the windows to show a preview for * @since 4.3