← Back to team overview

touch-packages team mailing list archive

[Bug 1056754] Re: TextEntry::SetPasswordMode does the opposite of what is expected

 

** Changed in: nux (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to nux in Ubuntu.
https://bugs.launchpad.net/bugs/1056754

Title:
  TextEntry::SetPasswordMode does the opposite of what is expected

Status in Nux:
  Fix Released
Status in nux package in Ubuntu:
  Fix Released

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nux/+bug/1056754/+subscriptions