Skip to content

Commit

Permalink
Fix invalid (deprecated) escape strings in db manager
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 13, 2018
1 parent 70644f1 commit c08e4c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/data_model.py
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/postgis/plugin.py
Expand Up @@ -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()
Expand Down

0 comments on commit c08e4c5

Please sign in to comment.