Separate ClickHandler::url from dragText.
This commit is contained in:
parent
c72beeeb7c
commit
a113e50050
3 changed files with 6 additions and 2 deletions
|
|
@ -28,7 +28,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QString url() const = 0;
|
|
||||||
virtual QString readable() const;
|
virtual QString readable() const;
|
||||||
|
|
||||||
bool _fullDisplayed;
|
bool _fullDisplayed;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,11 @@ public:
|
||||||
|
|
||||||
virtual void onClick(ClickContext context) const = 0;
|
virtual void onClick(ClickContext context) const = 0;
|
||||||
|
|
||||||
|
// Some sort of `id`, for text links contains urls.
|
||||||
|
virtual QString url() const {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
// What text to show in a tooltip when mouse is over that click handler as a link in Text.
|
// What text to show in a tooltip when mouse is over that click handler as a link in Text.
|
||||||
virtual QString tooltip() const {
|
virtual QString tooltip() const {
|
||||||
return QString();
|
return QString();
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ void FlatLabel::overrideLinkClickHandler(Fn<void(QString url)> handler) {
|
||||||
if (button != Qt::LeftButton) {
|
if (button != Qt::LeftButton) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
handler(link->dragText());
|
handler(link->url());
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue