Core: FilePathify WindowTitleHandler

Change-Id: I905a193e70b199cbbd483e76e14c7f9fd2b179ef
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2022-06-16 13:38:24 +02:00
parent 3ab822739d
commit e052d75987
4 changed files with 17 additions and 18 deletions

View File

@@ -199,7 +199,7 @@ public:
explicit StateListener(QObject *parent);
~StateListener();
static QString windowTitleVcsTopic(const QString &filePath);
static QString windowTitleVcsTopic(const FilePath &filePath);
signals:
void stateChanged(const VcsBase::Internal::State &s, IVersionControl *vc);
@@ -230,11 +230,11 @@ StateListener::~StateListener()
EditorManager::setWindowTitleVcsTopicHandler({});
}
QString StateListener::windowTitleVcsTopic(const QString &filePath)
QString StateListener::windowTitleVcsTopic(const FilePath &filePath)
{
FilePath searchPath;
if (!filePath.isEmpty()) {
searchPath = FilePath::fromString(filePath).absolutePath();
searchPath = filePath.absolutePath();
} else {
// use single project's information if there is only one loaded.
const QList<Project *> projects = SessionManager::projects();