forked from qt-creator/qt-creator
Add EditorModel::openDocumentCount and use it.
As is, EditorModel::rowCount() could also be used, but this will most probably change later. So we simply add a method that is independent from all the "model" methods. Change-Id: I39a2338d765ed6a269bf8977b816a5eda371afdf Reviewed-by: Marco Bubke <marco.bubke@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -172,8 +172,7 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex
|
||||
|
||||
void ShortCutManager::updateActions(Core::IEditor* currentEditor)
|
||||
{
|
||||
int openedCount = Core::ICore::editorManager()->openedEditors().count()
|
||||
+ Core::ICore::editorManager()->openedEditorsModel()->restoredEditors().count();
|
||||
int openedCount = Core::ICore::editorManager()->openedEditorsModel()->openDocumentCount();
|
||||
|
||||
QString fileName;
|
||||
if (currentEditor) {
|
||||
|
||||
Reference in New Issue
Block a user