ImperialCollegeLondon / FINESSE

A graphical user interface for controlling and monitoring an interferometer device
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Fix OPUS request URLs #575

Closed alexdewar closed 7 months ago

alexdewar commented 7 months ago

Description

Since commit 72b6e851, the request URLs used by OPUSInterface have been broken (#574), which causes commands to fail (e.g. starting recording). Fix by creating the URL from a string rather than a QUrl. We had unit tests for this but they didn't catch it.

Fixes #574.

Type of change

Key checklist

Further checks

alexdewar commented 7 months ago

Sorry, it was a slightly rushed description. The problem was that we were using the setPath() method of the QUrl to set the path with a query string, e.g. setPath("cmd.htm?opusrsstart"), but the question mark gets escaped rather than passed through. You need to use the setQuery() method instead to set this part, but I decided it was easier to just go back to using simple strings. The reason the test didn't pick it up was because the test didn't look at the case where there was a query string. Actually, I'll remedy that :smile: