--- a/E4Gui/E4ModelToolBar.py Mon Dec 28 18:31:37 2009 +0000 +++ b/E4Gui/E4ModelToolBar.py Wed Dec 30 15:40:33 2009 +0000 @@ -113,10 +113,10 @@ for i in range(self.__model.rowCount(self.__root)): idx = self.__model.index(i, 0, self.__root) - v = QVariant(idx) + v = idx - title = idx.data(Qt.DisplayRole).toString() - icon = idx.data(Qt.DecorationRole).toPyObject() + title = idx.data(Qt.DisplayRole) + icon = idx.data(Qt.DecorationRole) if icon == NotImplemented or icon is None: icon = QIcon() folder = self.__model.hasChildren(idx) @@ -145,11 +145,10 @@ if action is None: return QModelIndex() - v = action.data() - if not v.isValid(): + idx = action.data() + if idx is None: return QModelIndex() - idx = v.toPyObject() if not isinstance(idx, QModelIndex): return QModelIndex()