! Returns the data stored under the given \a role for the item "My Computer". \sa Qt::ItemDataRole */
| 715 | \sa Qt::ItemDataRole |
| 716 | */ |
| 717 | QVariant FileSystemModel::myComputer(int role) const |
| 718 | { |
| 719 | #ifndef QT_NO_FILESYSTEMWATCHER |
| 720 | Q_D(const FileSystemModel); |
| 721 | #endif |
| 722 | switch (role) { |
| 723 | case Qt::DisplayRole: |
| 724 | return FileSystemModelPrivate::myComputer(); |
| 725 | #ifndef QT_NO_FILESYSTEMWATCHER |
| 726 | case Qt::DecorationRole: |
| 727 | return d->fileInfoGatherer.decorationProvider() |
| 728 | ? d->fileInfoGatherer.decorationProvider()->computerDecoration() |
| 729 | : QVariant(); |
| 730 | #endif |
| 731 | } |
| 732 | return QVariant(); |
| 733 | } |
| 734 | |
| 735 | /*! |
| 736 | \reimp |
no test coverage detected