| 78 | #endif |
| 79 | |
| 80 | QVariant CRemoteFileSystem::Data(int column) |
| 81 | { |
| 82 | switch((ColumnValue)column) { |
| 83 | case ColumnValue::Name: { |
| 84 | return GetName(); |
| 85 | } |
| 86 | case ColumnValue::Size: { |
| 87 | return CStats::Convertbytes(GetSize()); |
| 88 | } |
| 89 | case ColumnValue::Type: { |
| 90 | if(GetType() & TYPE::FILE) |
| 91 | return tr("File"); |
| 92 | if(GetType() & TYPE::DIR) |
| 93 | return tr("Folder"); |
| 94 | if(GetType() & TYPE::DRIVE) |
| 95 | return tr("Drive"); |
| 96 | if(GetType() & TYPE::SYMLINK) |
| 97 | return tr("Symlink"); |
| 98 | if(GetType() & TYPE::SPECIAL) |
| 99 | return tr("Special"); |
| 100 | break; |
| 101 | } |
| 102 | case ColumnValue::LastModified: { |
| 103 | return GetLastModified(); |
| 104 | } |
| 105 | case ColumnValue::Permission: { |
| 106 | #if defined(Q_OS_LINUX) |
| 107 | quint32 permissions = (quint32)GetPermissions(); |
| 108 | char buf[11]; |
| 109 | uint32_to_permstr(permissions, buf); |
| 110 | return QString(buf); |
| 111 | #endif |
| 112 | break; |
| 113 | } |
| 114 | case ColumnValue::Owner: |
| 115 | return GetOwner(); |
| 116 | default: |
| 117 | break; |
| 118 | } |
| 119 | return QVariant(); |
| 120 | } |
| 121 | |
| 122 | QString CRemoteFileSystem::HeaderData(int section) |
| 123 | { |
no test coverage detected