MCPcopy Create free account
hub / github.com/KDE/kdevelop / addMessageToHistory

Method addMessageToHistory

kdevplatform/vcs/widgets/vcsdiffpatchsources.cpp:77–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void VCSCommitDiffPatchSource::addMessageToHistory(const QString& message)
78{
79 if(ICore::self()->shuttingDown())
80 return;
81
82 KConfigGroup vcsGroup(ICore::self()->activeSession()->config(), QStringLiteral("VCS"));
83
84 const int maxMessages = 10;
85 QStringList oldMessages = vcsGroup.readEntry("OldCommitMessages", QStringList());
86
87 oldMessages.removeAll(message);
88 oldMessages.push_front(message);
89 oldMessages = oldMessages.mid(0, maxMessages);
90
91 vcsGroup.writeEntry("OldCommitMessages", oldMessages);
92}
93
94void VCSCommitDiffPatchSource::oldMessageChanged(const QString& text)
95{

Callers

nothing calls this directly

Calls 7

QStringListClass · 0.85
shuttingDownMethod · 0.80
readEntryMethod · 0.80
midMethod · 0.80
writeEntryMethod · 0.80
configMethod · 0.45
activeSessionMethod · 0.45

Tested by

no test coverage detected