Git commit 8effd13c3f0f246260fd8b8e4fb8067bd9d8a1e2 by Jos=C3=A9 Manuel San= tamar=C3=ADa Lema. Committed on 08/04/2016 at 11:59. Pushed by joselema into branch 'master'. Set parents properly for models. M +2 -2 src/models/kreallingredientsmodels.cpp M +2 -2 src/models/kresinglecolumnproxymodel.cpp M +1 -1 src/models/kresinglecolumnproxymodel.h http://commits.kde.org/krecipes/8effd13c3f0f246260fd8b8e4fb8067bd9d8a1e2 diff --git a/src/models/kreallingredientsmodels.cpp b/src/models/kreallingr= edientsmodels.cpp index aca6d89..d8425ab 100644 --- a/src/models/kreallingredientsmodels.cpp +++ b/src/models/kreallingredientsmodels.cpp @@ -18,8 +18,8 @@ KreAllIngredientsModels::KreAllIngredientsModels( RecipeDB * database ): m_database( database ) { - m_sourceModel =3D new QStandardItemModel; - m_ingredientNameModel =3D new KreSingleColumnProxyModel( 1 ); + m_sourceModel =3D new QStandardItemModel( this ); + m_ingredientNameModel =3D new KreSingleColumnProxyModel( 1, this ); m_ingredientNameModel->setSortCaseSensitivity( Qt::CaseInsensitive ); m_ingredientNameModel->setSourceModel( m_sourceModel ); m_ingredientNameCompletion =3D new KCompletion; diff --git a/src/models/kresinglecolumnproxymodel.cpp b/src/models/kresingl= ecolumnproxymodel.cpp index c28ef35..eda4a96 100644 --- a/src/models/kresinglecolumnproxymodel.cpp +++ b/src/models/kresinglecolumnproxymodel.cpp @@ -9,8 +9,8 @@ = #include "kresinglecolumnproxymodel.h" = -KreSingleColumnProxyModel::KreSingleColumnProxyModel( int column ): - QSortFilterProxyModel( 0 ), +KreSingleColumnProxyModel::KreSingleColumnProxyModel( int column, QObject = * parent ): + QSortFilterProxyModel( parent ), m_acceptedColumn( column ) { } diff --git a/src/models/kresinglecolumnproxymodel.h b/src/models/kresinglec= olumnproxymodel.h index fdeffa5..63de61e 100644 --- a/src/models/kresinglecolumnproxymodel.h +++ b/src/models/kresinglecolumnproxymodel.h @@ -16,7 +16,7 @@ class KreSingleColumnProxyModel: public QSortFilterProxyM= odel { Q_OBJECT = public: - KreSingleColumnProxyModel( int column ); + KreSingleColumnProxyModel( int column, QObject * parent =3D 0 ); = protected: bool filterAcceptsColumn( int source_column, =