diff --git a/cli/tests/application.cpp b/cli/tests/application.cpp index 3571fcf..3c3d2a7 100644 --- a/cli/tests/application.cpp +++ b/cli/tests/application.cpp @@ -177,7 +177,11 @@ void ApplicationTests::test() // use environment variables to specify API-key and URL qputenv("SYNCTHING_CTL_API_KEY", apiKey); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) qputenv("SYNCTHING_CTL_URL", url); +#else + qputenv("SYNCTHING_CTL_URL", QByteArray(url.data(), static_cast(url.size()))); +#endif // test resume, verify via status for dirs only const char *const resumeArgs[] = { "syncthingctl", "resume", "--dir", "test2", nullptr };