| 32 | } |
| 33 | |
| 34 | void FileItem::openFileInExternalEditor() |
| 35 | { |
| 36 | if (m_filePath.isEmpty()) { |
| 37 | return; |
| 38 | } |
| 39 | |
| 40 | bool success = QDesktopServices::openUrl(QUrl::fromLocalFile(m_filePath)); |
| 41 | if (success) { |
| 42 | LOG_MESSAGE(QString("Opened file in external application: %1").arg(m_filePath)); |
| 43 | } else { |
| 44 | LOG_MESSAGE(QString("Failed to open file externally: %1").arg(m_filePath)); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | QString FileItem::filePath() const |
| 49 | { |