aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/mainwindow.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-11-21 13:28:24 +0100
committerhjk <hjk@qt.io>2022-11-21 13:25:26 +0000
commit722312f62fbc5476b1938b4c98df6fa86c986257 (patch)
tree66f0e5c433a3a857a1c91ab312ded04fe6025e86 /src/plugins/coreplugin/mainwindow.cpp
parentba80985769c550f31995f0c5254cf748b941dd91 (diff)
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>
Diffstat (limited to 'src/plugins/coreplugin/mainwindow.cpp')
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index ee9bffe3a9..fb241498c8 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -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) {