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

Function defaultPtyPath

tests/rigctld_test.cpp:38–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 2

containsMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected