Skip to content

Commit

Permalink
Fix crash in QgsEncodingFileDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 5, 2016
1 parent 5179a3a commit d0ec367
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/gui/qgsencodingfiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
6 changes: 3 additions & 3 deletions src/gui/qgsencodingfiledialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0ec367

Please sign in to comment.