MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / defaultPtyPath

Function defaultPtyPath

tests/CAT_Flex_test.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// ── Per-user PTY symlink path (matches CatPort::defaultSymlinkPath) ───────────
34
35static QString defaultPtyPath(int portIndex)
36{
37 const char letter = static_cast<char>('A' + portIndex);
38 const QString leaf = QStringLiteral("cat-") + QChar(letter);
39 QString base = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
40 if (base.isEmpty())
41 base = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
42 if (base.isEmpty())
43 base = QDir::homePath() + QStringLiteral("/.cache/aethersdr");
44 if (!base.contains(QStringLiteral("aethersdr"), Qt::CaseInsensitive))
45 base += QStringLiteral("/aethersdr");
46 return base + QLatin1Char('/') + leaf;
47}
48
49// ── ANSI colour ───────────────────────────────────────────────────────────────
50

Callers 1

mainFunction · 0.70

Calls 2

containsMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected