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:
Eike Ziller
2013-06-28 17:05:50 +02:00
parent 3e117b125d
commit c531970b57
4 changed files with 9 additions and 3 deletions

View File

@@ -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) {