diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-08 15:20:02 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-08 15:20:02 -0400 |
| commit | b0b223e9f2379c5d6622dcc082692aa94235cd96 (patch) | |
| tree | 43ea1b1afa9a4d01f70f0bf8050a5f8492066439 /view/sharedcache/core/SharedCacheView.cpp | |
| parent | 538565e8b89ed5e2b642c2c27833d9c75a39eb41 (diff) | |
[SharedCache] Fix older BNDBs not updating workflow to use new workflow name
Diffstat (limited to 'view/sharedcache/core/SharedCacheView.cpp')
| -rw-r--r-- | view/sharedcache/core/SharedCacheView.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp index 2fe32daf..478ce2d6 100644 --- a/view/sharedcache/core/SharedCacheView.cpp +++ b/view/sharedcache/core/SharedCacheView.cpp @@ -218,12 +218,16 @@ bool SharedCacheView::Init() Ref<Settings> settings = GetLoadSettings(GetTypeName()); - // If we are a new file (not a database) lets go ahead and set the function workflow. - // We do not set the workflow on database as the user might have changed it in load options prior. - if (!settings && !GetFile()->IsBackedByDatabase()) + if (!settings) { Ref<Settings> programSettings = Settings::Instance(); - programSettings->Set("analysis.workflows.functionWorkflow", "core.function.sharedCache", this); + auto previousWorkflow = programSettings->Get<std::string>("analysis.workflows.functionWorkflow", this); + + // If we are a new file (not a database) lets go ahead and set the function workflow. + // We do not set the workflow on database as the user might have changed it in load options prior. + // We also need to update usages of `core.function.dsc` to `core.function.sharedCache` + if (!GetFile()->IsBackedByDatabase() || previousWorkflow == "core.function.dsc") + programSettings->Set("analysis.workflows.functionWorkflow", "core.function.sharedCache", this); } if (m_parseOnly) |
