From fedb43a5f0b8fe75c58915666451fa589916b71d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 3 Jul 2024 14:27:24 +0200 Subject: [PATCH] Help: Do not try to open folder We end up using a system editor or the question which tool to use when trying to open a fake help item. Fixes: QTCREATORBUG-31178 Change-Id: I21b7c98a7ea0c2b442ad8b733477c725f96e80e1 Reviewed-by: Eike Ziller --- src/plugins/help/helpviewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/help/helpviewer.cpp b/src/plugins/help/helpviewer.cpp index 323d9d3f854..01eed943b1b 100644 --- a/src/plugins/help/helpviewer.cpp +++ b/src/plugins/help/helpviewer.cpp @@ -136,6 +136,9 @@ bool HelpViewer::launchWithExternalApp(const QUrl &url) // QHelpEngineCore::findFile returns a valid url even though the file does not exist if (resolvedUrl.scheme() == "about" && resolvedUrl.path() == "blank") return false; + // fake items have no associated file - they are kind of virtual folders + if (resolvedUrl.fileName().isEmpty()) + return false; const QString& path = resolvedUrl.path(); if (!canOpenPage(path)) {