You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be done not with QSettings, but the following way:
each workflow is assigned a randomly generated ID
each widget is assigned a sequential ID
a JSON file named <workflow-id>.json is created somewhere in the data directory (~/Library/Application Support/Orange on Mac), mapping widgets to their user-only setting values
Who would delete these files? A frequent user can easily have hundreds. We cannot automatically delete the oldest ones, because the user may still have a copy of the workspace.
What about saving these settings in the .ows file, but encrypted with a machine-dependent key? Is there such a thing? One that would also survive reinstallation of Orange? Let us assume that these settings are not critical w.r.t. information loss -- neither vim mode nor absolute path is something that couldn't be fixed by the user if it's lost.
This would also be easy to implement: every Setting would have an additional flag encode (default would be False), which would be observed by the two methods that encode/decode settings. This would probably require changing just these two particular methods.
absolute paths. These should be obscured. If someone else opens the workflow and changes it, it should be overwritten.
recent paths, vim mode. These should keep state across all instances of Orange. E.g., after opening a path in File, and opening a new workflow, the path should be shown as a recent path in File in the new workflow.
Your proposed solution works great for the first case. You could use reporting/machine-id, a random UUID generated with uuid.uuid4(). Although, this is currently only generated upon enabling usage statistics. Alternatively, you could use uuid.uuid1() with a specified clock sequence value.
For the second case, it would be either QSettings or one file saved in application support. Either way, it'd be nice to have this functionality abstracted in a Setting.
Activity
janezd commentedon Sep 14, 2020
Who would delete these files? A frequent user can easily have hundreds. We cannot automatically delete the oldest ones, because the user may still have a copy of the workspace.
What about saving these settings in the .ows file, but encrypted with a machine-dependent key? Is there such a thing? One that would also survive reinstallation of Orange? Let us assume that these settings are not critical w.r.t. information loss -- neither vim mode nor absolute path is something that couldn't be fixed by the user if it's lost.
This would also be easy to implement: every
Settingwould have an additional flagencode(default would be False), which would be observed by the two methods that encode/decode settings. This would probably require changing just these two particular methods.irgolic commentedon Sep 14, 2020
My bad, this is actually two different issues.
Your proposed solution works great for the first case. You could use
reporting/machine-id, a random UUID generated withuuid.uuid4(). Although, this is currently only generated upon enabling usage statistics. Alternatively, you could useuuid.uuid1()with a specified clock sequence value.For the second case, it would be either QSettings or one file saved in application support. Either way, it'd be nice to have this functionality abstracted in a Setting.