Francois Gouget : testbot/web: Tweak the Login and ResetPassword GetInputType() formatting.

Alexandre Julliard julliard at winehq.org
Fri Apr 22 14:37:56 CDT 2022


Module: tools
Branch: master
Commit: 3c23a41ff24936fbe32eac56cac5b954615f4e42
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=3c23a41ff24936fbe32eac56cac5b954615f4e42

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Apr 22 00:02:56 2022 +0200

testbot/web: Tweak the Login and ResetPassword GetInputType() formatting.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/web/Login.pl         | 9 +++------
 testbot/web/ResetPassword.pl | 9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/testbot/web/Login.pl b/testbot/web/Login.pl
index 837617d..7b9a6ff 100644
--- a/testbot/web/Login.pl
+++ b/testbot/web/Login.pl
@@ -65,12 +65,9 @@ sub GetInputType($$)
 {
   my ($self, $PropertyDescriptor) = @_;
 
-  if ($PropertyDescriptor->GetName() eq "Password")
-  {
-    return "password";
-  }
-
-  return $self->SUPER::GetInputType($PropertyDescriptor);
+  my $PropertyName = $PropertyDescriptor->GetName();
+  return $PropertyName eq "Password" ? "password" :
+         $self->SUPER::GetInputType($PropertyDescriptor);
 }
 
 sub GenerateFields($)
diff --git a/testbot/web/ResetPassword.pl b/testbot/web/ResetPassword.pl
index 4f672ea..081e27f 100644
--- a/testbot/web/ResetPassword.pl
+++ b/testbot/web/ResetPassword.pl
@@ -63,12 +63,9 @@ sub GetInputType($$)
 {
   my ($self, $PropertyDescriptor) = @_;
 
-  if (substr($PropertyDescriptor->GetName(), 0, 8) eq "Password")
-  {
-    return "password";
-  }
-
-  return $self->SUPER::GetInputType($PropertyDescriptor);
+  my $PropertyName = substr($PropertyDescriptor->GetName(), 0, 8);
+  return $PropertyName eq "Password" ? "password" :
+         $self->SUPER::GetInputType($PropertyDescriptor);
 }
 
 sub GetActions($)




More information about the wine-cvs mailing list