Show encoded url in tooltips
This commit is contained in:
parent
5ba8c79f45
commit
3b41d20506
3 changed files with 8 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ TextArea {
|
|||
|
||||
property alias cursorShape: cs.cursorShape
|
||||
|
||||
ToolTip.text: hoveredLink
|
||||
ToolTip.text: Nheko.punyLink(hoveredLink)
|
||||
ToolTip.visible: hoveredLink || false
|
||||
background: null
|
||||
bottomInset: 0
|
||||
|
|
|
|||
|
|
@ -108,6 +108,12 @@ Nheko::openLink(QString link) const
|
|||
url.toDisplayString().toStdString());
|
||||
}
|
||||
}
|
||||
QString
|
||||
Nheko::punyLink(QString link) const
|
||||
{
|
||||
QUrl url(link);
|
||||
return url.toDisplayString(QUrl::FullyEncoded);
|
||||
}
|
||||
void
|
||||
Nheko::setStatusMessage(QString msg) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public:
|
|||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
}
|
||||
Q_INVOKABLE void openLink(QString link) const;
|
||||
Q_INVOKABLE QString punyLink(QString link) const;
|
||||
Q_INVOKABLE void setStatusMessage(QString msg) const;
|
||||
Q_INVOKABLE void showUserSettingsPage() const;
|
||||
Q_INVOKABLE void logout() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue