eric6/Utilities/__init__.py

changeset 8143
2c730d5fd177
parent 8100
a4c231453cbc
child 8176
31965986ecd1
child 8205
4a0f1f896341
--- a/eric6/Utilities/__init__.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Utilities/__init__.py	Tue Mar 02 17:17:09 2021 +0100
@@ -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