summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonutils.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2022-01-05 09:58:42 +0100
committerDavid Schulz <david.schulz@qt.io>2022-01-05 10:25:04 +0000
commita09d4e2918f20bb8d62a6f4cbc132b5ea0fae12c (patch)
tree79ff16bc9348da154a7dc459c611abc9005428bf /src/plugins/python/pythonutils.cpp
parent22a2693917d8ffc4cffc42d605944722aff5f658 (diff)
downloadqt-creator-a09d4e2918f20bb8d62a6f4cbc132b5ea0fae12c.tar.gz
Python: fix repl workdir
Use the directory that contains the file not the file itself as the working directory for REPL. amends 4a42bcd4e8d2c73be426775597e8a58f5df6a3a8 Change-Id: Ia81efc3ef51a96a79918d358cd446de9f1ea082d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r--src/plugins/python/pythonutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp
index 4174702c1f..a98fdc449a 100644
--- a/src/plugins/python/pythonutils.cpp
+++ b/src/plugins/python/pythonutils.cpp
@@ -518,7 +518,7 @@ void openPythonRepl(const FilePath &file, ReplType type)
return project->projectDirectory();
return FilePath::fromString(QDir::currentPath());
}
- return file;
+ return file.absolutePath();
};
const auto args = QStringList{"-i"} + replImportArgs(file, type);