OutputWindow: Do not activate links for empty reference

Change-Id: I1d4fc0f25f1882a34058c66c51376982cc70238e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Orgad Shaneh
2020-06-18 07:52:26 +03:00
committed by Orgad Shaneh
parent c7b0940977
commit 6cfd240285
5 changed files with 66 additions and 58 deletions

View File

@@ -187,7 +187,8 @@ void OutputWindow::mouseReleaseEvent(QMouseEvent *e)
{
if (d->linksActive && d->mouseButtonPressed == Qt::LeftButton) {
const QString href = anchorAt(e->pos());
d->formatter.handleLink(href);
if (!href.isEmpty())
d->formatter.handleLink(href);
}
// Mouse was released, activate links again