MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / addFile

Method addFile

src/RecentFilesListManager.cpp:27–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void RecentFilesListManager::addFile(const QString &filePath)
28{
29 qInfo(Q_FUNC_INFO);
30
31 // Attempt to remove it first to make sure it is not added twice
32 removeFile(filePath);
33
34 // Set a limit on how many can be in the list
35 if (recentFiles.size() >= 10) {
36 recentFiles.removeLast();
37 }
38
39 recentFiles.prepend(filePath);
40}
41
42void RecentFilesListManager::removeFile(const QString &filePath)
43{

Callers 2

initMethod · 0.80
saveSessionMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected