"hushd connection" tab in settings missing data #98

Closed
opened 2 years ago by duke · 5 comments
duke commented 2 years ago
Owner

Currently the host/port/username/password boxes are empty, which is not correct. We should not let the users change this data, because it will cause things to break until a restart. We probably should just render the values read-only.

Currently the host/port/username/password boxes are empty, which is not correct. We should not let the users change this data, because it will cause things to break until a restart. We probably should just render the values read-only.
Collaborator

I'll take a look later when I'm home. I know there is some stuff for reading HUSH3.conf that might be related. I noticed a couple of tabs under the settings also had broken layouts that don't scale that could probably be fixed too.

I'll take a look later when I'm home. I know there is some stuff for reading HUSH3.conf that might be related. I noticed a couple of tabs under the settings also had broken layouts that don't scale that could probably be fixed too.
duke changed title from "hushd connectin" tab in settings missing data to "hushd connection" tab in settings missing data 2 years ago
Collaborator

I think the problem with this is that it's not actually reading or using values from HUSH3.conf here. When HUSH3.conf exists, it disables all the fields. You can only type in them when HUSH3.conf doesn't exist. It looks like it tries setting to values from QSettings instead, which are empty. QSettings might only get set if you save these when HUSH3.conf doesn't exist:
https://git.hush.is/hush/SilentDragon/src/branch/dev/src/mainwindow.cpp#L519

getSettings does this:
https://git.hush.is/hush/SilentDragon/src/branch/dev/src/settings.cpp#L68

If needed, they should probably get set when reading HUSH3.conf or just use the values from hushconf directly to set the field values instead:
https://git.hush.is/hush/SilentDragon/src/branch/dev/src/connection.cpp#L661

I think the problem with this is that it's not actually reading or using values from HUSH3.conf here. When HUSH3.conf exists, it disables all the fields. You can only type in them when HUSH3.conf **doesn't** exist. It looks like it tries setting to values from QSettings instead, which are empty. QSettings might only get set if you save these when HUSH3.conf doesn't exist: https://git.hush.is/hush/SilentDragon/src/branch/dev/src/mainwindow.cpp#L519 `getSettings` does this: https://git.hush.is/hush/SilentDragon/src/branch/dev/src/settings.cpp#L68 If needed, they should probably get set when reading HUSH3.conf or just use the values from hushconf directly to set the field values instead: https://git.hush.is/hush/SilentDragon/src/branch/dev/src/connection.cpp#L661
Collaborator

There is saveSettings. For quick fix I am using that when reading HUSH3.conf and setting the values. Fields then show data. Rather than disabling, probably still want to make fields readable so they can be copied/pasted elsewhere if needed. Disabled doesn't let you do that.

There is `saveSettings`. For quick fix I am using that when reading HUSH3.conf and setting the values. Fields then show data. Rather than disabling, probably still want to make fields readable so they can be copied/pasted elsewhere if needed. Disabled doesn't let you do that.
Collaborator

Fixed here dc5f3c3a11

Fixed here https://git.hush.is/hush/SilentDragon/commit/dc5f3c3a114ea9d572cb82bcd8884e947178a4bb
Poster
Owner

@fekt nice! Seems to work for me on the dev branch.

@fekt nice! Seems to work for me on the dev branch.
duke closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.