Core: Add methods to retrieve contents from IDocument

This is very helpful for dynamic extra compiler support (e.g. uic,
flex, ...).

Change-Id: I5a49b0b39a0f1fbc7834701d60a68ef441172969
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-01-15 15:24:49 +01:00
parent fc485e6b86
commit 5182f2ffb2
2 changed files with 16 additions and 0 deletions

View File

@@ -150,6 +150,15 @@ IDocument::OpenResult IDocument::open(QString *errorString, const QString &fileN
return OpenResult::CannotHandle;
}
/*!
* Returns the current contents of the document. The base implementation returns an empty
* QByteArray.
*/
QByteArray IDocument::contents() const
{
return QByteArray();
}
/*!
Used for example by EditorManager::openEditorWithContents() to set the contents
of this document.