forked from qt-creator/qt-creator
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user