From 9132c5de7dc0d8f81bbfc2978d3f692151e9550b Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 14 Sep 2014 08:51:18 +0100 Subject: [PATCH] Use direct implementation and do not call virtuals in the constructor --- src/tomahawk/sourcetree/SourcesProxyModel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tomahawk/sourcetree/SourcesProxyModel.cpp b/src/tomahawk/sourcetree/SourcesProxyModel.cpp index e50488983..541a6afbb 100644 --- a/src/tomahawk/sourcetree/SourcesProxyModel.cpp +++ b/src/tomahawk/sourcetree/SourcesProxyModel.cpp @@ -36,7 +36,8 @@ SourcesProxyModel::SourcesProxyModel( SourcesModel* model, QObject* parent ) setDynamicSortFilter( true ); setSortRole( SourcesModel::SortRole ); - setSourceModel( model ); + // Use direct implementation and do not call virtuals in the constructor. + QSortFilterProxyModel::setSourceModel( model ); connect( model, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onModelChanged() ) ); connect( model, SIGNAL( rowsRemoved( QModelIndex, int, int ) ), SLOT( onModelChanged() ) );