mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
gdaltools: cleanup
This commit is contained in:
parent
df4fc99e83
commit
dd406dce3e
@ -207,7 +207,7 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
|
||||
# show the error message if there's one, otherwise show the process output message
|
||||
msg = str(self.process.readAllStandardError())
|
||||
if msg == '':
|
||||
outMessages = string.split( str(self.process.readAllStandardOutput()), sep="\n" )
|
||||
outMessages = str(self.process.readAllStandardOutput()).splitlines()
|
||||
|
||||
# make sure to not show the help
|
||||
for m in outMessages:
|
||||
@ -222,7 +222,7 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
|
||||
#if m.contains( QRegExp( "0(?:\\.+[1-9]0{1,2})+" ) ):
|
||||
# continue
|
||||
|
||||
if not msg == '':
|
||||
if msg:
|
||||
msg += "\n"
|
||||
msg += m
|
||||
|
||||
|
@ -108,8 +108,8 @@ class GdalToolsDialog(QWidget, Ui_Widget, BasePluginWidget):
|
||||
|
||||
def getOutputFileName(self):
|
||||
if self.useDirAsOutput:
|
||||
fn = self.outSelector.filename()
|
||||
return fn if not fn else fn + QDir.separator() + "contour.shp"
|
||||
if self.outSelector.filename():
|
||||
return self.outSelector.filename() + QDir.separator() + "contour.shp"
|
||||
return self.outSelector.filename()
|
||||
|
||||
def addLayerIntoCanvas(self, fileInfo):
|
||||
|
@ -103,9 +103,9 @@ class GdalToolsDialog( QWidget, Ui_Widget, BasePluginWidget ):
|
||||
if platform.system() == "Windows":
|
||||
#info = QString.fromLocal8Bit( arr ).strip().split( "\r\n" )
|
||||
# TODO test
|
||||
info = string.split(arr, sep="\r\n" )
|
||||
info = arr.splitlines()
|
||||
else:
|
||||
info = string.split(arr, sep="\n" )
|
||||
info = arr.splitlines()
|
||||
self.rasterInfoList.addItems( info )
|
||||
|
||||
def fillInputFileEdit( self ):
|
||||
|
Loading…
x
Reference in New Issue
Block a user