aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonbuildsystem.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2025-08-29 11:04:21 +0200
committerEike Ziller <eike.ziller@qt.io>2025-09-01 06:41:41 +0000
commit5da385fe586f1003239570959d9b067332f4dbfc (patch)
treee81b0fb0b2515a660bbada4aad21351b568b3e0e /src/plugins/python/pythonbuildsystem.cpp
parent7a796f28ba0d42a5fa278dc8d6c0c126b1ac3185 (diff)
Avoid calling throwing functions
Result is a std::expected, so Result::value() throws. We don't use or handle exceptions and always explicitly check before accessing, so this is not useful, and static analyzers complain. Use the non-checking and non-throwing operator* and operator-> instead. Change-Id: I03cc9a97fa9f04da557837c2a5076828dcb7d0e0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src/plugins/python/pythonbuildsystem.cpp')
-rw-r--r--src/plugins/python/pythonbuildsystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/python/pythonbuildsystem.cpp b/src/plugins/python/pythonbuildsystem.cpp
index b400fa7dc70..11e684989b6 100644
--- a/src/plugins/python/pythonbuildsystem.cpp
+++ b/src/plugins/python/pythonbuildsystem.cpp
@@ -247,7 +247,7 @@ bool PythonBuildSystem::save()
setError(newPyProjectToml.error());
return false;
}
- newContents = newPyProjectToml.value().toUtf8();
+ newContents = newPyProjectToml->toUtf8();
} else if (filePath.endsWith(".pyproject")) {
// *.pyproject project file
Result<QByteArray> contents = filePath.fileContents();