-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt 6 reprise #189
Qt 6 reprise #189
Conversation
In Qt6, enum values have been namespaced with the enum type. This handler has been added after the previous attempt at migrating to Qt6.
In Qt 6 the default behaviour was changed to create off-the-record profiles, which are not written to disk. In order to obtain persistent profiles again, we explicitly create a profile named "Default", which matches the default naming in Qt 5. We unset the page when the app is closed, to avoid the following warning due to page and profile being torn down in the wrong order: Release of profile requested but WebEnginePage still not deleted. Expect troubles !
We previously let the app name be inferred from the name of the executable, but this is brittle and caused a rename when the Nix Qt wrapper configuration was changed. We explicitly set the app name to "kiosk-browser", which is what was the previously inferred name with the wrapped executable. This is important to preserve earlier cache and storage locations which are derived from the app name, see https://doc.qt.io/qt-6/qstandardpaths.html
Checked Qt5->Qt6 session persistence with https://dist.dividat.com/releases/playos/develop/2024.7.0-DEVELOP/playos-installer-2024.7.0-DEVELOP.iso as Qt 5 installation, which updates itself to https://dist.dividat.ch/releases/playos/develop/2024.10.0-SNAPSHOT/playos-installer-2024.10.0-SNAPSHOT.iso (viz, the associated bundle), built and released from fda922b. After creating the session in the Qt5 system, and updating to the Qt6 system, the session is persisted. Switching back to the Qt5 system then after having booted into the Qt6 system, the session is still usable. |
testing/integration/kiosk-proxy.nix
Outdated
timeout=10 | ||
) | ||
|
||
# Ideally here we would check if starting the kiosk resulted in a request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally spotted this, but this is quite easily doable by e.g. setting up tinyproxy on the other VM and checking tinyproxy's logs:
playos/testing/integration/controller-proxy.nix
Lines 45 to 60 in e2a4379
services.tinyproxy.enable = true; | |
services.tinyproxy.settings = let | |
update_host_port = builtins.head | |
(builtins.match "https?://([^/]+)/?" updateUrl); | |
captive_host_port = builtins.head | |
(builtins.match "https?://([^/]+)/?" captivePortalUrl); | |
in { | |
Port = 8888; | |
Listen = "0.0.0.0"; | |
Upstream = [ | |
''http 127.0.0.1:80 "${update_host_port}"'' | |
''http 127.0.0.1:80 "${captive_host_port}"'' | |
]; | |
LogLevel = "Critical"; # comment out to debug proxied reqs | |
}; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, thanks for the input.
The problem as I recall had not been inspecting the proxy, but getting the playos peer to resolve the names. I don't recall all details now, but think you may have found a solution in your recent tests, so it's time to look at this again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, your technique applies, I added back the full test based on that. 🙏
@guyonvarch The e2e failure was unrelated and disappeared on re-run. May be a flaky test, but unrelated to this change as far as I can tell. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Tests:
- Session is kept locally from Qt5 to Qt6,
- Session is kept locally from Qt6 to Qt5,
- Games work normally,
- Long press on the menu key opens Playos settings
This reverts the Qt 6 revert (#169) and makes the necessary changes to allow for persistent profiles, including using those created by a previous Qt 5 installation.
Checklist