MCPcopy Create free account
hub / github.com/amule-project/amule / SetFileCommentRating

Method SetFileCommentRating

src/KnownFile.cpp:1322–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1320}
1321
1322void CKnownFile::SetFileCommentRating(const wxString& strNewComment, int8 iNewRating)
1323{
1324 if (m_strComment != strNewComment || m_iRating != iNewRating) {
1325 SetLastPublishTimeKadNotes(0);
1326 wxString strCfgPath = "/" + m_abyFileHash.Encode() + "/";
1327
1328 wxConfigBase* cfg = wxConfigBase::Get();
1329 if (strNewComment.IsEmpty() && iNewRating == 0) {
1330 cfg->DeleteGroup(strCfgPath);
1331 } else {
1332 cfg->Write( strCfgPath + "Comment", strNewComment);
1333 cfg->Write( strCfgPath + "Rate", (int)iNewRating);
1334 }
1335
1336 m_strComment = strNewComment;
1337 m_iRating = iNewRating;
1338
1339 SourceSet::iterator it = m_ClientUploadList.begin();
1340 for ( ; it != m_ClientUploadList.end(); ++it ) {
1341 it->SetCommentDirty();
1342 }
1343 // EC exports both comment and rating.
1344 MarkECChanged();
1345 }
1346}
1347
1348
1349void CKnownFile::SetUpPriority(uint8 iNewUpPriority, bool m_bsave){

Callers 1

KnownFile_Comment_SetFunction · 0.45

Calls 7

DeleteGroupMethod · 0.80
SetCommentDirtyMethod · 0.80
EncodeMethod · 0.45
IsEmptyMethod · 0.45
WriteMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected