Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
73b886fc
Commit
73b886fc
authored
Mar 10, 2009
by
mae
Browse files
make "close all" work with fake-restored editors
parent
5b683c84
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
73b886fc
...
...
@@ -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
);
}
...
...
src/plugins/coreplugin/editormanager/editorview.cpp
View file @
73b886fc
...
...
@@ -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
);
...
...
src/plugins/coreplugin/editormanager/editorview.h
View file @
73b886fc
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment