'Setter to be used as a Qt slot.
Saves old shown URL in self._old_url and restores it later if a link is
"un-hovered" when it gets called with empty parameters.
Args:
link: The link which was hovered (string)'

@pyqtSlot(str)
def set_hover_url(self, link):

    if link:
        qurl = QUrl(link)
        if qurl.isValid():
            self._hover_url = urlutils.safe_display_string(qurl)
        else:
            self._hover_url = '(invalid    URL!)    {}'.format(link)
    else:
        self._hover_url = None
    self._update_url()
