Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added parsing of GRASS_INFO_MESSAGE
git-svn-id: http://svn.osgeo.org/qgis/trunk@4926 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Feb 28, 2006
1 parent e27a11b commit 078c75a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -707,6 +707,7 @@ void QgsGrassModule::readStderr()

QString line;
QRegExp rxpercent ( "GRASS_INFO_PERCENT: (\\d+)" );
QRegExp rxmessage ( "GRASS_INFO_MESSAGE\\(\\d+,\\d+\\): (.*)" );
QRegExp rxwarning ( "GRASS_INFO_WARNING\\(\\d+,\\d+\\): (.*)" );
QRegExp rxerror ( "GRASS_INFO_ERROR\\(\\d+,\\d+\\): (.*)" );
QRegExp rxend ( "GRASS_INFO_END\\(\\d+,\\d+\\)" );
Expand All @@ -719,6 +720,8 @@ void QgsGrassModule::readStderr()
if ( rxpercent.search ( line ) != -1 ) {
int progress = rxpercent.cap(1).toInt();
mProgressBar->setProgress ( progress, 100 );
} else if ( rxmessage.search ( line ) != -1 ) {
mOutputTextBrowser->append ( rxmessage.cap(1) );
} else if ( rxwarning.search ( line ) != -1 ) {
QString warn = rxwarning.cap(1);
QString img = mAppDir + "/share/qgis/themes/default/grass/grass_module_warning.png";
Expand Down

0 comments on commit 078c75a

Please sign in to comment.