From 28c7436a71910aabcc37945255fb577f7a032f0d Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 28 Jul 2013 18:46:49 +0200 Subject: Fix stupid bug in NewMovieWizard NewMovieWizard never accepted more files than the model had columns due to a misnamed function parameter. Doh! --- newmoviewizard.cpp | 7 ++----- newmoviewizard.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp index f537fff..72b7d1e 100644 --- a/newmoviewizard.cpp +++ b/newmoviewizard.cpp @@ -478,11 +478,8 @@ Qt::ItemFlags WizardTreeModel::flags(const QModelIndex &index) const{ return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } -QList WizardTreeModel::fileData(int column) const{ - if(column >= columnCount(rootIndex())){ - return QList(); - } - SmTreeItem *item = root()->child(column); +QList WizardTreeModel::fileData(int row) const{ + SmTreeItem *item = root()->child(row); QList retval; for(int i = 0; i < item->columnCount(); ++i){ retval << item->data(i); diff --git a/newmoviewizard.h b/newmoviewizard.h index 5f4d385..20c0b89 100644 --- a/newmoviewizard.h +++ b/newmoviewizard.h @@ -122,7 +122,7 @@ class WizardTreeModel : public SmTreeModel { virtual QVariant data(const QModelIndex &index, int role) const; virtual bool setData(const QModelIndex &index, const QVariant &value, int role); virtual Qt::ItemFlags flags(const QModelIndex &index) const; - QList fileData(int column) const; + QList fileData(int row) const; void clear(); private: -- cgit v1.2.3-70-g09d2