Skip to content

Commit df4fc99

Browse files
committed
gdaltools: more SIP APIv2 update
1 parent edd0cdd commit df4fc99

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/plugins/GdalTools/tools/doFillNodata.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def updateProgress(self, index, total):
205205
self.progressBar.setValue( 0 )
206206

207207
def batchRun(self):
208-
exts = self.formatCombo.currentText().remove( QRegExp('^.*\(') ).remove( QRegExp('\).*$') ).split( " " )
208+
exts = re.sub('\).*$', '', re.sub('^.*\(', '', self.formatCombo.currentText())).split(" ")
209209
if exts and exts != "*" and exts != "*.*":
210210
outExt = exts[ 0 ].remove( "*" )
211211
else:
@@ -229,7 +229,7 @@ def batchRun(self):
229229
for f in files:
230230
self.inFiles.append( inDir + "/" + f )
231231
if outDir != None:
232-
outFile = re.sub( f, "\.[a-zA-Z0-9]{2,4}", outExt )
232+
outFile = re.sub( "\.[a-zA-Z0-9]{2,4}", outExt, f )
233233
self.outFiles.append( outDir + "/" + outFile )
234234

235235
self.errors = []

python/plugins/GdalTools/tools/doTranslate.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def getArguments(self):
206206
if self.sdsCheck.isChecked():
207207
arguments.append( "-sds")
208208
if self.srcwinCheck.isChecked() and self.srcwinEdit.text():
209-
coordList = self.srcwinEdit.text().split( ' ', QString.SkipEmptyParts )
209+
coordList = self.srcwinEdit.text().split() # split the string on whitespace(s)
210210
if len(coordList) == 4 and coordList[3]:
211211
try:
212212
for x in coordList:
@@ -219,7 +219,7 @@ def getArguments(self):
219219
for x in coordList:
220220
arguments.append( x)
221221
if self.prjwinCheck.isChecked() and self.prjwinEdit.text():
222-
coordList = self.prjwinEdit.text().split( ' ', QString.SkipEmptyParts )
222+
coordList = self.prjwinEdit.text().split() # split the string on whitespace(s)
223223
if len(coordList) == 4 and coordList[3]:
224224
try:
225225
for x in coordList:
@@ -276,7 +276,7 @@ def updateProgress(self, index, total):
276276
self.progressBar.setValue( 0 )
277277

278278
def batchRun(self):
279-
exts = self.formatCombo.currentText().remove( QRegExp('^.*\(') ).remove( QRegExp('\).*$') ).split( " " )
279+
exts = re.sub('\).*$', '', re.sub('^.*\(', '', self.formatCombo.currentText())).split(" ")
280280
if exts and exts != "*" and exts != "*.*":
281281
outExt = exts[ 0 ].remove( "*" )
282282
else:

0 commit comments

Comments
 (0)