Project/Project.py

changeset 152
ee3a13a0ad59
parent 151
00c27aeede62
child 153
ef200d69dba0
--- a/Project/Project.py	Wed Mar 24 08:43:48 2010 +0000
+++ b/Project/Project.py	Wed Mar 24 18:29:26 2010 +0000
@@ -300,7 +300,7 @@
         for key in self.__class__.keynames:
             self.pdata[key] = []
         self.pdata["AUTHOR"] = ['']
-        self.pdata["EMAIL"] = ['']
+        self.pdata["EMAIL"] = ['']
         self.pdata["HASH"] = ['']
         self.pdata["PROGLANGUAGE"] = ["Python3"]
         self.pdata["MIXEDLANGUAGE"] = [False]
@@ -622,14 +622,14 @@
             for fn in self.pdata["OTHERS"]:
                 dn = os.path.dirname(fn)
                 if dn not in self.otherssubdirs:
-                    self.otherssubdirs.append(dn)
-            
-            # create hash value, if it doesn't have one
-            if not self.pdata["HASH"][0]:
-                hash = str(QCrytographicHash.hash(
-                    QByteArray(self.ppath), QCryptographicHash.Sha1),
-                    encoding = "utf-8")
-                self.pdata["HASH"] = [hash]
+                    self.otherssubdirs.append(dn)
+            
+            # create hash value, if it doesn't have one
+            if not self.pdata["HASH"][0]:
+                hash = str(QCryptographicHash.hash(
+                    QByteArray(self.ppath), QCryptographicHash.Sha1).toHex(),
+                    encoding = "utf-8")
+                self.pdata["HASH"] = [hash]
                 self.setDirty(True)
             
         return res
@@ -2260,12 +2260,12 @@
             self.pluginGrp.setEnabled(self.pdata["PROJECTTYPE"][0] == "E4Plugin")
             
             self.emit(SIGNAL("projectAboutToBeCreated"))
-            
-            hash = str(QCrytographicHash.hash(
-                QByteArray(self.ppath), QCryptographicHash.Sha1),
-                encoding = "utf-8")
-            self.pdata["HASH"] = [hash]
-            
+            
+            hash = str(QCryptographicHash.hash(
+                QByteArray(self.ppath), QCryptographicHash.Sha1).toHex(),
+                encoding = "utf-8")
+            self.pdata["HASH"] = [hash]
+            
             # create the project directory if it doesn't exist already
             if not os.path.isdir(self.ppath):
                 try:

eric ide

mercurial