| 181 | return sourceModel()->data(mapToSource(proxyIndex), role); |
| 182 | } |
| 183 | virtual bool setData(const QModelIndex &index, const QVariant &value, |
| 184 | int role = Qt::EditRole) |
| 185 | { |
| 186 | auto model = sourceModel(); |
| 187 | if (!model) |
| 188 | return false; |
| 189 | if (role != Qt::EditRole) |
| 190 | return false; |
| 191 | // FIXME: this is a workaround for a bug in QFileSystemModel, where it doesn't |
| 192 | // sort after renames |
| 193 | { |
| 194 | ((QFileSystemModel *)model)->setNameFilterDisables(true); |
| 195 | ((QFileSystemModel *)model)->setNameFilterDisables(false); |
| 196 | } |
| 197 | return model->setData(mapToSource(index), value.toString() + ".png", role); |
| 198 | } |
| 199 | |
| 200 | private: |
| 201 | void thumbnailImage(QString path) |
no test coverage detected