forked from qt-creator/qt-creator
Let users configure the number of recent files shown
Fixes: QTCREATORBUG-21898 Change-Id: Ie804e722f9bb88762da57f157833e4dc43d8ccbf Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -153,7 +153,6 @@ public:
|
||||
QSet<QString> m_expectedFileNames; // set of file names without normalization
|
||||
|
||||
QList<DocumentManager::RecentFile> m_recentFiles;
|
||||
static const int m_maxRecentFiles = 8;
|
||||
|
||||
bool m_postponeAutoReload = false;
|
||||
bool m_blockActivated = false;
|
||||
@@ -1278,7 +1277,7 @@ void DocumentManager::addToRecentFiles(const QString &fileName, Id editorId)
|
||||
if (fileKey == recentFileKey)
|
||||
it.remove();
|
||||
}
|
||||
if (d->m_recentFiles.count() == d->m_maxRecentFiles)
|
||||
while (d->m_recentFiles.count() >= EditorManagerPrivate::maxRecentFiles())
|
||||
d->m_recentFiles.removeLast();
|
||||
d->m_recentFiles.prepend(RecentFile(fileName, editorId));
|
||||
}
|
||||
|
Reference in New Issue
Block a user