diff options
| author | hjk <hjk@qt.io> | 2025-04-11 11:51:03 +0200 |
|---|---|---|
| committer | hjk <hjk@qt.io> | 2025-04-11 14:51:57 +0000 |
| commit | eeaa93fc749d36abb7b2f175ba25d36cbd95d1c6 (patch) | |
| tree | 2fe3132c1431f3a365191e844db9031d950d3880 /src/plugins/python/pythonbuildsystem.cpp | |
| parent | a460ec1641f6fb39901bb38d930a209a9078efaf (diff) | |
Replace most expected_str by Utils::Result
Keep it in Axivion dto, which is generated.
Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/python/pythonbuildsystem.cpp')
| -rw-r--r-- | src/plugins/python/pythonbuildsystem.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/python/pythonbuildsystem.cpp b/src/plugins/python/pythonbuildsystem.cpp index 72dd67588fe..75e99c8cf36 100644 --- a/src/plugins/python/pythonbuildsystem.cpp +++ b/src/plugins/python/pythonbuildsystem.cpp @@ -34,7 +34,7 @@ namespace Python::Internal { static QJsonObject readObjJson(const FilePath &projectFile, QString *errorMessage) { - const expected_str<QByteArray> fileContentsResult = projectFile.fileContents(); + const Result<QByteArray> fileContentsResult = projectFile.fileContents(); if (!fileContentsResult) { *errorMessage = fileContentsResult.error(); return {}; @@ -68,7 +68,7 @@ static QStringList readLines(const FilePath &projectFile) QSet<QString> visited; QStringList lines; - const expected_str<QByteArray> contents = projectFile.fileContents(); + const Result<QByteArray> contents = projectFile.fileContents(); if (contents) { QTextStream stream(contents.value()); @@ -250,7 +250,7 @@ bool PythonBuildSystem::save() newContents = newPyProjectToml.value().toUtf8(); } else if (filePath.endsWith(".pyproject")) { // *.pyproject project file - expected_str<QByteArray> contents = filePath.fileContents(); + Result<QByteArray> contents = filePath.fileContents(); if (!contents) { MessageManager::writeDisrupting(contents.error()); return false; @@ -265,7 +265,7 @@ bool PythonBuildSystem::save() newContents = projectFiles.join('\n').toUtf8(); } - const expected_str<qint64> writeResult = filePath.writeFileContents(newContents); + const Result<qint64> writeResult = filePath.writeFileContents(newContents); if (!writeResult) { MessageManager::writeDisrupting(writeResult.error()); return false; |
