Skip to content
Permalink
Browse files

Don't show errors in a dialog for QgsDelimitedTextProvider

This causes issues with scripted use of the provider. Instead, just
log messages to the standard message log.
  • Loading branch information
nyalldawson committed Jun 24, 2015
1 parent 0016ab6 commit 19767cbd958af393aa7810ed166da625b50c18dd
@@ -23,7 +23,6 @@
#include <QDataStream>
#include <QTextStream>
#include <QStringList>
#include <QMessageBox>
#include <QSettings>
#include <QRegExp>
#include <QUrl>
@@ -758,7 +757,7 @@ void QgsDelimitedTextProvider::rescanFile()
}
if ( messages.size() > 0 )
{
reportErrors( messages, false );
reportErrors( messages );
QgsDebugMsg( "Delimited text source invalid on rescan - missing geometry fields" );
mValid = false;
return;
@@ -1098,7 +1097,7 @@ void QgsDelimitedTextProvider::onFileUpdated()
{
QStringList messages;
messages.append( tr( "The file has been updated by another application - reloading" ) );
reportErrors( messages, false );
reportErrors( messages );
mRescanRequired = true;
}
}
@@ -226,7 +226,7 @@ class QgsDelimitedTextProvider : public QgsVectorDataProvider
void resetIndexes();
void clearInvalidLines();
void recordInvalidLine( QString message );
void reportErrors( QStringList messages = QStringList(), bool showDialog = true );
void reportErrors( QStringList messages = QStringList(), bool showDialog = false );
static bool recordIsEmpty( QStringList &record );
void setUriParameter( QString parameter, QString value );

0 comments on commit 19767cb

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