jopohl / urh

Universal Radio Hacker: Investigate Wireless Protocols Like A Boss
GNU General Public License v3.0
10.99k stars 874 forks source link

Save as dialog ignores selected file format #913

Closed Semnodime closed 2 years ago

Semnodime commented 3 years ago
Expected Behavior

Save signal in selected format.

Actual Behavior

Saves signal in format determined by file extension irrespective of selected format during "save as"-dialog. Saving the signal as complex32unsigned ("file_a") and as complex16unsigned ("file_b") will result in the same hash sum.

Steps To Reproduce
  1. Open some signal
  2. Save the signal as...
  3. Select a format out of ["complex", "complex16unsigned", "complex16signed", "complex32unsigned", "complex32signed"]
  4. Name the file just "a" (or anything without file name extension)
Platform Specifications
jopohl commented 3 years ago

This is on purpose because without the file extension URH has no chance to know about the format when you load it again. Therefore, without an extension the default .complex format is assumed. More info can be found here.

Semnodime commented 3 years ago

I assume it would be wise, to (forcibly) add the extension according to the format selected in the "save as"-dialog instead of saving in a format that has not been specified.

My rationale is, that the format select won't even display which extension one currently must manually add, to make sure that the correct / selected format is actually used.

jopohl commented 3 years ago

Isn't that done by the file manager anyway? At least on my system (KDE) it works like this: image

Semnodime commented 3 years ago

It is not done on my system. That's why I noted, which Qt version I am using in the initial post. image

jopohl commented 3 years ago

That looks rather like a GTK file dialog. Do you see this desired behavior in other Qt programs?

jopohl commented 2 years ago

Closing due to inactivity.