Merge from origin

This commit is contained in:
Jacob Støren 2013-09-26 11:48:41 +02:00
parent 6f37a731fc
commit a4bcbf6115
2 changed files with 11 additions and 11 deletions

View File

@ -54,19 +54,19 @@
class MySortFilterProxyModel : public QSortFilterProxyModel class MySortFilterProxyModel : public QSortFilterProxyModel
{ {
public: public:
MySortFilterProxyModel(QObject *parent = 0) MySortFilterProxyModel(QObject *parent = 0)
: QSortFilterProxyModel(parent) : QSortFilterProxyModel(parent)
{ {
} }
void notifyModelChanged() void notifyModelChanged()
{ {
QModelIndex startModelIdx = index(0,0); QModelIndex startModelIdx = index(0,0);
QModelIndex endModelIdx = index(rowCount(startModelIdx), 0); QModelIndex endModelIdx = index(rowCount(startModelIdx), 0);
emit dataChanged(startModelIdx, endModelIdx); emit dataChanged(startModelIdx, endModelIdx);
} }
}; };
@ -112,7 +112,7 @@ QWidget* PdmUiTreeViewEditor::createWidget(QWidget* parent)
m_proxyTreeModelPdm->setSourceModel(m_treeModelPdm); m_proxyTreeModelPdm->setSourceModel(m_treeModelPdm);
m_treeView->setModel(m_proxyTreeModelPdm); m_treeView->setModel(m_proxyTreeModelPdm);
m_treeView->setSortingEnabled(true); m_treeView->setSortingEnabled(true);
m_treeView->sortByColumn(1, Qt::AscendingOrder); m_treeView->sortByColumn(1, Qt::AscendingOrder);

View File

@ -503,7 +503,7 @@ void UiTreeModelPdm::notifyModelChanged()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QVariant UiTreeModelPdm::headerData(int section, Qt::Orientation orientation, int role /*= Qt::DisplayRole */) const QVariant UiTreeModelPdm::headerData(int section, Qt::Orientation orientation, int role /*= Qt::DisplayRole */) const
{ {
if (role != Qt::DisplayRole) if (role != Qt::DisplayRole)
return QVariant(); return QVariant();
if (section < m_columnHeaders.size()) if (section < m_columnHeaders.size())