Skip to content

Commit

Permalink
properly clear list of the invalid lines. Also don't display invalid …
Browse files Browse the repository at this point in the history
…lines message. Addresses #3741

git-svn-id: http://svn.osgeo.org/qgis/trunk@15719 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy committed Apr 16, 2011
1 parent 5b1e799 commit 136b608
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <QRegExp>
#include <QUrl>


#include "qgsapplication.h"
#include "qgsdataprovider.h"
#include "qgsfeature.h"
Expand Down Expand Up @@ -143,7 +142,7 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
, mWktCrdRegexp( "(\\-?\\d+(?:\\.\\d*)?\\s+\\-?\\d+(?:\\.\\d*)?)\\s[\\s\\d\\.\\-]+" )
, mSkipLines( 0 )
, mFirstDataLine( 0 )
, mShowInvalidLines( true )
, mShowInvalidLines( false )
, mCrs()
, mWkbType( QGis::WKBUnknown )
{
Expand Down Expand Up @@ -455,7 +454,7 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature )
QString line = readLine( mStream ); // Default local 8 bit encoding
if ( line.isEmpty() )
continue;

// lex the tokens from the current data line
QStringList tokens = splitLine( line );

Expand Down Expand Up @@ -559,7 +558,6 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature )

// End of the file. If there are any lines that couldn't be
// loaded, display them now.

if ( mShowInvalidLines && !mInvalidLines.isEmpty() )
{
mShowInvalidLines = false;
Expand All @@ -577,7 +575,7 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature )
output->showMessage();

// We no longer need these lines.
mInvalidLines.empty();
mInvalidLines.clear();
}

return false;
Expand Down

0 comments on commit 136b608

Please sign in to comment.