From 5a15e2df50f0657355b885b683c4a78a83396000 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Tue, 4 Oct 2022 11:08:15 -0700 Subject: [PATCH] core: limit recently opened projects size --- app/core.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/core.cpp b/app/core.cpp index 1dd1317c2..a4aaef6fc 100644 --- a/app/core.cpp +++ b/app/core.cpp @@ -1365,6 +1365,11 @@ void Core::PushRecentlyOpenedProject(const QString& s) recent_projects_.move(existing_index, 0); } else { recent_projects_.prepend(s); + + const int kMaximumRecentProjects = 10; + while (recent_projects_.size() > kMaximumRecentProjects) { + recent_projects_.removeLast(); + } } emit OpenRecentListChanged();