| 117 | } |
| 118 | |
| 119 | QList<InfoItem> FileSource::getFileInfoList() const |
| 120 | { |
| 121 | QList<InfoItem> infoList; |
| 122 | |
| 123 | if (!this->isFileOpened) |
| 124 | return infoList; |
| 125 | |
| 126 | infoList.append(InfoItem("File Path", this->fileInfo.absoluteFilePath())); |
| 127 | #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) |
| 128 | auto createdtime = this->fileInfo.created().toString("yyyy-MM-dd hh:mm:ss"); |
| 129 | #else |
| 130 | auto createdtime = this->fileInfo.birthTime().toString("yyyy-MM-dd hh:mm:ss"); |
| 131 | #endif |
| 132 | infoList.append(InfoItem("Time Created", createdtime)); |
| 133 | infoList.append( |
| 134 | InfoItem("Time Modified", this->fileInfo.lastModified().toString("yyyy-MM-dd hh:mm:ss"))); |
| 135 | infoList.append(InfoItem("Nr Bytes", QString("%1").arg(this->fileInfo.size()))); |
| 136 | |
| 137 | return infoList; |
| 138 | } |
| 139 | |
| 140 | QString FileSource::getAbsoluteFilePath() const |
| 141 | { |