"""
function switchToKeymap(keymap) {
var finalKeymap = keymap.split("+");
savedKeymap = keymap; // save the keymap in case the surface changes later
if (surface) { surface.setKeymap(finalKeymap[0], finalKeymap[1] || "");
}
}
"""
I know I'm late to the party, but as I'm rebasing surface-based WM on top of silo 041 I couldn't help frowning when I saw that.
This kind of imperative work doesn't belong to QML. Can't the surface have a property that takes the full string and does any and all parsing needed behind the scenes?
""" keymap) {
function switchToKeymap(
var finalKeymap = keymap.split("+");
savedKeymap = keymap; // save the keymap in case the surface changes later
if (surface) {
surface. setKeymap( finalKeymap[ 0], finalKeymap[1] || "");
}
}
"""
I know I'm late to the party, but as I'm rebasing surface-based WM on top of silo 041 I couldn't help frowning when I saw that.
This kind of imperative work doesn't belong to QML. Can't the surface have a property that takes the full string and does any and all parsing needed behind the scenes?
Something like that:
"""
SurfaceContainer {
id: root
property string keymap
Binding {
target: surface
property: "keymap"
value: root.keymap
}
}
"""