Commit 4a57295d authored by hjk's avatar hjk
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 341de778 29b1f841
...@@ -700,7 +700,7 @@ ...@@ -700,7 +700,7 @@
\section1 Usage \section1 Usage
You can find the version control menu entires in a sub-menu of the You can find the version control menu entries in a sub-menu of the
\gui{Tools} menu. The version control system displayed here is the system \gui{Tools} menu. The version control system displayed here is the system
that manages the current project. that manages the current project.
......
...@@ -628,6 +628,7 @@ QList<IFile *> EditorManager::filesForEditors(QList<IEditor *> editors) const ...@@ -628,6 +628,7 @@ QList<IFile *> EditorManager::filesForEditors(QList<IEditor *> editors) const
bool EditorManager::closeAllEditors(bool askAboutModifiedEditors) bool EditorManager::closeAllEditors(bool askAboutModifiedEditors)
{ {
m_d->m_editorModel->removeAllRestoredEditors();
return closeEditors(openedEditors(), askAboutModifiedEditors); return closeEditors(openedEditors(), askAboutModifiedEditors);
} }
......
...@@ -181,6 +181,17 @@ void EditorModel::removeEditor(IEditor *editor) ...@@ -181,6 +181,17 @@ void EditorModel::removeEditor(IEditor *editor)
disconnect(editor, SIGNAL(changed()), this, SLOT(itemChanged())); disconnect(editor, SIGNAL(changed()), this, SLOT(itemChanged()));
} }
void EditorModel::removeAllRestoredEditors()
{
for (int i = m_editors.count()-1; i >= 0; --i) {
if (!m_editors.at(i).editor) {
beginRemoveRows(QModelIndex(), i, i);
m_editors.removeAt(i);
endRemoveRows();
}
}
}
bool EditorModel::isDuplicate(IEditor *editor) const bool EditorModel::isDuplicate(IEditor *editor) const
{ {
return m_duplicateEditors.contains(editor); return m_duplicateEditors.contains(editor);
......
...@@ -86,6 +86,7 @@ public: ...@@ -86,6 +86,7 @@ public:
QList<Entry> entries() const { return m_editors; } QList<Entry> entries() const { return m_editors; }
void removeEditor(IEditor *editor); void removeEditor(IEditor *editor);
void removeAllRestoredEditors();
void emitDataChanged(IEditor *editor); void emitDataChanged(IEditor *editor);
QList<IEditor *> editors() const; QList<IEditor *> editors() const;
......
...@@ -1493,7 +1493,7 @@ EventResult FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodifi ...@@ -1493,7 +1493,7 @@ EventResult FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodifi
updateMiniBuffer(); updateMiniBuffer();
} else if ((key == Key_Up || key == Key_PageUp) && isSearchMode()) { } else if ((key == Key_Up || key == Key_PageUp) && isSearchMode()) {
// FIXME: This and the three cases below are wrong as vim // FIXME: This and the three cases below are wrong as vim
// takes only matching entires in the history into account. // takes only matching entries in the history into account.
if (m_searchHistoryIndex > 0) { if (m_searchHistoryIndex > 0) {
--m_searchHistoryIndex; --m_searchHistoryIndex;
showBlackMessage(m_searchHistory.at(m_searchHistoryIndex)); showBlackMessage(m_searchHistory.at(m_searchHistoryIndex));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment