Core: Combine two code paths creating absolute paths

Remote and local can use the same nowadays.

Change-Id: I218aafb0293dadbbf75f248f4076cabfa4a0f3da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-11-21 13:28:24 +01:00
parent ba80985769
commit 722312f62f
+1 -7
View File
@@ -981,13 +981,7 @@ IDocument *MainWindow::openFiles(const FilePaths &filePaths,
const FilePath workingDirBase =
workingDirectory.isEmpty() ? FilePath::currentWorkingPath() : workingDirectory;
for (const FilePath &filePath : filePaths) {
FilePath absoluteFilePath;
if (filePath.isAbsolutePath()) {
absoluteFilePath = filePath;
} else {
QTC_CHECK(!filePath.needsDevice());
absoluteFilePath = workingDirBase.resolvePath(filePath.path());
}
const FilePath absoluteFilePath = workingDirBase.resolvePath(filePath);
if (IDocumentFactory *documentFactory = findDocumentFactory(documentFactories, filePath)) {
IDocument *document = documentFactory->open(absoluteFilePath);
if (!document) {