WebBrowser/Passwords/LoginForm.py

branch
QtWebEngine
changeset 4744
ad3f6c1caf8d
parent 4743
f9e2e536d130
child 4749
750577d35452
--- a/WebBrowser/Passwords/LoginForm.py	Mon Feb 15 20:01:02 2016 +0100
+++ b/WebBrowser/Passwords/LoginForm.py	Wed Feb 17 19:49:51 2016 +0100
@@ -9,7 +9,7 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import QUrl
+from PyQt5.QtCore import QUrl, QByteArray
 
 
 class LoginForm(object):
@@ -22,11 +22,7 @@
         """
         self.url = QUrl()
         self.name = ""
-        self.hasAPassword = False
-        self.elements = []
-        # list of tuples of element name and value (string, string)
-        self.elementTypes = {}
-        # dict of element name as key and type as value
+        self.postData = QByteArray()
     
     def isValid(self):
         """
@@ -34,4 +30,5 @@
         
         @return flag indicating a valid form (boolean)
         """
-        return len(self.elements) > 0
+        return not self.url.isEmpty() and \
+            not self.postData.isEmpty()

eric ide

mercurial