Skip to content
Permalink
Browse files

Fix invalid (deprecated) escape strings in db manager

  • Loading branch information
nyalldawson committed Feb 13, 2018
1 parent 70644f1 commit c08e4c53a9b8ca8a05f617e6f34b92307119f503
@@ -246,7 +246,7 @@ def getObject(self, row):
fld.name = self.data(self.index(row, 0)) or ""

typestr = self.data(self.index(row, 1)) or ""
regex = QRegExp("([^\(]+)\(([^\)]+)\)")
regex = QRegExp("([^\\(]+)\\(([^\\)]+)\\)")
startpos = regex.indexIn(typestr)
if startpos >= 0:
fld.dataType = regex.cap(1).strip()
@@ -378,7 +378,7 @@ def __init__(self, row, table):

# get modifier (e.g. "precision,scale") from formatted type string
trimmedTypeStr = typeStr.strip()
regex = QRegExp("\((.+)\)$")
regex = QRegExp("\\((.+)\\)$")
startpos = regex.indexIn(trimmedTypeStr)
if startpos >= 0:
self.modifier = regex.cap(1).strip()

0 comments on commit c08e4c5

Please sign in to comment.
You can’t perform that action at this time.