forked from qt-creator/qt-creator
Make document model API more consistent with entry vs document
Change-Id: Iae2fe480d9fcb564d566f1dcca142c21c99c2d5b Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -308,12 +308,12 @@ void EditorToolBar::updateEditorListSelection(IEditor *newSelection)
|
||||
|
||||
void EditorToolBar::changeActiveEditor(int row)
|
||||
{
|
||||
EditorManager::activateEditorForEntry(DocumentModel::documentAtRow(row));
|
||||
EditorManager::activateEditorForEntry(DocumentModel::entryAtRow(row));
|
||||
}
|
||||
|
||||
void EditorToolBar::listContextMenu(QPoint pos)
|
||||
{
|
||||
DocumentModel::Entry *entry = DocumentModel::documentAtRow(
|
||||
DocumentModel::Entry *entry = DocumentModel::entryAtRow(
|
||||
d->m_editorList->currentIndex());
|
||||
QString fileName = entry ? entry->fileName() : QString();
|
||||
QString shortFileName = entry ? QFileInfo(fileName).fileName() : QString();
|
||||
@@ -361,7 +361,7 @@ void EditorToolBar::checkDocumentStatus()
|
||||
{
|
||||
IDocument *document = qobject_cast<IDocument *>(sender());
|
||||
QTC_ASSERT(document, return);
|
||||
DocumentModel::Entry *entry = DocumentModel::documentAtRow(
|
||||
DocumentModel::Entry *entry = DocumentModel::entryAtRow(
|
||||
d->m_editorList->currentIndex());
|
||||
|
||||
if (entry && entry->document && entry->document == document)
|
||||
|
||||
Reference in New Issue
Block a user