Core: Let IDocument also report failed file reload operations

Change-Id: I8fa02f2398f59306c49481316fdedf50a1c4e32f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-06-20 12:49:19 +02:00
parent a043977999
commit 10ff6769ac
7 changed files with 18 additions and 15 deletions

View File

@@ -2204,8 +2204,11 @@ void BaseTextEditorWidget::documentAboutToBeReloaded()
d->m_refactorOverlay->clear();
}
void BaseTextEditorWidget::documentReloaded()
void BaseTextEditorWidget::documentReloadFinished(bool success)
{
if (!success)
return;
// restore cursor position
restoreState(d->m_tempState);
updateCannotDecodeInfo();
@@ -2584,7 +2587,7 @@ void BaseTextEditorWidgetPrivate::setupDocumentSignals(const QSharedPointer<Base
QObject::connect(document.data(), SIGNAL(changed()), q, SIGNAL(changed()));
QObject::connect(document.data(), SIGNAL(titleChanged(QString)), q, SLOT(setDisplayName(QString)));
QObject::connect(document.data(), SIGNAL(aboutToReload()), q, SLOT(documentAboutToBeReloaded()));
QObject::connect(document.data(), SIGNAL(reloaded()), q, SLOT(documentReloaded()));
QObject::connect(document.data(), SIGNAL(reloadFinished(bool)), q, SLOT(documentReloadFinished(bool)));
q->slotUpdateExtraAreaWidth();
}