Core: Properly handle file path arguments with -client option

These paths come from the user, so the separators must be translated.

Fixes: QTCREATORBUG-27075
Change-Id: Ia20c2662d30626b8b7ed3dd19afb64a43c8a716f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2022-02-18 10:31:33 +01:00
parent 2834e90930
commit 59fb0e9c9c

View File

@@ -283,7 +283,7 @@ QObject *CorePlugin::remoteCommand(const QStringList & /* options */,
});
return nullptr;
}
const FilePaths filePaths = Utils::transform(args, FilePath::fromString);
const FilePaths filePaths = Utils::transform(args, FilePath::fromUserInput);
IDocument *res = MainWindow::openFiles(
filePaths,
ICore::OpenFilesFlags(ICore::SwitchMode | ICore::CanContainLineAndColumnNumbers | ICore::SwitchSplitIfAlreadyVisible),