MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / remapLegacyPath

Method remapLegacyPath

app/src/Misc/WorkspaceManager.cpp:150–161  ·  view source on GitHub ↗

* @brief Rewrites a saved "JSON Projects" path so it resolves under the new "Projects" folder. */

Source from the content-addressed store, hash-verified

148 * @brief Rewrites a saved "JSON Projects" path so it resolves under the new "Projects" folder.
149 */
150QString Misc::WorkspaceManager::remapLegacyPath(const QString& path) const
151{
152 if (path.isEmpty())
153 return path;
154
155 QString p = QDir::fromNativeSeparators(path);
156 if (!p.contains(QStringLiteral("/JSON Projects/")))
157 return path;
158
159 p.replace(QStringLiteral("/JSON Projects/"), QStringLiteral("/Projects/"));
160 return p;
161}
162
163/**
164 * @brief Copy-with-marker migration from {workspace}/JSON Projects to {workspace}/Projects.

Callers 1

openJsonFileMethod · 0.80

Calls 2

isEmptyMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected