Skip to content

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Feb 13, 2020

  1. Use a CSS selector to avoid changing the background colour of the tooltip.
  2. Re-check validity of input when we first set the validator (probably a no-op in practice).
  3. Check validity of input when it is set programmatically via setText (eg, via the address book). Probably no-op in practice UNTIL merging Wallet, GUI: Warn when sending to already-used Bitcoin addresses #15987 or any other PR that adds a warning for valid addresses.

@fanquake fanquake added the GUI label Feb 13, 2020
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK aeb18b6

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

@@ -29,6 +29,7 @@ class QValidatedLineEdit : public QLineEdit
const QValidator *checkValidator;

public Q_SLOTS:
void setText(const QString&);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aeb18b6

Maybe drop this and add in the constructor:

connect(this, &QValidatedLineEdit::textChanged, this, &QValidatedLineEdit::checkValidity);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it will run checkValidity twice for every keystroke?

@fanquake
Copy link
Member

A couple of Concept ACKs here, but no other comments for 6 months. Also seems that the 3rd commit is still a no-op (along with probably the second commit?), and #15987 has now been closed. I'm going to suggest re-opening in the GUI repo.

@fanquake fanquake closed this Aug 14, 2020
hebasto added a commit to bitcoin-core/gui that referenced this pull request Feb 9, 2022
aeb18b6 Bugfix: GUI: Check validity when QValidatedLineEdit::setText is called (Luke Dashjr)
b1a544b Bugfix: GUI: Re-check validity after QValidatedLineEdit::setCheckValidator (Luke Dashjr)
2385b50 Bugfix: GUI: Only apply invalid style to QValidatedLineEdit, not its tooltip (Luke Dashjr)

Pull request description:

  1. Use a CSS selector to avoid changing the background colour of the tooltip.
  2. Re-check validity of input when we first set the validator (probably a no-op in practice).
  3. Check validity of input when it is set programmatically via `setText` (eg, via the address book). Probably no-op in practice UNTIL merging bitcoin/bitcoin#15987 or any other PR that adds a warning for valid addresses.

  Moved from bitcoin/bitcoin#18133 (just concept ACKs)

ACKs for top commit:
  Sjors:
    tACK aeb18b6
  hebasto:
    ACK aeb18b6, tested on Linux Mint 20.3 (Qt 5.12.8).

Tree-SHA512: b6fa8ee4dec76e1c759095721240e6fa5071a02993cb28406e96a0fa2e819f5dddc03d2e7c9073354d7865c2b09eb263afaf853ecba42e9fc4f50ef4ae20bf0f
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 9, 2022
…ineEdit

aeb18b6 Bugfix: GUI: Check validity when QValidatedLineEdit::setText is called (Luke Dashjr)
b1a544b Bugfix: GUI: Re-check validity after QValidatedLineEdit::setCheckValidator (Luke Dashjr)
2385b50 Bugfix: GUI: Only apply invalid style to QValidatedLineEdit, not its tooltip (Luke Dashjr)

Pull request description:

  1. Use a CSS selector to avoid changing the background colour of the tooltip.
  2. Re-check validity of input when we first set the validator (probably a no-op in practice).
  3. Check validity of input when it is set programmatically via `setText` (eg, via the address book). Probably no-op in practice UNTIL merging bitcoin#15987 or any other PR that adds a warning for valid addresses.

  Moved from bitcoin#18133 (just concept ACKs)

ACKs for top commit:
  Sjors:
    tACK aeb18b6
  hebasto:
    ACK aeb18b6, tested on Linux Mint 20.3 (Qt 5.12.8).

Tree-SHA512: b6fa8ee4dec76e1c759095721240e6fa5071a02993cb28406e96a0fa2e819f5dddc03d2e7c9073354d7865c2b09eb263afaf853ecba42e9fc4f50ef4ae20bf0f
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants