Fix SystemComponent unit tests (#1170)

Turns SystemComponent::extractBaseUrl() into a static method so that the unit tests pass when run locally.
This commit is contained in:
Eric Gregory authored and GitHub committed 2026-03-01 15:36:50 -05:00
1 parent 56e8916285
commit f057bca04a
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ public:
Q_INVOKABLE void cancelServerConnectivity();
Q_SIGNAL void serverConnectivityResult(QString url, bool success, QString resolvedUrl);
QString extractBaseUrl(const QString& url);
static QString extractBaseUrl(const QString& url);
void resolveUrl(const QString& url, std::function<void(const QString&)> callback);
Q_INVOKABLE QString getUserAgent();
+1 -2
View File
@@ -141,8 +141,7 @@ void TestSystemComponent::testExtractBaseUrl()
QFETCH(QString, input);
QFETCH(QString, expected);
SystemComponent* component = &SystemComponent::Get();
QString result = component->extractBaseUrl(input);
QString result = SystemComponent::extractBaseUrl(input);
QCOMPARE(result, expected);
}