New classes ScanQRTextEdit and ShowQRTextEdit.
Reason: dependencies on zbar availability and issues with the QRTextEdit constructor.
- ScanQRTextEdit needs access to the config (fetch camera). It needs to load
the zbar processor properly before trying to scan. Keeping a reference to
the processor in qrscaner fixes the crashes on windows.
- ShowQRTextEdit should not have access to scan_qr().
- no need to setReadOnly anymore. It is clear from the class name.
Show master pub keys now has a Combobox if multiple accounts are
available.
Problem:
Using the exchange rate plugin in the send dialog one can start with
entering a fiat amount, e.g. 5 USD, and the BTC amount is updated,
but no fee is calculated.
In this case can get "Invalid fee" error until the BTC amount is
touched manually and fee is calculated. This can cause confusion
when "set transaction fees manually" is disabled.
Reproducing:
* enable exchange rate plugin
* start Electrum
* in send dialog fill out any receive address
* add a value (e.g. 5) into the fiat dialog and see the BTC value filled out
* fee is not filled out, or if disabled the manual transaction fees then directly
get "Invalid Fee" error
Expectation:
* Fees are calculated just as it would be by filling out the BTC field
Fix:
Fixed by triggering a fee setting the same way as it is done when
the BTC field is edited, by calling `textEdited.emit("")` of the relevant
`BTCAmountEdit` element. One problematic thing is that this also triggers
a change on the fiat we just edited, and thus cursor positions need to be saved
and restored. This is not ideal, there should be a way to avoid such cascades
and trigger fee calculation directly instead of by proxy.
Editing the fiat field with these changes is more or less okay, there can be
some strange steps when the decimal point is edited, but IMHO not worse
than the BTC field when the decimal point is edited there.