Skip to content

Commit

Permalink
Using common code for list of encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrook committed Apr 29, 2013
1 parent 18786ad commit ff92f4d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp
Expand Up @@ -16,7 +16,7 @@
#include "qgisinterface.h"
#include "qgscontexthelp.h"
#include "qgslogger.h"

#include "qgsvectordataprovider.h"
#include "qgsdelimitedtextprovider.h"
#include "qgsdelimitedtextfile.h"

Expand Down Expand Up @@ -53,16 +53,7 @@ QgsDelimitedTextSourceSelect::QgsDelimitedTextSourceSelect( QWidget * parent, Qt
}

cmbEncoding->clear();
QStringList codecs;
foreach ( QByteArray codec, QTextCodec::availableCodecs() )
{
codecs.append( codec );
}
codecs.sort();
foreach ( QString codec, codecs )
{
cmbEncoding->addItem( codec );
}
cmbEncoding->addItems( QgsVectorDataProvider::availableEncodings());
cmbEncoding->setCurrentIndex( cmbEncoding->findText( "UTF-8" ) );
loadSettings();

Expand Down

0 comments on commit ff92f4d

Please sign in to comment.