From e7a0c380d71c735b44f543b4237b9108934edda7 Mon Sep 17 00:00:00 2001 From: Alesandro Portale Date: Tue, 5 Apr 2022 15:37:57 +0200 Subject: [PATCH] ProjectExplorer: Cleanup Window title for the case of no loaded document When no document is loaded, don't prepend a windowTitleAddition to the IDE window title. Fixes: QTCREATORBUG-27328 Change-Id: I283debc2588c6552eaeb9ea23d7df0d07580f9af Reviewed-by: Reviewed-by: Cristian Adam --- src/plugins/projectexplorer/session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index c03baf88482..7518dc3cd02 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -637,7 +637,7 @@ QString SessionManagerPrivate::locationInProject(const QString &filePath) { QString SessionManagerPrivate::windowTitleAddition(const QString &filePath) { - return locationInProject(filePath); + return filePath.isEmpty() ? QString() : locationInProject(filePath); } QStringList SessionManagerPrivate::dependenciesOrder() const