| 757 | } |
| 758 | |
| 759 | QStringList ChatRootView::convertUrlsToLocalPaths(const QVariantList &urls) const |
| 760 | { |
| 761 | QStringList localPaths; |
| 762 | for (const QVariant &urlVariant : urls) { |
| 763 | QUrl url(urlVariant.toString()); |
| 764 | if (url.isLocalFile()) { |
| 765 | QString localPath = url.toLocalFile(); |
| 766 | if (!localPath.isEmpty()) { |
| 767 | localPaths.append(localPath); |
| 768 | } |
| 769 | } |
| 770 | } |
| 771 | return localPaths; |
| 772 | } |
| 773 | |
| 774 | void ChatRootView::calculateMessageTokensCount(const QString &message) |
| 775 | { |