Skip to content
Permalink
Browse files

error messages for copy,rename,delete

git-svn-id: http://svn.osgeo.org/qgis/trunk@5058 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 18, 2006
1 parent 9e8c039 commit d121222212bb9ce3d1b117e2a4a0e51cfbbfb8b6
Showing with 16 additions and 6 deletions.
  1. +16 −6 src/plugins/grass/qgsgrassbrowser.cpp
@@ -275,10 +275,13 @@ void QgsGrassBrowser::copyMap()
#endif
QProcess process(this);
process.start(module, QStringList( typeName + "=" + map + "@" + mapset + "," + newName ) );
if ( !process.waitForFinished() )
if ( !process.waitForFinished() || process.exitCode() != 0 )
{
QString output ( process.readAllStandardOutput () );
QString error ( process.readAllStandardError () );
QMessageBox::warning( 0, "Warning", "Cannot copy map "
+ map + "@" + mapset );
+ map + "@" + mapset + "<br>" + output.replace("\n","<br>")
+ "<br>" + error.replace("\n","<br>") );
}
else
{
@@ -335,9 +338,13 @@ void QgsGrassBrowser::renameMap()
#endif
QProcess process(this);
process.start(module, QStringList( typeName + "=" + map + "," + newName ) );
if ( !process.waitForFinished() )
if ( !process.waitForFinished() || process.exitCode() != 0 )
{
QMessageBox::warning( 0, "Warning", "Cannot rename map " + map );
QString output ( process.readAllStandardOutput () );
QString error ( process.readAllStandardError () );
QMessageBox::warning( 0, "Warning", "Cannot rename map "
+ map + "<br>" + output.replace("\n","<br>")
+ "<br>" + error.replace("\n","<br>") );
}
else
{
@@ -383,10 +390,13 @@ void QgsGrassBrowser::deleteMap()
#endif
QProcess process(this);
process.start(module, QStringList( typeName + "=" + map ) );
if ( !process.waitForFinished() )
if ( !process.waitForFinished() || process.exitCode() != 0 )
{
QString output ( process.readAllStandardOutput () );
QString error ( process.readAllStandardError () );
QMessageBox::warning( 0, "Warning", "Cannot delete map "
+ map );
+ map + "<br>" + output.replace("\n","<br>")
+ "<br>" + error.replace("\n","<br>") );
}
else
{

0 comments on commit d121222

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