MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / addFilesToLinkList

Method addFilesToLinkList

ChatView/ChatRootView.cpp:698–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696}
697
698void ChatRootView::addFilesToLinkList(const QStringList &filePaths)
699{
700 if (filePaths.isEmpty()) {
701 return;
702 }
703
704 bool filesAdded = false;
705 QStringList imageFiles;
706
707 for (const QString &filePath : filePaths) {
708 if (isImageFile(filePath)) {
709 imageFiles.append(filePath);
710 continue;
711 }
712
713 if (!m_linkedFiles.contains(filePath)) {
714 m_linkedFiles.append(filePath);
715 filesAdded = true;
716 }
717 }
718
719 if (!imageFiles.isEmpty()) {
720 addFilesToAttachList(imageFiles);
721 m_lastInfoMessage
722 = tr("Images automatically moved to Attach zone (%n file(s))", "", imageFiles.size());
723 emit lastInfoMessageChanged();
724 }
725
726 if (filesAdded) {
727 emit linkedFilesChanged();
728 }
729}
730
731void ChatRootView::removeFileFromLinkList(int index)
732{

Callers

nothing calls this directly

Calls 3

appendMethod · 0.80
sizeMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected