Skip to content
Permalink
Browse files

Fix crash in QgsEncodingFileDialog

  • Loading branch information
m-kuhn committed Oct 5, 2016
1 parent 5179a3a commit d0ec36704479a96298dfd5e7191d168bd74a7ae8
Showing with 8 additions and 6 deletions.
  1. +5 −3 src/gui/qgsencodingfiledialog.cpp
  2. +3 −3 src/gui/qgsencodingfiledialog.h
@@ -25,15 +25,17 @@
#include <QLayout>
#include <QTextCodec>

QgsEncodingFileDialog::QgsEncodingFileDialog( QWidget * parent,
const QString & caption, const QString & directory,
const QString & filter, const QString & encoding )
QgsEncodingFileDialog::QgsEncodingFileDialog( QWidget* parent,
const QString& caption, const QString& directory,
const QString& filter, const QString& encoding )
: QFileDialog( parent, caption, directory, filter )
{
mCancelAll = false;
mCancelAllButton = nullptr;
mEncodingComboBox = new QComboBox( this );
QLabel* l = new QLabel( tr( "Encoding:" ), this );

setOption( QFileDialog::DontUseNativeDialog );
layout()->addWidget( l );
layout()->addWidget( mEncodingComboBox );

@@ -27,9 +27,9 @@ class GUI_EXPORT QgsEncodingFileDialog: public QFileDialog
{
Q_OBJECT
public:
QgsEncodingFileDialog( QWidget * parent = nullptr,
const QString & caption = QString(), const QString & directory = QString(),
const QString & filter = QString(), const QString & encoding = QString() );
QgsEncodingFileDialog( QWidget* parent = nullptr,
const QString& caption = QString(), const QString& directory = QString(),
const QString& filter = QString(), const QString& encoding = QString() );
~QgsEncodingFileDialog();
/** Returns a string describing the chosen encoding*/
QString encoding() const;

0 comments on commit d0ec367

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