Sync the address passed in the signal `currentAddressChanged()` with the addressOffset?
In the "example" application, the address in the status bar is the "real" address, regardless of whether there is an extra offset added. The address shown on the left of the address area shows the address plus the offset, as intended.
I think this can be easily fixed in qhexedit.cpp by changing the line where the signal is emitted:
229 emit currentAddressChanged(_bPosCurrent + _addressOffset);
^^^^^^^^^^^^^^
Would this impact any other code? Or should the application handle this in its own slot connected to that signal?
I am no longer convinced that it was a good idea to introduce this addressOffset in the first place. But since it is already there, the signal should report it accordingly.
I agree
I am no longer convinced that it was a good idea to introduce this addressOffset in the first place.
It's actually quite useful in the scenario, for example, where some text file is being inspected because of encoding issues, and one wishes to display the hex content of just a single line at a time. The offset allows easily showing the offset of the beginning of the line relative to the original document.
In either case, the documentation should state what the actual behavior is.
OTOH, perhaps it should all be left up to the client code and take out the addressOffset entirely? How much existing code would this impact?