| 106 | } |
| 107 | |
| 108 | QString ContactFileChatWidgetItem::getFileExtension() const { |
| 109 | if (!m_fileName.isEmpty()) { |
| 110 | int pos = m_fileName.lastIndexOf('.'); |
| 111 | if (pos != -1) { |
| 112 | return m_fileName.mid(pos + 1); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | return QStringLiteral("gif"); |
| 117 | } |
| 118 | |
| 119 | QString ContactFileChatWidgetItem::getDefaultFilename() const { |
| 120 | return m_fileName; |