Extract provider and account from token path Path format: ~/.config/CloudRedirect/tokens/{provider}_{account}.json
| 126 | // Extract provider and account from token path |
| 127 | // Path format: ~/.config/CloudRedirect/tokens/{provider}_{account}.json |
| 128 | static bool parseTokenPath(const QString& path, QString& provider, QString& account) { |
| 129 | QFileInfo fi(path); |
| 130 | QString basename = fi.baseName(); // e.g., "gdrive_12345678" |
| 131 | int sep = basename.indexOf('_'); |
| 132 | if (sep < 0) return false; |
| 133 | provider = basename.left(sep); |
| 134 | account = basename.mid(sep + 1); |
| 135 | return !provider.isEmpty() && !account.isEmpty(); |
| 136 | } |
| 137 | |
| 138 | OAuthService::OAuthService(QObject *parent) : QObject(parent) {} |
| 139 |
no outgoing calls
no test coverage detected