aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/widgets
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-06 18:46:59 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-06 18:46:59 +0300
commit93870c315f84d2bb599d669be8205990ee48907d (patch)
treef3f2e988d6bbb06febfc48d212c08e9f7c1259d1 /launcher/ui/widgets
parentf0aab541f817347a932c65d3b06d2d4c1e7b90c1 (diff)
downloadPrismLauncher-93870c315f84d2bb599d669be8205990ee48907d.tar.gz
PrismLauncher-93870c315f84d2bb599d669be8205990ee48907d.tar.bz2
PrismLauncher-93870c315f84d2bb599d669be8205990ee48907d.zip
better url handling
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/widgets')
-rw-r--r--launcher/ui/widgets/InfoFrame.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/ui/widgets/InfoFrame.cpp b/launcher/ui/widgets/InfoFrame.cpp
index b16bc097..a0fda952 100644
--- a/launcher/ui/widgets/InfoFrame.cpp
+++ b/launcher/ui/widgets/InfoFrame.cpp
@@ -46,7 +46,7 @@
void setupLinkToolTip(QLabel* label)
{
QObject::connect(label, &QLabel::linkHovered, [label](const QString& link) {
- if (!link.isEmpty() && !link.startsWith("http"))
+ if (auto url = QUrl(link); !url.isValid() || (url.scheme() != "http" && url.scheme() != "https"))
return;
label->setToolTip(link);
});