aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/luaplugin.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2025-04-11 11:51:03 +0200
committerhjk <[email protected]>2025-04-11 14:51:57 +0000
commiteeaa93fc749d36abb7b2f175ba25d36cbd95d1c6 (patch)
tree2fe3132c1431f3a365191e844db9031d950d3880 /src/plugins/lua/luaplugin.cpp
parenta460ec1641f6fb39901bb38d930a209a9078efaf (diff)
Replace most expected_str by Utils::Result
Keep it in Axivion dto, which is generated. Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
Diffstat (limited to 'src/plugins/lua/luaplugin.cpp')
-rw-r--r--src/plugins/lua/luaplugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/luaplugin.cpp b/src/plugins/lua/luaplugin.cpp
index 2b81d58163f..3609534d5a8 100644
--- a/src/plugins/lua/luaplugin.cpp
+++ b/src/plugins/lua/luaplugin.cpp
@@ -326,7 +326,7 @@ public:
pluginSpecsFromArchiveFactories().push_back([](const FilePath &path) -> QList<PluginSpec *> {
if (path.isFile()) {
if (path.suffix() == "lua") {
- Utils::expected_str<PluginSpec *> spec = loadPlugin(path);
+ Utils::Result<PluginSpec *> spec = loadPlugin(path);
QTC_CHECK_EXPECTED(spec);
if (spec)
return {*spec};
@@ -339,7 +339,7 @@ public:
for (const auto &dir : dirs) {
const auto specFilePath = dir / (dir.fileName() + ".lua");
if (specFilePath.exists()) {
- Utils::expected_str<PluginSpec *> spec = loadPlugin(specFilePath);
+ Utils::Result<PluginSpec *> spec = loadPlugin(specFilePath);
QTC_CHECK_EXPECTED(spec);
if (spec)
plugins.push_back(*spec);
@@ -440,7 +440,7 @@ public:
continue;
}
- const expected_str<LuaPluginSpec *> result = loadPlugin(script);
+ const Result<LuaPluginSpec *> result = loadPlugin(script);
if (!result) {
qWarning() << "Failed to load plugin" << script << ":" << result.error();
@@ -511,7 +511,7 @@ public:
static void runScript(const FilePath &script)
{
- expected_str<QByteArray> content = script.fileContents();
+ Result<QByteArray> content = script.fileContents();
if (content) {
Lua::runScript(QString::fromUtf8(*content), script.fileName());
} else {