Nux

TextEntry::SetPasswordMode does the opposite of what is expected

Bug #1056754 reported by Manuel de la Peña
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nux
Fix Released
Undecided
Unassigned
nux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The following code is an example of the bug:

password_entry_ = new nux::TextEntry();
password_entry_->SetPasswordMode(true);
const char password_char = '*';
password_entry_->text_entry()->SetPasswordChar(&password_char);

The above code should create a text entry that when it receives a key input from the user shows * instead of the actual chars. Unfortunately it is not the case. The main reason resides in the fact that the SetPasswordMode function is defined as:

void SetPasswordMode(bool visible)
{
  SetVisibility(visible);
}

When it should be:

void SetPasswordMode(bool visible)
{
  SetVisibility(!visible);
}

This means that atm the code has to be:

password_entry_->SetPasswordMode(false);

which as you will agree does not make sense.

Related branches

Changed in nux:
status: New → Fix Committed
Stephen M. Webb (bregma)
Changed in nux:
status: Fix Committed → Fix Released
Changed in nux (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.