forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -700,7 +700,7 @@
|
||||
|
||||
\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
|
||||
that manages the current project.
|
||||
|
||||
|
||||
@@ -628,6 +628,7 @@ QList<IFile *> EditorManager::filesForEditors(QList<IEditor *> editors) const
|
||||
|
||||
bool EditorManager::closeAllEditors(bool askAboutModifiedEditors)
|
||||
{
|
||||
m_d->m_editorModel->removeAllRestoredEditors();
|
||||
return closeEditors(openedEditors(), askAboutModifiedEditors);
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,17 @@ void EditorModel::removeEditor(IEditor *editor)
|
||||
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
|
||||
{
|
||||
return m_duplicateEditors.contains(editor);
|
||||
|
||||
@@ -86,6 +86,7 @@ public:
|
||||
QList<Entry> entries() const { return m_editors; }
|
||||
|
||||
void removeEditor(IEditor *editor);
|
||||
void removeAllRestoredEditors();
|
||||
void emitDataChanged(IEditor *editor);
|
||||
|
||||
QList<IEditor *> editors() const;
|
||||
|
||||
@@ -1493,7 +1493,7 @@ EventResult FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodifi
|
||||
updateMiniBuffer();
|
||||
} else if ((key == Key_Up || key == Key_PageUp) && isSearchMode()) {
|
||||
// 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) {
|
||||
--m_searchHistoryIndex;
|
||||
showBlackMessage(m_searchHistory.at(m_searchHistoryIndex));
|
||||
|
||||
Reference in New Issue
Block a user