Skip to content

Commit c08e4c5

Browse files
committed
Fix invalid (deprecated) escape strings in db manager
1 parent 70644f1 commit c08e4c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/plugins/db_manager/db_plugins/data_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def getObject(self, row):
246246
fld.name = self.data(self.index(row, 0)) or ""
247247

248248
typestr = self.data(self.index(row, 1)) or ""
249-
regex = QRegExp("([^\(]+)\(([^\)]+)\)")
249+
regex = QRegExp("([^\\(]+)\\(([^\\)]+)\\)")
250250
startpos = regex.indexIn(typestr)
251251
if startpos >= 0:
252252
fld.dataType = regex.cap(1).strip()

python/plugins/db_manager/db_plugins/postgis/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def __init__(self, row, table):
378378

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

0 commit comments

Comments
 (0)