| 33 | // ── Per-user PTY symlink path (matches CatPort::defaultSymlinkPath) ─────────── |
| 34 | |
| 35 | static 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 | |