refactor: replace deprecated qsrand/qrand with std::rand, QRegExp with QRegularExpression #1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/deprecated-apis-pr1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replaces all deprecated Qt APIs with portable alternatives that work on Qt 5.0+:
Changes
qsrand/qrand→std::srand/std::rand(<cstdlib>)tailscalecontroller.cpp(seed + 3 random selections in quick-connect)QRegExp→QRegularExpression(available since Qt 5.0)pongLatencyPatternin quick-connect probe result parsingloginUrlPatternin login URL extraction (both app + daemon)derpRegionPatternin ping result parsing.indexIn()→.match().hasMatch(),.cap(n)→.match().captured(n)Verification
grep -c "qsrand\|qrand\|QRegExp"returns 0 in both changed filesQRandomGenerator, noQOverload)Files changed
app/src/tailscalecontroller.cpp— 30 insertions, 21 deletionsdaemon/src/control.cpp— 10 insertions, 4 deletions