Skip to content

Commit fa00913

Browse files
author
alexbruy
committedApr 16, 2011
properly clear list of the invalid lines. Also don't display invalid lines message. Addresses #3741
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15719 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
 

‎src/providers/delimitedtext/qgsdelimitedtextprovider.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <QRegExp>
2929
#include <QUrl>
3030

31-
3231
#include "qgsapplication.h"
3332
#include "qgsdataprovider.h"
3433
#include "qgsfeature.h"
@@ -143,7 +142,7 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( QString uri )
143142
, mWktCrdRegexp( "(\\-?\\d+(?:\\.\\d*)?\\s+\\-?\\d+(?:\\.\\d*)?)\\s[\\s\\d\\.\\-]+" )
144143
, mSkipLines( 0 )
145144
, mFirstDataLine( 0 )
146-
, mShowInvalidLines( true )
145+
, mShowInvalidLines( false )
147146
, mCrs()
148147
, mWkbType( QGis::WKBUnknown )
149148
{
@@ -455,7 +454,7 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature )
455454
QString line = readLine( mStream ); // Default local 8 bit encoding
456455
if ( line.isEmpty() )
457456
continue;
458-
457+
459458
// lex the tokens from the current data line
460459
QStringList tokens = splitLine( line );
461460

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

560559
// End of the file. If there are any lines that couldn't be
561560
// loaded, display them now.
562-
563561
if ( mShowInvalidLines && !mInvalidLines.isEmpty() )
564562
{
565563
mShowInvalidLines = false;
@@ -577,7 +575,7 @@ bool QgsDelimitedTextProvider::nextFeature( QgsFeature& feature )
577575
output->showMessage();
578576

579577
// We no longer need these lines.
580-
mInvalidLines.empty();
578+
mInvalidLines.clear();
581579
}
582580

583581
return false;

0 commit comments

Comments
 (0)
Please sign in to comment.