eric6/Utilities/__init__.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8142
43248bafe9b2
parent 8143
2c730d5fd177
child 8273
698ae46f40a4
--- a/eric6/Utilities/__init__.py	Sat Mar 06 10:00:52 2021 +0100
+++ b/eric6/Utilities/__init__.py	Sun Mar 28 15:00:11 2021 +0200
@@ -208,7 +208,8 @@
     with open(filename, "rb") as f:
         text = f.read()
     hashStr = str(QCryptographicHash.hash(
-        QByteArray(text), QCryptographicHash.Md5).toHex(), encoding="ASCII")
+        QByteArray(text), QCryptographicHash.Algorithm.Md5).toHex(),
+        encoding="ASCII")
     return decode(text) + (hashStr, )
 
 
@@ -604,9 +605,9 @@
     @return line separator used by the editor (string)
     """
     eolMode = Preferences.getEditor("EOLMode")
-    if eolMode == QsciScintilla.EolUnix:
+    if eolMode == QsciScintilla.EolMode.EolUnix:
         return "\n"
-    elif eolMode == QsciScintilla.EolMac:
+    elif eolMode == QsciScintilla.EolMode.EolMac:
         return "\r"
     else:
         return "\r\n"
@@ -1854,7 +1855,7 @@
         getConfig('ericDir'), "Utilities", "PySideImporter.py")
     args = [checker, "--variant={0}".format(variant)]
     proc = QProcess()
-    proc.setProcessChannelMode(QProcess.MergedChannels)
+    proc.setProcessChannelMode(QProcess.ProcessChannelMode.MergedChannels)
     proc.start(interpreter, args)
     finished = proc.waitForFinished(30000)
     if finished:
@@ -2018,7 +2019,7 @@
         getConfig('ericDir'), "Utilities", "GetSysPath.py")
     args = [getSysPath]
     proc = QProcess()
-    proc.setProcessChannelMode(QProcess.MergedChannels)
+    proc.setProcessChannelMode(QProcess.ProcessChannelMode.MergedChannels)
     proc.start(interpreter, args)
     finished = proc.waitForFinished(30000)
     if finished:

eric ide

mercurial