forked from qt-creator/qt-creator
Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively. Change-Id: I1e04e555409be09242db6890f9e013396f83aeed Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -213,7 +213,7 @@ bool BaseTextDocument::save(QString *errorString, const QString &fileName, bool
|
||||
// When saving the current editor, make sure to maintain the cursor position for undo
|
||||
Core::IEditor *currentEditor = Core::EditorManager::instance()->currentEditor();
|
||||
if (BaseTextEditor *editable = qobject_cast<BaseTextEditor*>(currentEditor)) {
|
||||
if (editable->file() == this) {
|
||||
if (editable->document() == this) {
|
||||
editorWidget = editable->editorWidget();
|
||||
QTextCursor cur = editorWidget->textCursor();
|
||||
savedPosition = cur.position();
|
||||
@@ -289,7 +289,7 @@ void BaseTextDocument::rename(const QString &newName)
|
||||
emit changed();
|
||||
}
|
||||
|
||||
bool BaseTextDocument::isReadOnly() const
|
||||
bool BaseTextDocument::isFileReadOnly() const
|
||||
{
|
||||
if (d->m_fileName.isEmpty()) //have no corresponding file, so editing is ok
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user