| 75 | } |
| 76 | |
| 77 | void 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 | |
| 94 | void VCSCommitDiffPatchSource::oldMessageChanged(const QString& text) |
| 95 | { |
nothing calls this directly
no test coverage detected